Ceci est une ancienne révision du document !
#!/bin/bash #$ -S /bin/bash #$ -N mutm_ap-oxog #$ -q E5-2670gpuK20deb128 #$ -pe mpi_debian 16 #$ -cwd #$ -V # Loading modules to set up environment module load NAMD/multicore+CUDA/2.12 # Setting up home and scratch directories HOMEDIR=$SGE_O_WORKDIR cd $HOMEDIR if [[ -d "/scratch/Chimie" ]] then 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/ elif [[ -d "/scratch/E5" ]] then SCRATCHDIR=/scratch/E5/$USER/$JOB_ID/ else echo "/scratch not found, cannot create ${SCRATCHDIR}" fi # Using /tmp as scratch instead # SCRATCHDIR=/tmp/$USER/$JOB_ID/ /bin/mkdir -p $SCRATCHDIR HOSTFILE=$TMPDIR/machines cp $HOSTFILE . sed -i -e 's/^/host\ /' machines # Please provide the following files for namd CONFIGFILE=run2.namd TOPFILE=DDB2_CT_hmr.prmtop PDBFILE=DDB2_CT_run1_0.coor FIXFILE=DDB2_CT_new.fix COLVARSFILE=dihedral_run1.in LOGFILE=run2.out # Copying files to scratchdir rsync -c $CONFIGFILE $TOPFILE $PDBFILE $FIXFILE $COLVARSFILE machines runscript $SCRATCHDIR # The executables for mpirun and namd2 MPIRUN=mpirun # Go to scratch directory and run calculation there cd $SCRATCHDIR echo 'group main ++shell ssh' > nodelist cat machines>>nodelist namd2 +idlepoll +p $NSLOTS +devices 0,1 $CONFIGFILE> ${LOGFILE} # Copy back data rsync -c --exclude '$CONFIGFILE $TOPFILE $PDBFILE $COLVARSFILE' * $HOMEDIR cd $HOMEDIR # Cleaning up scratch directory and hostfile rm -fr $SCRATCHDIR