This hands on tutorial is aimed to introduce the user in the mpi and gpu job management through the Molecular Dynamics solver called NAMD. This software scales very well and is not memory intensive. You can download and upload the hands-on files here.


For our Hands On we will equilibrate a water drop through different architectures(STD nodes and GPU node).



Resultado de imagen de water molecule

H2O Molecule

First steps 
  1. Copy namd.tar.gz to your /scratch directory .

  2. Enter the namd_tutorial and check the files. You will see an slm file and also 3 more files into water folder (your simulation inputs). 

  3. Open the water_std.slm file and check the SLURM directives( #SBATCH ... ).
     
  4. Modify the water_std.slm file to request 24 tasks, 3900Mb/core, reservation "curs" , and 10 min. time on standard nodes

  5. Modify the  water_std.slm file to work on $SCRATCH directory (it requieres to move inputs to $SCRATCH).

  6. Modify the  water_std.slm file to launch namd/2.13 by mpi (srun command) using the input files provided in namd_tutorial folder.

  7. Modify the  water_std.slm file to move the output to a folder called outputs inside the original namd_tutorial folder.

  8.  Launch the job. You can check the progress by the commandsqueue”. 

 

More specific 

  1. Modify the water_std.slm file to run only on one node and 48 cores

 

GPU Version 

 

  1. Now, you would to launch NAMD code on GPU (because you discovered that provides better performance). Copy namd_std.slm to namd_gpu.slm and edit it to run on one GPU. Remember that you need 24 tasks on 1 Node, the GPU partition and request a GPU as a generic resource.

  2. Edit your “Executable” and final sections to adapt it to a threaded GPU run (not MPI).

  3. Compare the results between architectures. Which one is faster? 


First steps  Solutions


Solution 4
#SBATCH -n 24 
#SBATCH --mem-per-cpu=3900Mb 
#SBATCH –p std 
#SBATCH -t 10

Solution 5
cd $SCRATCH 
cp -r /scratch/$USER/namd/water* . 
Solution 6
module load namd/2.13 
srun `which namd2` water.namd > water_std.out 
Solution 7
mkdir -p ~/namd/water/output 
cp water_std.out  ~/namd/water/output/ 
Solution 8
sbatch water_std.slm  

More Specific Solution


Solution 9
#SBATCH -N 1 
#SBATCH -n 48

GPU Version Solution

Solution 1
#SBATCH -n 24 
#SBATCH –N 1 
#SBATCH -p gpu 
#SBATCH --gres=gpu:1 
Solution 2
`which namd2` > water_gpu.out 
mkdir -p ~/namd/water/output 
cp water_std.out  ~/namd/water/output/



  • No labels