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édentes Révision précédente
Prochaine révision
Révision précédente
faq:chimie:namd [2018/07/24 13:47]
tjiang
faq:chimie:namd [2021/10/08 15:51] (Version actuelle)
tjiang [Submission script NAMD]
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/​$USER/​$JOB_ID + 
-/bin/mkdir -p $SCRATCHDIR +if [[ -d "/​scratch/​Chimie"​ ]] 
-HOSTFILE=$TMPDIR/​machines +then 
-cp $HOSTFILE .+    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}/"​ 
 + 
 +else 
 +    echo "/​scratch not found, cannot create ${SCRATCHDIR}"​ 
 +    exit 1 
 +fi 
 +# Using /tmp as scratch instead 
 +# SCRATCHDIR="/​tmp/​${USER}/​${JOB_ID}/"​ 
 + 
 +/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.1532432830.txt.gz · Dernière modification: 2020/08/25 17:58 (modification externe)