diff --git a/easybuild/easyconfigs/v/VASP/VASP-6.4.3-nvofbf-2024.9-hdf5.eb b/easybuild/easyconfigs/v/VASP/VASP-6.4.3-nvofbf-2024.9-hdf5.eb new file mode 100644 index 000000000000..2618cf36f00c --- /dev/null +++ b/easybuild/easyconfigs/v/VASP/VASP-6.4.3-nvofbf-2024.9-hdf5.eb @@ -0,0 +1,85 @@ +# Updated to version 6.4.3 +# This version is without Wannier-90 support. +# Consequently, of the all test suite the testjobs requiring either will fail. +# All others passed on the L40s which were used. +# Author: J. Sassmannshausen (Imperial College London, UK) + +easyblock = 'MakeCp' + +name = 'VASP' +version = '6.4.3' +versionsuffix = '-hdf5' + +homepage = 'https://www.vasp.at' +description = """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.""" + +toolchain = {'name': 'nvofbf', 'version': '2024.9'} +toolchainopts = {'openmp': True} + +download_instructions = """Vasp is proprietary software, see http://www.vasp.at/index.php/faqs + on how to get access to the code.""" + +sources = ['%(namelower)s.%(version)s.tgz'] +patches = [ + # This patch replaces -Mscalapack with -lscalapack and adds the NVROOT path via ${EBROOTNVHPC} + # It also sets the GPU version (hardcoded, needs to be changed!) + # This is a bit WIP, see below + '%(namelower)s-%(version)s_nv-flags.patch', + # adding hdf5 support + '%(namelower)s-%(version)s_hdf5.patch', +] +checksums = [ + {'vasp.6.4.3.tgz': 'fe30e773f2a3e909b5e0baa9654032dfbdeff7ec157bc348cee7681a7b6c24f4'}, + {'vasp-6.4.3_nv-flags.patch': '0b21ed2e7fbafa03859cc0edca7d4673c08fe64ab930adb62c57ba2cd36123cd'}, + {'vasp-6.4.3_hdf5.patch': '9c5667eec45ea5ec6c37d7e7f5ce498f29c125d535feb78a2c38119ec3068122'}, +] + +dependencies = [ + ('HDF5', '1.14.5', '-serial'), +] + +prebuildopts = 'cp arch/makefile.include.nvhpc_omp_acc ./makefile.include && ' + +# Makefile uses LIBS as a list of folders +prebuildopts += 'unset LIBS && ' + +local_targets = ['std', 'gam', 'ncl'] + +buildopts = '%s ' % ' '.join(local_targets) +buildopts += 'FFTW_ROOT="${EBROOTFFTW}" ' +buildopts += 'DEPS=1 ' # required for VASP parallel builds + +# https://www.vasp.at/wiki/index.php/Validation_tests + +# it is recommended to run the testsuite with 4 MPI processes, +# but it's also recommended to use only 1 MPI process per GPU, +# so running the test on GPUs requires 4 GPUs? +local_test_mpiprocs = 4 + +pretestopts = 'export MPIRUN="mpirun -np %s -x OMP_NUM_THREADS=4 -x OMP_STACKSIZE=512m" && ' % local_test_mpiprocs +pretestopts += 'export LD_LIBRARY_PATH="${EBROOTNVHPC}/Linux_x86_64/${EBVERSIONNVHPC}/compilers/extras/qd/lib:$LD_LIBRARY_PATH" ' +pretestopts += 'export VASP_TESTSUITE_EXE_STD="$MPIRUN %(builddir)s/vasp.%(version)s/bin/vasp_std" && ' +pretestopts += 'export VASP_TESTSUITE_EXE_NCL="$MPIRUN %(builddir)s/vasp.%(version)s/bin/vasp_ncl" && ' +pretestopts += 'export VASP_TESTSUITE_EXE_GAM="$MPIRUN %(builddir)s/vasp.%(version)s/bin/vasp_gam" && ' + +# skip tests that are too long +local_test_skip = 'HEG_333_LW ' + +pretestopts += 'export VASP_TESTSUITE_SKIP_TESTS="%s" && ' % local_test_skip +runtest = 'test' +# Full test suite. Run this only when you got a day to spare or so! +# runtest = 'test_all' + +files_to_copy = [(['bin/vasp_' + x for x in local_targets], 'bin')] + +sanity_check_paths = { + 'files': ['bin/vasp_' + x for x in local_targets], + 'dirs': [] +} + +# This is needed as else libqdmod and libqd might not be found +modextrapaths = {'LD_LIBRARY_PATH': ':${EBROOTNVHPC}/Linux_x86_64/${EBVERSIONNVHPC}/compilers/extras/qd/lib'} + +moduleclass = 'phys' diff --git a/easybuild/easyconfigs/v/VASP/VASP-6.4.3-nvofbf-2024.9.eb b/easybuild/easyconfigs/v/VASP/VASP-6.4.3-nvofbf-2024.9.eb new file mode 100644 index 000000000000..73d7685c43ed --- /dev/null +++ b/easybuild/easyconfigs/v/VASP/VASP-6.4.3-nvofbf-2024.9.eb @@ -0,0 +1,89 @@ +# Updated to version 6.4.3 +# This version is without HDF5 support and Wannier-90. +# Consequently, of the all test suite the testjobs requiring either will fail. +# All others passed on the L40s which were used. +# Author: J. Sassmannshausen (Imperial College London, UK) + +easyblock = 'MakeCp' + +name = 'VASP' +version = '6.4.3' + +homepage = 'https://www.vasp.at' +description = """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.""" + +toolchain = {'name': 'nvofbf', 'version': '2024.9'} +toolchainopts = {'openmp': True} + +download_instructions = """Vasp is proprietary software, see http://www.vasp.at/index.php/faqs + on how to get access to the code.""" + +sources = ['%(namelower)s.%(version)s.tgz'] +patches = [ + # This patch replaces -Mscalapack with -lscalapack and adds the NVROOT path via ${EBROOTNVHPC} + # It also sets the GPU version (hardcoded, needs to be changed!) + # This is a bit WIP, see below + '%(namelower)s-%(version)s_nv-flags.patch', +] +checksums = [ + {'vasp.6.4.3.tgz': 'fe30e773f2a3e909b5e0baa9654032dfbdeff7ec157bc348cee7681a7b6c24f4'}, + {'vasp-6.4.3_nv-flags.patch': '0b21ed2e7fbafa03859cc0edca7d4673c08fe64ab930adb62c57ba2cd36123cd'}, +] + +prebuildopts = 'cp arch/makefile.include.nvhpc_omp_acc ./makefile.include && ' + +# Makefile uses LIBS as a list of folders +prebuildopts += 'unset LIBS && ' +# We would need something to automatically get the CUDA version and cc set, i.e. to +# have -gpu=cc89,cuda12.6 in the patch file automatically populated +# prebuildopts += 'export CUDA=${EBVERSIONCUDA} ; export CUDACOMPILER='$CUDACOMPILER} &&' + +local_targets = ['std', 'gam', 'ncl'] + +buildopts = '%s ' % ' '.join(local_targets) +buildopts += 'FFTW_ROOT="${EBROOTFFTW}" ' +buildopts += 'DEPS=1 ' # required for VASP parallel builds + +# https://www.vasp.at/wiki/index.php/Validation_tests + +# it is recommended to run the testsuite with 4 MPI processes, +# but it's also recommended to use only 1 MPI process per GPU, +# so running the test on GPUs requires 4 GPUs? +local_test_mpiprocs = 4 + +pretestopts = 'export MPIRUN="mpirun -np %s -x OMP_NUM_THREADS=4 -x OMP_STACKSIZE=512m" && ' % local_test_mpiprocs +pretestopts += 'export LD_LIBRARY_PATH="${EBROOTNVHPC}/Linux_x86_64/${EBVERSIONNVHPC}/compilers/extras/qd/lib:$LD_LIBRARY_PATH" ' +pretestopts += 'export VASP_TESTSUITE_EXE_STD="$MPIRUN %(builddir)s/vasp.%(version)s/bin/vasp_std" && ' +pretestopts += 'export VASP_TESTSUITE_EXE_NCL="$MPIRUN %(builddir)s/vasp.%(version)s/bin/vasp_ncl" && ' +pretestopts += 'export VASP_TESTSUITE_EXE_GAM="$MPIRUN %(builddir)s/vasp.%(version)s/bin/vasp_gam" && ' + +# skip tests that are too long +local_test_skip = 'HEG_333_LW ' + +# these tests are failing when using 4 L40S GPUs as the funtionality is not installed (HDF5, Wannier90, LibXC) +# when running *all* tests which takes over 1 day +# bulk_BN_PBExSCANc_Libxc bulk_BN_PBE_Libxc bulk_BN_SCAN_Libxc Co_2E4W_T Co_CRPAR_proj Co_CRPA_proj Co_CRPA_proj_RPR +# Co_CRPA_weighted Co_CRPA_weighted_RPR FeAl_CRPAR_T mlwf_lif_scdm mlwf_lif_scdm_optics mlwf_mos2_soc_locproj +# mlwf_mos2_soc_wannier90 mlwf_mos2_wannier90 mlwf_si_scdm NiO_2E4W SrVO3_CRPA_band_removal +# SrVO3_CRPA_band_removal_RPR SrVO3_CRPA_proj SrVO3_CRPA_proj_RPR SrVO3_CRPA_weighted SrVO3_CRPA_weighted_RPR +# SrVO3_NLRPA SrVO3_NLRPA_RPR + +pretestopts += 'export VASP_TESTSUITE_SKIP_TESTS="%s" && ' % local_test_skip +runtest = 'test' +# Full test suite which takes over 1 day on L40s +# runtest = 'test_all' + +files_to_copy = [(['bin/vasp_' + x for x in local_targets], 'bin')] + +sanity_check_paths = { + 'files': ['bin/vasp_' + x for x in local_targets], + 'dirs': [] +} + +# This is needed as else libqdmod and libqd might not be found +# This can be removed if and when NVHPC has been updated to include this path +modextrapaths = {'LD_LIBRARY_PATH': ':${EBROOTNVHPC}/Linux_x86_64/${EBVERSIONNVHPC}/compilers/extras/qd/lib'} + +moduleclass = 'phys' diff --git a/easybuild/easyconfigs/v/VASP/vasp-6.4.3_hdf5.patch b/easybuild/easyconfigs/v/VASP/vasp-6.4.3_hdf5.patch new file mode 100644 index 000000000000..f7178c0ca472 --- /dev/null +++ b/easybuild/easyconfigs/v/VASP/vasp-6.4.3_hdf5.patch @@ -0,0 +1,22 @@ +Replaces hardcoded paths with EasyBuild variables, enables HDF5 +Patch based on previous versions. +Author: J. Sassmannshausen (Imperial College London, UK) +diff --git a/vasp.6.4.3.orig/arch/makefile.include.nvhpc_omp_acc b/vasp.6.4.3/arch/makefile.include.nvhpc_omp_acc +index 8e98b4e..3014a1c 100644 +--- a/vasp.6.4.3.orig/arch/makefile.include.nvhpc_omp_acc ++++ b/vasp.6.4.3/arch/makefile.include.nvhpc_omp_acc +@@ -100,10 +100,10 @@ INCS += -I$(FFTW_ROOT)/include + #LLIBS += -cudalib=cusolvermp,cublasmp -lnvhpcwrapcal + + # HDF5-support (optional but strongly recommended) +-#CPP_OPTIONS+= -DVASP_HDF5 +-#HDF5_ROOT ?= /path/to/your/hdf5/installation +-#LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran +-#INCS += -I$(HDF5_ROOT)/include ++CPP_OPTIONS+= -DVASP_HDF5 ++HDF5_ROOT = ${EBROOTHDF5} ++LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran ++INCS += -I$(HDF5_ROOT)/include + + # For the VASP-2-Wannier90 interface (optional) + #CPP_OPTIONS += -DVASP2WANNIER90 diff --git a/easybuild/easyconfigs/v/VASP/vasp-6.4.3_nv-flags.patch b/easybuild/easyconfigs/v/VASP/vasp-6.4.3_nv-flags.patch new file mode 100644 index 000000000000..1e9b171a22f3 --- /dev/null +++ b/easybuild/easyconfigs/v/VASP/vasp-6.4.3_nv-flags.patch @@ -0,0 +1,46 @@ +Replaces hardcoded paths and options with EasyBuild variables. +Patch based on previous versions. +Author: J. Sassmannshausen (Imperial College London, UK) +diff --git a/vasp.6.4.3.orig/arch/makefile.include.nvhpc_omp_acc b/vasp.6.4.3/arch/makefile.include.nvhpc_omp_acc +index 8e98b4e..7ad4569 100644 +--- a/vasp.6.4.3.orig/arch/makefile.include.nvhpc_omp_acc ++++ b/vasp.6.4.3/arch/makefile.include.nvhpc_omp_acc +@@ -17,9 +17,9 @@ CPP = nvfortran -Mpreprocess -Mfree -Mextend -E $(CPP_OPTIONS) $*$(FUFFI + + # N.B.: you might need to change the cuda-version here + # to one that comes with your NVIDIA-HPC SDK +-CC = mpicc -acc -gpu=cc60,cc70,cc80,cuda11.8 -mp +-FC = mpif90 -acc -gpu=cc60,cc70,cc80,cuda11.8 -mp +-FCL = mpif90 -acc -gpu=cc60,cc70,cc80,cuda11.8 -mp -c++libs ++CC = mpicc -acc -gpu=cc89,cuda12.6 -mp ++FC = mpif90 -acc -gpu=cc89,cuda12.6 -mp ++FCL = mpif90 -acc -gpu=cc89,cuda12.6 -mp -c++libs + + FREE = -Mfree + +@@ -62,12 +62,12 @@ FFLAGS += $(VASP_TARGET_CPU) + + # Specify your NV HPC-SDK installation (mandatory) + #... first try to set it automatically +-NVROOT =$(shell which nvfortran | awk -F /compilers/bin/nvfortran '{ print $$1 }') ++# NVROOT =$(shell which nvfortran | awk -F /compilers/bin/nvfortran '{ print $$1 }') + + # If the above fails, then NVROOT needs to be set manually +-#NVHPC ?= /opt/nvidia/hpc_sdk +-#NVVERSION = 21.11 +-#NVROOT = $(NVHPC)/Linux_x86_64/$(NVVERSION) ++NVHPC = ${EBROOTNVHPC} ++NVVERSION = ${EBVERSIONNVHPC} ++NVROOT = $(NVHPC)/Linux_x86_64/$(NVVERSION) + + ## Improves performance when using NV HPC-SDK >=21.11 and CUDA >11.2 + #OFLAG_IN = -fast -Mwarperf +@@ -85,7 +85,7 @@ BLAS = -lblas + LAPACK = -llapack + + # scaLAPACK (mandatory) +-SCALAPACK = -Mscalapack ++SCALAPACK = -lscalapack + + LLIBS += $(SCALAPACK) $(LAPACK) $(BLAS) +