From 8dcb965f9cd118726c9ed97dc4f199b19609da57 Mon Sep 17 00:00:00 2001 From: Jakub Kropacek Date: Mon, 15 Aug 2022 14:53:44 +0200 Subject: [PATCH] new file: d/DL_MG/DL_MG-2.1.4-intel-2021b.eb new file: d/DL_MG/DL_MG-3.0.0-intel-2021b-disable-openmp.patch new file: d/DL_MG/DL_MG-3.0.0-intel-2021b.eb new file: i/iimpi/iimpi-2021b-VASP-SCPC.eb new file: p/PSPFFT/PSPFFT-1.0-intel-2021b.eb new file: p/PSPFFT/pspfft-1.0-intel-2021b-makefile-setup.patch new file: p/phonopy/phonopy-2.15.1-conda.eb new file: v/VASP/VASP-6.3.2-intel-2021b-SCPC.eb deleted: p/phonopy/phonopy-2.15.0-conda.eb --- d/DL_MG/DL_MG-2.1.4-intel-2021b.eb | 37 +++++++ ..._MG-3.0.0-intel-2021b-disable-openmp.patch | 12 +++ d/DL_MG/DL_MG-3.0.0-intel-2021b.eb | 37 +++++++ i/iimpi/iimpi-2021b-VASP-SCPC.eb | 21 ++++ p/PSPFFT/PSPFFT-1.0-intel-2021b.eb | 39 ++++++++ ...spfft-1.0-intel-2021b-makefile-setup.patch | 48 ++++++++++ ....15.0-conda.eb => phonopy-2.15.1-conda.eb} | 2 +- v/VASP/VASP-6.3.2-intel-2021b-SCPC.eb | 96 +++++++++++++++++++ 8 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 d/DL_MG/DL_MG-2.1.4-intel-2021b.eb create mode 100644 d/DL_MG/DL_MG-3.0.0-intel-2021b-disable-openmp.patch create mode 100644 d/DL_MG/DL_MG-3.0.0-intel-2021b.eb create mode 100644 i/iimpi/iimpi-2021b-VASP-SCPC.eb create mode 100644 p/PSPFFT/PSPFFT-1.0-intel-2021b.eb create mode 100644 p/PSPFFT/pspfft-1.0-intel-2021b-makefile-setup.patch rename p/phonopy/{phonopy-2.15.0-conda.eb => phonopy-2.15.1-conda.eb} (96%) create mode 100644 v/VASP/VASP-6.3.2-intel-2021b-SCPC.eb diff --git a/d/DL_MG/DL_MG-2.1.4-intel-2021b.eb b/d/DL_MG/DL_MG-2.1.4-intel-2021b.eb new file mode 100644 index 00000000..60e43b2b --- /dev/null +++ b/d/DL_MG/DL_MG-2.1.4-intel-2021b.eb @@ -0,0 +1,37 @@ +# IT4Innovations 2022 +# JK + +easyblock = 'MakeCp' + +name = 'DL_MG' +version = '2.1.4' + +homepage = 'https://bitbucket.org/dlmgteam/dl_mg_code_public/src/master/' +description = """DL_MG is a parallel (MPI+OpenMP) 3D geometric high order finite difference multigrid solver for Poisson and Poisson-Boltzmann Equations written in Fortran.""" + +toolchain = {'name': 'intel', 'version': '2021b'} +toolchainopts = {'usempi': True, 'openmp': False} + +sources = ['dlmg-v%(version)s.tar.gz'] +patches = ['DL_MG-3.0.0-intel-2021b-disable-openmp.patch'] +checksums = [ + 'c025fe3c2f8ea69404e762619ebd514c85532a33065912758cca1c1a3d705e10', # dlmg-v2.1.4.tar.gz + '2a26acffb55095936147a8ef5db2105d691d257a86106e5459913403eb0c7380', # DL_MG-3.0.0-intel-2021b-disable-openmp.patch +] + +# have to disable openmp for VASP to link against DL_MG library +buildopts = ' PLATFORM=RH65_workstation_intel16_intelmpi USE_MPI=yes ' + +files_to_copy = '' + +postinstallcmds = [ + ' mkdir %(installdir)s/lib ', + ' cp %(builddir)s/dlmg-v%(version)s/lib/* %(installdir)s/lib ' +] + +sanity_check_paths = { + 'files': ['lib/libdlmg.a', 'lib/dl_mg.mod'], + 'dirs': ['lib'] +} + +moduleclass = 'phys' diff --git a/d/DL_MG/DL_MG-3.0.0-intel-2021b-disable-openmp.patch b/d/DL_MG/DL_MG-3.0.0-intel-2021b-disable-openmp.patch new file mode 100644 index 00000000..89112b74 --- /dev/null +++ b/d/DL_MG/DL_MG-3.0.0-intel-2021b-disable-openmp.patch @@ -0,0 +1,12 @@ +diff -Nru dlmg-v3.0.0.orig/platforms/RH65_workstation_intel16_intelmpi.inc dlmg-v3.0.0/platforms/RH65_workstation_intel16_intelmpi.inc +--- dlmg-v3.0.0.orig/platforms/RH65_workstation_intel16_intelmpi.inc 2022-08-12 12:03:32.077512000 +0200 ++++ dlmg-v3.0.0/platforms/RH65_workstation_intel16_intelmpi.inc 2022-08-12 12:04:27.322557000 +0200 +@@ -17,7 +17,7 @@ + COMP := intel + BUILD := opt + +-USE_OPENMP = yes ++USE_OPENMP = no + + MPIFLAGS := -DMPI + diff --git a/d/DL_MG/DL_MG-3.0.0-intel-2021b.eb b/d/DL_MG/DL_MG-3.0.0-intel-2021b.eb new file mode 100644 index 00000000..ddf2d0a8 --- /dev/null +++ b/d/DL_MG/DL_MG-3.0.0-intel-2021b.eb @@ -0,0 +1,37 @@ +# IT4Innovations 2022 +# JK + +easyblock = 'MakeCp' + +name = 'DL_MG' +version = '3.0.0' + +homepage = 'https://bitbucket.org/dlmgteam/dl_mg_code_public/src/master/' +description = """DL_MG is a parallel (MPI+OpenMP) 3D geometric high order finite difference multigrid solver for Poisson and Poisson-Boltzmann Equations written in Fortran.""" + +toolchain = {'name': 'intel', 'version': '2021b'} +toolchainopts = {'usempi': True, 'openmp': False} + +sources = ['dlmg-v%(version)s.tar.gz'] +patches = ['DL_MG-3.0.0-intel-2021b-disable-openmp.patch'] +checksums = [ + '5f70339c35e5dfd4b25935570b95798391c6aceef23ccfe68cc2b1a2406c409d', # dlmg-v3.0.0.tar.gz + '2a26acffb55095936147a8ef5db2105d691d257a86106e5459913403eb0c7380', # DL_MG-3.0.0-intel-2021b-disable-openmp.patch +] + +# have to disable openmp for VASP to link against DL_MG library +buildopts = ' PLATFORM=RH65_workstation_intel16_intelmpi USE_MPI=yes ' + +files_to_copy = '' + +postinstallcmds = [ + ' mkdir %(installdir)s/lib ', + ' cp %(builddir)s/dlmg-v%(version)s/lib/* %(installdir)s/lib ' +] + +sanity_check_paths = { + 'files': ['lib/libdlmg.a', 'lib/dl_mg.mod'], + 'dirs': ['lib'] +} + +moduleclass = 'phys' diff --git a/i/iimpi/iimpi-2021b-VASP-SCPC.eb b/i/iimpi/iimpi-2021b-VASP-SCPC.eb new file mode 100644 index 00000000..c6e30a35 --- /dev/null +++ b/i/iimpi/iimpi-2021b-VASP-SCPC.eb @@ -0,0 +1,21 @@ +# This is an easyconfig file for EasyBuild, see http://easybuilders.github.io/easybuild +easyblock = 'Toolchain' + +name = 'iimpi' +version = '2021b' +versionsuffix = '-VASP-SCPC' + +homepage = 'https://software.intel.com/parallel-studio-xe' +description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" + +toolchain = SYSTEM + +local_comp_ver = '2021.4.0' +dependencies = [ + ('intel-compilers', local_comp_ver), + ('impi', local_comp_ver, '', ('intel-compilers', local_comp_ver)), +] + +buildopts = "-mt_mpi MPI_THREAD_MULTIPLE" + +moduleclass = 'toolchain' diff --git a/p/PSPFFT/PSPFFT-1.0-intel-2021b.eb b/p/PSPFFT/PSPFFT-1.0-intel-2021b.eb new file mode 100644 index 00000000..7ff87f88 --- /dev/null +++ b/p/PSPFFT/PSPFFT-1.0-intel-2021b.eb @@ -0,0 +1,39 @@ +# IT4Innovations 2022 +# JK + +easyblock = 'MakeCp' + +name = 'PSPFFT' +version = '1.0' + +homepage = 'http://eagle.phys.utk.edu/pspfft/trac/' +description = """PSPFFT is a library to solve Poisson's equation for an isolated system on a three-dimensional unigrid mesh using FFTs. The solver is parallelized using MPI. An arbitrary number of processors may be used (subject to some constraints). The program has been tested on from 1 up to 13,000 MPI processes.""" + +toolchain = {'name': 'intel', 'version': '2021b'} +toolchainopts = {'usempi': True, 'openmp': False} + +source_urls = ['http://eagle.phys.utk.edu/pspfft/trac/raw-attachment/wiki/Download/'] +sources = ['%(namelower)s-%(version)s.tar.gz'] +patches = ['pspfft-1.0-intel-2021b-makefile-setup.patch'] +checksums = [ + '8cd62f350271af54cf7d3119201cbdff3e26cd6447558f79e3711b8f8a9e0207', # pspfft-1.0.tar.gz + '849abfb25aee9c85926e30f4e92d2f53b83f8f389572d7369aacb627e16253a1', # pspfft-1.0-intel-2021b-makefile-setup.patch +] + +build_cmd = 'cd Build && make ' +postinstallcmds = [ + ' cd Build && make install && cd ../ ', + ' mkdir -p %(installdir)s/lib ', + ' mkdir -p %(installdir)s/include ', + ' cp %(builddir)s/%(namelower)s-%(version)s/install/include/* %(installdir)s/include ', + ' cp %(builddir)s/%(namelower)s-%(version)s/install/lib/libpspfft.a %(installdir)s/lib ' +] + +files_to_copy = '' + +sanity_check_paths = { + 'files': ['lib/libpspfft.a'], + 'dirs': ['lib', 'include'] +} + +moduleclass = 'phys' diff --git a/p/PSPFFT/pspfft-1.0-intel-2021b-makefile-setup.patch b/p/PSPFFT/pspfft-1.0-intel-2021b-makefile-setup.patch new file mode 100644 index 00000000..7b184583 --- /dev/null +++ b/p/PSPFFT/pspfft-1.0-intel-2021b-makefile-setup.patch @@ -0,0 +1,48 @@ +diff -Nru pspfft-1.0.orig/Config/Makefile_Build pspfft-1.0/Config/Makefile_Build +--- pspfft-1.0.orig/Config/Makefile_Build 2022-08-10 11:00:54.307622000 +0200 ++++ pspfft-1.0/Config/Makefile_Build 2022-08-10 11:11:57.981694000 +0200 +@@ -8,5 +8,5 @@ + VPATH = $(VPATH_SOURCES):../ + OBJECTS = $(SOURCES) + +-INCLUDE = $(INCLUDE_FFTW) $(INCLUDE_SILO) +-LIBRARIES = $(LIBRARY_FFTW) $(LIBRARY_SILO) ++INCLUDE = $(INCLUDE_FFTW) ++LIBRARIES = $(LIBRARY_FFTW) +diff -Nru pspfft-1.0.orig/Config/Makefile_Config pspfft-1.0/Config/Makefile_Config +--- pspfft-1.0.orig/Config/Makefile_Config 2022-08-10 11:00:54.288126000 +0200 ++++ pspfft-1.0/Config/Makefile_Config 2022-08-10 11:48:36.017884000 +0200 +@@ -1,25 +1,25 @@ + # Sample + + #-- Specify compilers and appropriate flags +-C_COMPILE = mpicc -c ++C_COMPILE = mpiicc -c + C_DEBUG = -g -Wall + C_OPTIMIZE = -O3 + +-FORTRAN_COMPILE = mpif90 -c ++FORTRAN_COMPILE = mpiifort -c + FORTRAN_DEBUG = -g -gdwarf-2 -ffpe-trap=invalid,zero,overflow -Wall + FORTRAN_OPTIMIZE = -O3 + + #-- Specify linker to link the Fortran Test programs with. +-LINK = mpif90 ++LINK = mpiifort + + #-- Specify location of FFTW library. +-INCLUDE_FFTW = -I /usr/include +-LIBRARY_FFTW = -L /usr/lib64 -lfftw3 ++INCLUDE_FFTW = -I ${EBDEVELIMKLMINFFTW} ++LIBRARY_FFTW = -L ${EBROOTIMKLMINFFTW}/lib -lfftw3xf_intel + + #-- Specify location of Silo library. This is only necessary to compile + # & run Test programs. PSPFFT itself does not need this. +-INCLUDE_SILO = -I /usr/local/silo/4.7.2/gcc/include +-LIBRARY_SILO = -L /usr/local/silo/4.7.2/gcc/lib -lsilo ++#INCLUDE_SILO = -I /usr/local/silo/4.7.2/gcc/include ++#LIBRARY_SILO = -L /usr/local/silo/4.7.2/gcc/lib -lsilo + + #-- Specify the directory to install PSPFFT +-INSTALL = /usr/local/pspfft/1.0/${PE} ++INSTALL = ../install diff --git a/p/phonopy/phonopy-2.15.0-conda.eb b/p/phonopy/phonopy-2.15.1-conda.eb similarity index 96% rename from p/phonopy/phonopy-2.15.0-conda.eb rename to p/phonopy/phonopy-2.15.1-conda.eb index a12ff5ac..b415aed7 100644 --- a/p/phonopy/phonopy-2.15.0-conda.eb +++ b/p/phonopy/phonopy-2.15.1-conda.eb @@ -4,7 +4,7 @@ easyblock = "Conda" name = 'phonopy' -version = '2.15.0' +version = '2.15.1' versionsuffix = '-conda' homepage = 'http://phonopy.sourceforge.net/phono3py/index.html' diff --git a/v/VASP/VASP-6.3.2-intel-2021b-SCPC.eb b/v/VASP/VASP-6.3.2-intel-2021b-SCPC.eb new file mode 100644 index 00000000..57f467cf --- /dev/null +++ b/v/VASP/VASP-6.3.2-intel-2021b-SCPC.eb @@ -0,0 +1,96 @@ +# IT4Innovations 2022 +# JK LK + +easyblock = 'MakeCp' + +name = 'VASP' +version = '6.3.2' +versionsuffix = '-SCPC' + +homepage = 'http://www.vasp.at' +docurls = 'https://www.vasp.at/wiki/index.php/The_VASP_Manual' +description = """The Vienna Ab initio Simulation Package (VASP) is a local computer program for atomic scale +materials modelling, e.g. electronic structure calculations and quantum-mechanical molecular dynamics, +from first principles. + +This module has been modified to include the SCPC method. Please note that vasp_ncl is unstable and therefore not included. + +To use VASP, you need an academic license from University of Vienna. Follow the instructions at https://www.vasp.at/index.php/faqs. + +Please send us a list of authorized users and their IDs for which you need access (use only http://support.it4i.cz/rt). We are responsible for verifying your licenses.""" + +toolchain = {'name': 'intel', 'version': '2021b'} +toolchainopts = {'pic': True, 'usempi': True} + +# 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'] +checksums = ['f7595221b0f9236a324ea8afe170637a578cdd5a837cc7679e7f7812f6edf25a'] + +# use serial compilation of W90, see https://www.vasp.at/wiki/index.php/Makefile.include#Wannier90_.28optional.29 +# Important: In case of Wannier90 3.x, you should compile a serial version by removing COMMS=mpi in the make.inc of Wannier90. +dependencies = [ + ('HDF5', '1.12.1', '-parallel'), + ('Wannier90', '3.1.0', '-serial'), + ('DL_MG', '2.1.4'), # use v2.1.4 because of segfaults with newer versions + ('PSPFFT', '1.0'), +] + +prebuildopts = 'cp arch/makefile.include.intel ./makefile.include && ' + +# OFLAG to -O3 -march +prebuildopts += 'sed -i "s|\(OFLAG\s\+=\) -O2|\\1 -O3 -ip -march=xHost|" makefile.include && ' + +# OBJECTS, FFLAGS and MKLROOT +prebuildopts += 'sed -i "s|\(OBJECTS\s\+=\) fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o|\\1 fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o ${EBROOTIMKLMINFFTW}/lib/libfftw3xf_intel.a|" makefile.include && ' +prebuildopts += 'sed -i "s|\(FFLAGS\s\+=\) -assume byterecl -w|\\1 -FR -assume byterecl|" makefile.include && ' +prebuildopts += 'sed -i "s|\(MKLROOT\s\+?=\) /path/to/your/mkl/installation|\\1 ${MKLROOT}|" makefile.include && ' + +# HDF5 support +prebuildopts += 'sed -i "/DVASP_HDF5/,+s|^#||" makefile.include && ' +prebuildopts += 'sed -i "s|#\(HDF5_ROOT\s\+?=\) /path/to/your/hdf5/installation|\\1 ${EBROOTHDF5}|" makefile.include && ' +prebuildopts += 'sed -i "/L\$(HDF5_ROOT)\/lib -lhdf5_fortran/,+s|^#||" makefile.include && ' +prebuildopts += 'sed -i "/I\$(HDF5_ROOT)\/include/,+s|^#||" makefile.include && ' + +# Wannier90 interface +prebuildopts += 'sed -i "/DVASP2WANNIER90/,+s|^#||" makefile.include && ' +prebuildopts += 'sed -i "s|#\(WANNIER90_ROOT\s\+?=\) /path/to/your/wannier90/installation|\\1 ${EBROOTWANNIER90}|" makefile.include && ' +prebuildopts += 'sed -i "/L\$(WANNIER90_ROOT)\/lib -lwannier/,+s|^#||" makefile.include && ' + +# SCPC method +prebuildopts += 'sed -i "s|\(CPP_OPTIONS\s\+=\)|\\1 -DSCPC|" makefile.include && ' +prebuildopts += 'echo "" >> makefile.include && ' +prebuildopts += 'echo "#SCPC METHOD" >> makefile.include && ' +#prebuildopts += 'echo "LIBEXT = /apps/all" >> makefile.include && ' +prebuildopts += 'echo "DLMGROOT = ${EBROOTDL_MG}" >> makefile.include && ' +prebuildopts += 'echo "PSPFFTROOT = ${EBROOTPSPFFT}" >> makefile.include && ' +prebuildopts += 'echo "INCS +=-I\$(DLMGROOT)/lib" >> makefile.include && ' +prebuildopts += 'echo "INCS +=-I\$(PSPFFTROOT)/include" >> makefile.include && ' +prebuildopts += 'echo "LLIBS +=-Wl,--start-group \$(DLMGROOT)/lib/libdlmg.a -Wl,--end-group" >> makefile.include && ' +prebuildopts += 'echo "LLIBS +=-Wl,--start-group \$(PSPFFTROOT)/lib/libpspfft.a -Wl,--end-group" >> makefile.include && ' +prebuildopts += 'echo "#SCPC METHOD" >> makefile.include && ' + +# AMD/intel cpu +import os +if os.environ.get("CLUSTERNAME") in ["KAROLINA"]: + prebuildopts += 'sed -i "s|-xHOST|-march=core-avx2|" makefile.include && ' + prebuildopts += 'sed -i "s|-march=xHost|-march=core-avx2|" makefile.include && ' + + +# VASP uses LIBS as a list of folders +prebuildopts += 'unset LIBS && ' + +buildopts = 'std gam ' + +parallel = 1 + +files_to_copy = [(['bin/vasp_std', 'bin/vasp_gam'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/vasp_std', 'bin/vasp_gam'], + 'dirs': [] +} + +modluafooter = 'add_property("state","license")' + +moduleclass = 'phys'