AMD Zen Software Studio with Spack
- AMD Optimizing C/C++ Compiler (AOCC)
- AMD Optimizing CPU Libraries (AOCL)
- AMD uProf
- Setting Preference for AMD Zen Software Studio
Open MPI with AMD Zen Software Studio
Micro Benchmarks/Synthetic Benchmarks
Spack HPC Applications
Introduction
The Vienna Ab initio Simulation Package (VASP) is a computer program for atomic scale materials modelling, e.g. electronic structure calculations and quantum-mechanical molecular dynamics, from first principles.
Official Website for VASP®: https://vasp.at
Getting VASP Source Code
VASP® is copyright-protected software, users need to purchase a VASP license to access the software package. Hence, a manual download is required for VASP. Spack will search your current working directory for the download files.
Steps to download VASP is available at: FAQs (vasp.at)
Build VASP using Spack
Please refer to this link for getting started with spack using AMD Zen Software Studio
# Building VASP with AOCC
$ spack install vasp +openmp +fftlib %aocc ^amdfftw ^amdblis threads=openmp ^amdlibflame ^amdscalapack ^openmpi fabrics=cma,ucx
Explanation of the command options
Symbol |
Meaning |
---|---|
%aocc | Build VASP using the AOCC compiler. |
+openmp | Build VASP with OpenMP support enabled. |
^amdfftw | Use amdfftw as the FFTW implementation. |
^amdscalapack | Use amdscalapack as the SCALAPACK implementation. |
^amdblis threads=openmp | Use amdblis as the BLAS implementation with OpenMP support. |
^amdlibflame | Use amdlibflame as the LAPACK implementation. |
^openmpi fabrics=cma,ucx | Use OpenMPI as the MPI provider and use the CMA network for efficient intra-node communication, falling back to the UCX network fabric, if required. Note: It is advised to specifically set the appropriate fabric for the host system if possible. Refer to Open MPI with AMD Zen Software Studio for more guidance. |
Running VASP
The following example illustrates the running of VASP with Si256_VJT_HSE06 dataset.
Run Script for AMD EPYC™ Processors
#!/bin/bash
# Loading vasp build with AOCC
spack load vasp %aocc
# Si256 dataset is available with VASP source at testsuite/tests/Si256_VJT_HSE06
VASP_SOURCE=<Path to the VASP source file>
cd ${VASP_SOURCE}/testsuite/tests/Si256_VJT_HSE06
# Steps to setup the input files for run
cp INCAR.1.STD INCAR
cp ${VASP_SOURCE}/testsuite/POTCARS/POTCAR.Si256_VJT_HSE06 POTCAR
# Mapping of process to hardware resources
# For AMD EPYC processors it is recommended to use a single rank per L3 cache
# and set OMP_NUM_THREADS to the number of cores per L3 cache. Below is the example
# for processors with 8 cores per L3 cache, hence using OMP_NUM_THREADS=8
CORES_PER_L3CACHE=8
NUM_CORES=$(nproc)
export OMP_NUM_THREADS=${CORES_PER_L3CACHE} # 8 threads per MPI rank. Recommended OMP_NUM_THREADS= #cores per L3 cache
MPI_RANKS=$(( $NUM_CORES / $OMP_NUM_THREADS ))
RANKS_PER_L3CACHE=$(( $CORES_PER_L3CACHE / $OMP_NUM_THREADS ))
MPI_OPTS=”-np $MPI_RANKS --map-by ppr:$RANKS_PER_L3CACHE:l3cache:pe=$OMP_NUM_THREADS”
# Running VASP
mpirun $MPI_OPTS vasp_std
Note: The above build and run steps are tested with VASP-6.4.3, AOCC-5.0.0, AOCL-5.0.0, and OpenMPI-5.0.5 on Red Hat Enterprise Linux release 8.9 (Ootpa) using Spack v0.23.0.dev0 (commit id : 2da812cbad ).
For technical support on the tools, benchmarks and applications that AMD offers on this page and related inquiries, reach out to us at toolchainsupport@amd.com.