Wednesday, August 22, 2012

Benchmarking Simulations

It is always a good idea to benchmark your simulations and select the optimal number of cores for your simulations. This exercise greatly reduces wastage of resources and time. The script below helps with the setup. You need files conf.in and template.pbs

for i in 24 48 96 192 240 576 960 1200; do
        mkdir scaling$i
        cp conf.in scaling$i
        sed 's/xxx/'$i'/g' template.pbs > scaling${i}/sub.pbs
        echo "cd scaling$i";
        echo "aprun -n $i $namd conf.in 2>&1 1> conf.out &";  
        echo "cd \$PBS_O_WORKDIR";
done

exit;



----- Template.pbs ------
#PBS -q debug
#PBS -l mppwidth=xxx
#PBS -l walltime=00:30:00
#PBS -N scaling
#PBS -S /bin/bash
#PBS -j oe

namd=/usr/common/usg/namd/2.8/bin/namd2
cd $PBS_O_WORKDIR
aprun -n xxx $namd conf.in 2>&1 1> conf.out

No comments:

Post a Comment