Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
faq:chimie:namd [2019/10/10 13:18] – [Submission script NAMD] tjiangfaq:chimie:namd [2022/03/03 16:30] (Version actuelle) – [Submission script NAMD] tjiang
Ligne 14: Ligne 14:
  
 # Setting up home and scratch directories # Setting up home and scratch directories
-HOMEDIR=$SGE_O_WORKDIR +HOMEDIR="${SGE_O_WORKDIR}" 
-cd $HOMEDIR+cd "${HOMEDIR}" || { echo "cannot cd to ${HOMEDIR}"; exit 1; }
  
-SCRATCHDIR=/scratch/Chimie/$USER/$JOB_ID +if [[ -d "/scratch/Chimie" ]] 
-# Using ramdisk as scratch instead +then 
-SCRATCHDIR=/dev/shm/$USER/$JOB_ID/+    SCRATCHDIR="/scratch/Chimie/${USER}/${JOB_ID}/" 
 +elif [[ -d "/scratch/Lake" ]] 
 +then 
 +    SCRATCHDIR="/scratch/Lake/${USER}/${JOB_ID}/" 
 +elif [[ -d "/scratch/E5N" ]] 
 +then 
 +    SCRATCHDIR="/scratch/E5N/${USER}/${JOB_ID}/"
  
-/bin/mkdir -p $SCRATCHDIR +else 
-HOSTFILE=$TMPDIR/machines +    echo "/scratch not found, cannot create ${SCRATCHDIR}" 
-cp $HOSTFILE .+    exit 1 
 +fi 
 + 
 +echo "Creating scratch for this job: ${SCRATCHDIR}" 
 +/bin/mkdir -p "${SCRATCHDIR}" 
 +HOSTFILE="${TMPDIR}/machines" 
 +cp "${HOSTFILE}"  # we are supposed to be in ${HOMEDIR}
 sed -i -e 's/^/host\ /' machines sed -i -e 's/^/host\ /' machines
  
 # Please provide the following files for namd # Please provide the following files for namd
-CONFIGFILE=run2.namd +CONFIGFILE="run2.namd" 
-TOPFILE=DDB2_CT_hmr.prmtop +TOPFILE="DDB2_CT_hmr.prmtop" 
-PDBFILE=DDB2_CT_run1_0.coor +PDBFILE="DDB2_CT_run1_0.coor" 
-FIXFILE=DDB2_CT_new.fix +FIXFILE="DDB2_CT_new.fix" 
-COLVARSFILE=dihedral_run1.in +COLVARSFILE="dihedral_run1.in" 
-LOGFILE=run2.out+LOGFILE="run2.out"
  
 # Copying files to scratchdir # Copying files to scratchdir
-rsync -c $CONFIGFILE $TOPFILE $PDBFILE $FIXFILE $COLVARSFILE machines runscript $SCRATCHDIR+rsync -c "${CONFIGFILE}" "${TOPFILE}" "${PDBFILE}" "${FIXFILE}" "${COLVARSFILE}" machines runscript "${SCRATCHDIR}"
  
 # The executables for mpirun and namd2 # The executables for mpirun and namd2
-MPIRUN=mpirun+MPIRUN="mpirun"
  
 # Go to scratch directory and run calculation there # Go to scratch directory and run calculation there
-cd $SCRATCHDIR+cd "${SCRATCHDIR}" || { echo "cannot cd to ${SCRATCHDIR}"; exit 1; }
 echo 'group main ++shell ssh' > nodelist echo 'group main ++shell ssh' > nodelist
-cat machines>>nodelist+cat machines >> nodelist
  
-namd2 +idlepoll +p $NSLOTS +devices 0,1 $CONFIGFILE> ${LOGFILE}+namd2 +idlepoll +p "${NSLOTS}" +devices 0,1 "${CONFIGFILE}" "${LOGFILE}"
  
 # Copy back data # Copy back data
-rsync -c --exclude '$CONFIGFILE $TOPFILE $PDBFILE $COLVARSFILE* $HOMEDIR +rsync -c --exclude "${CONFIGFILE${TOPFILE${PDBFILE${COLVARSFILE}" -- "${HOMEDIR}" 
-cd $HOMEDIR+cd "${HOMEDIR}" || { echo "cannot cd to ${HOMEDIR}"; exit 1; }
  
 # Cleaning up scratch directory and hostfile # Cleaning up scratch directory and hostfile
-rm -fr $SCRATCHDIR+rm -fr "${SCRATCHDIR}" 
 </code> </code>
faq/chimie/namd.1570713484.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)