Container¶
Container is used to reproduce a code on a new machine. You can run VASP through Singularity container if you want to run it using GPU. A container is started from a pre-built container image. Building a container image is tedius. Luckily, we have already built VASP images and they're hosting on DockerHub.
Pull VASP from DockerHub¶
Below is an example to pull it from DockerHub for NUS-HPC volta GPU (atlas8 and atlas9) and you can find VASP for other platform on DockerHub.
Then you can load singularity.SINGULARITY is the name you obtained from module avail singularity.
singularity pull nushpc_volta_nvhpc24.3_cuda12.3_6.4.3.sif docker://dengzeyu/vasp-6.4.3:nvhpc24.7-cuda12.5-volta
Network problem for NUSHPC
You might find that the network (SSL) is not working while pulling this image from the DockerHub. In that case, you can build on your own machine and then use scp to upload to NUSHPC.
You can find an example submission script here.
Run VASP in a container using Singularity¶
Below is an example of running VASP using a single GPU. You should put this inside the submission script.
export OMPI_MCA_hwloc_base_binding_policy=none # (1)!
export OMP_STACK_SIZE=4096m
singularity exec --nv nushpc_volta_nvhpc24.3_cuda12.3_6.4.3.sif mpirun -n 1 /opt/vasp/bin/vasp_std
- The first two lines are kept there to make sure you have a better performance.