From a45acea3037ae0690c4dbe8c63ff50ae724a502b Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Wed, 3 Jan 2024 12:59:09 +0800 Subject: [PATCH 1/4] adding easyconfigs: BerkeleyGW-3.1.0-foss-2022a.eb and patches: BerkeleyGW-3.1.0_tests.patch --- .../BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb | 34 +++++ .../b/BerkeleyGW/BerkeleyGW-3.1.0_tests.patch | 131 ++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb create mode 100644 easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_tests.patch diff --git a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb new file mode 100644 index 00000000000..4653db0fdb7 --- /dev/null +++ b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb @@ -0,0 +1,34 @@ +name = 'BerkeleyGW' +version = '3.1.0' + +homepage = 'https://www.berkeleygw.org' +description = """The BerkeleyGW Package is a set of computer codes that calculates the quasiparticle + properties and the optical responses of a large variety of materials from bulk periodic crystals to + nanostructures such as slabs, wires and molecules.""" + +toolchain = {'name': 'foss', 'version': '2022a'} +toolchainopts = {'usempi': True, 'openmp': True} + +source_urls = ['https://files.berkeleygw.org/'] +sources = [SOURCE_TAR_GZ] +patches = [ + 'BerkeleyGW-3.1.0_tests.patch', + 'BerkeleyGW-3.0.1_makefile.patch', +] +checksums = [ + {'BerkeleyGW-3.1.0.tar.gz': '7e890a5faa5a6bb601aa665c73903b3af30df7bdd13ee09362b69793bbefa6d2'}, + {'BerkeleyGW-3.1.0_tests.patch': 'ef73cb7b69a6aad0da90538ef673e978e159d96e62147a304780b1ec25a4c156'}, + {'BerkeleyGW-3.0.1_makefile.patch': '56d90dc4e43db379441b6a1802e24f1f1356cd4aca4eb6d8b673f6c7926a7406'}, +] + +dependencies = [ + ('ELPA', '2021.11.001'), + ('Perl', '5.34.1'), + ('Python', '3.10.4'), + ('h5py', '3.7.0'), + ('fftlib', '20170628'), +] + +runtest = True + +moduleclass = 'phys' diff --git a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_tests.patch b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_tests.patch new file mode 100644 index 00000000000..924cfdf2b00 --- /dev/null +++ b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_tests.patch @@ -0,0 +1,131 @@ +* allow test scripts to inherit environment +* set stack size ulimit to unlimited +* slightly raise tolerance in some tests +author: Miguel Dias Costa (National University of Singapore) +--- testsuite/run_testsuite.sh.orig 2019-07-25 14:48:12.000000000 +0800 ++++ testsuite/run_testsuite.sh 2019-07-25 14:47:50.000000000 +0800 +@@ -1,4 +1,4 @@ +-#!/bin/bash -l ++#!/bin/bash + # + # Copyright (C) 2005-2009 Heiko Appel, David Strubbe + # +--- testsuite/run_testsuite.sh.orig 2021-01-14 13:52:07.312389000 +0800 ++++ testsuite/run_testsuite.sh 2021-01-14 14:00:31.592579000 +0800 +@@ -66,6 +66,8 @@ + # Run all tests. Takes as first argument a list of testfile names. + function run_testsuite() { + ++ulimit -s unlimited ++ + tests="$1" + + # Check for 'preserve working directories' flag. + +--- MeanField/Utilities/mf_convert_wrapper.sh.orig 2019-07-26 09:52:27.648341000 +0800 ++++ MeanField/Utilities/mf_convert_wrapper.sh 2019-07-26 09:52:39.922114228 +0800 +@@ -1,4 +1,4 @@ +-#!/bin/bash -l ++#!/bin/bash + + # David Strubbe, October 2010 + # Wrapper for mf_convert.x +--- testsuite/GaAs-EPM/GaAs.test.orig 2019-07-26 10:45:19.798520000 +0800 ++++ testsuite/GaAs-EPM/GaAs.test 2019-07-26 10:45:37.753775275 +0800 +@@ -32,7 +32,7 @@ + Output : WFN.out + Input : WFN.in PIPE + +-Precision : 8e-15 ++Precision : 9e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.2710614199849328 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.2565373697755460 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.1322637363008994 +--- testsuite/Si-EPM/Si.test.orig 2021-01-14 14:45:33.627112000 +0800 ++++ testsuite/Si-EPM/Si.test 2021-01-14 14:46:33.049539000 +0800 +@@ -16,7 +16,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/Si-EPM/Si_cplx_spin.test.orig 2019-07-17 07:20:29.000000000 +0800 ++++ testsuite/Si-EPM/Si_cplx_spin.test 2021-01-14 14:46:51.922928000 +0800 +@@ -17,7 +17,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/Si-EPM_subspace/Si_subspace.test.orig 2019-07-17 07:20:32.000000000 +0800 ++++ testsuite/Si-EPM_subspace/Si_subspace.test 2021-01-14 14:47:15.433562000 +0800 +@@ -20,7 +20,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/Si-EPM_subspace/Si_subspace_cplx_spin.test.orig 2019-07-17 07:20:32.000000000 +0800 ++++ testsuite/Si-EPM_subspace/Si_subspace_cplx_spin.test 2021-01-14 14:47:30.610030000 +0800 +@@ -21,7 +21,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/Si-EPM_subspace/Si_subspace_cplx.test.orig 2019-07-17 07:20:32.000000000 +0800 ++++ testsuite/Si-EPM_subspace/Si_subspace_cplx.test 2021-01-14 14:47:45.250225000 +0800 +@@ -20,7 +20,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/Si-EPM/Si_hdf5_cplx_spin.test.orig 2021-10-27 09:15:36.543399656 +0800 ++++ testsuite/Si-EPM/Si_hdf5_cplx_spin.test 2021-10-27 09:16:19.549009302 +0800 +@@ -17,7 +17,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/Si-EPM/Si_hdf5.test.orig 2021-10-27 09:17:11.134541236 +0800 ++++ testsuite/Si-EPM/Si_hdf5.test 2021-10-27 09:17:28.086387460 +0800 +@@ -16,7 +16,7 @@ + Output : WFN.out + Input : WFN.in PIPE NOCOPY + +-Precision : 6e-15 ++Precision : 7e-15 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.1283435360829054 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.3282472551260550 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.3490532646407310 +--- testsuite/GaAs-EPM/GaAs.test.orig 2024-01-03 11:40:10.045425888 +0800 ++++ testsuite/GaAs-EPM/GaAs.test 2024-01-03 11:41:04.884166571 +0800 +@@ -32,7 +32,7 @@ + Output : WFN.out + Input : WFN.in PIPE + +-Precision : 9e-15 ++Precision : 9e-14 + match ; Eigenvalue 1 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 1); -0.2710614199849328 + match ; Eigenvalue 10 at k-pt 1 ; GREP(WFN.out, "kpoint 1", 2, 10); 1.2565373697755460 + match ; Eigenvalue 18 at k-pt 2 ; GREP(WFN.out, "kpoint 2", 2, 18); 2.1322637363008994 From 398751c3d8dfa7d3299fb771486e82044dab35c7 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Wed, 3 Jan 2024 13:19:18 +0800 Subject: [PATCH 2/4] add fftlib easyconfig --- .../f/fftlib/fftlib-20170628-gompi-2022a.eb | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 easybuild/easyconfigs/f/fftlib/fftlib-20170628-gompi-2022a.eb diff --git a/easybuild/easyconfigs/f/fftlib/fftlib-20170628-gompi-2022a.eb b/easybuild/easyconfigs/f/fftlib/fftlib-20170628-gompi-2022a.eb new file mode 100644 index 00000000000..9661081a3f2 --- /dev/null +++ b/easybuild/easyconfigs/f/fftlib/fftlib-20170628-gompi-2022a.eb @@ -0,0 +1,45 @@ +easyblock = 'MakeCp' + +name = 'fftlib' +version = '20170628' +local_commit = '44c5fa0' + +homepage = 'https://github.com/flwende/fftlib' +description = """A library that intercepts FFTW calls and adds features on top of it. + In particular, it enables FFT plan reuse when there are multiple calls for the same geometry.""" + +toolchain = {'name': 'gompi', 'version': '2022a'} +toolchainopts = {'openmp': True, 'cstd': 'c++11'} + +source_urls = ['https://github.com/flwende/fftlib/archive/'] +sources = [{'download_filename': '%s.zip' % local_commit, 'filename': SOURCE_ZIP}] +checksums = ['f73dffeaf5c2e6972a5bc67d11ec28390f9eda281a7cb47edc1ee2fe394ed057'] + +dependencies = [('FFTW', '3.3.10')] + +local_options = "-DFFTLIB_THREADSAFE " # use this when multiple threads access fftlib +# local_options += "-DFFTLIB_USE_MKL " # use symbols from MKL's fft library +# local_options += "-DFFTLIB_BYPASS " # bypass fftlib's internal logic +# local_options += "-DFFTLIB_OWN_LOCK " # use fftlib's reader/writer lock +# local_options += "-DFFTLIB_UNSAFE_OPT " # activate unsafe optimizations in fftlib +# local_options += "-DFFTLIB_DEBUG " # print debug messages (infos and warnings) +# local_options += "-DFFTLIB_WARNINGS_ONLY " # print warnings only +# local_options += "-DFFTLIB_COMPOSED_FFT " # split 3d FFT computation into 2d+1d FFT + +start_dir = 'src' + +parallel = False + +build_cmd = "$CXX $CXXFLAGS -I../include -I$EBROOTFFTW/include %s -c fftlib.cpp -o fftlib.o" % local_options + +files_to_copy = [(['fftlib.o'], 'lib')] + +sanity_check_paths = { + 'files': ['lib/fftlib.o'], + 'dirs': ["."] +} + +# this should be prepended to $LIBFFT(_MT) when building applications in order to intercept their FFT calls +modextravars = {'FFTLIB': "%(installdir)s/lib/fftlib.o -lgomp -lstdc++ -ldl"} + +moduleclass = 'lib' From 2a6ad97e995f39edc8dbd642b3d463f93693295f Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Thu, 4 Jan 2024 06:38:31 +0800 Subject: [PATCH 3/4] update source url for BGW 3.1.0 --- .../easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb index 4653db0fdb7..66bc90e3a29 100644 --- a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb +++ b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb @@ -9,8 +9,8 @@ description = """The BerkeleyGW Package is a set of computer codes that calculat toolchain = {'name': 'foss', 'version': '2022a'} toolchainopts = {'usempi': True, 'openmp': True} -source_urls = ['https://files.berkeleygw.org/'] -sources = [SOURCE_TAR_GZ] +source_urls = ['https://app.box.com/shared/static/'] +sources = [{'download_filename': '2bik75lrs85zt281ydbup2xa7i5594gy.gz', 'filename': SOURCE_TAR_GZ}] patches = [ 'BerkeleyGW-3.1.0_tests.patch', 'BerkeleyGW-3.0.1_makefile.patch', From 0ef30d587692b8f5c9f3713adfeed5fbc8a7187c Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Thu, 4 Jan 2024 11:25:04 +0800 Subject: [PATCH 4/4] update BerkeleyGW-3.1.0_makefile.patch --- .../BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb | 4 ++-- .../BerkeleyGW-3.1.0_makefile.patch | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_makefile.patch diff --git a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb index 66bc90e3a29..a4a6cdb6e35 100644 --- a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb +++ b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0-foss-2022a.eb @@ -13,12 +13,12 @@ source_urls = ['https://app.box.com/shared/static/'] sources = [{'download_filename': '2bik75lrs85zt281ydbup2xa7i5594gy.gz', 'filename': SOURCE_TAR_GZ}] patches = [ 'BerkeleyGW-3.1.0_tests.patch', - 'BerkeleyGW-3.0.1_makefile.patch', + 'BerkeleyGW-3.1.0_makefile.patch', ] checksums = [ {'BerkeleyGW-3.1.0.tar.gz': '7e890a5faa5a6bb601aa665c73903b3af30df7bdd13ee09362b69793bbefa6d2'}, {'BerkeleyGW-3.1.0_tests.patch': 'ef73cb7b69a6aad0da90538ef673e978e159d96e62147a304780b1ec25a4c156'}, - {'BerkeleyGW-3.0.1_makefile.patch': '56d90dc4e43db379441b6a1802e24f1f1356cd4aca4eb6d8b673f6c7926a7406'}, + {'BerkeleyGW-3.1.0_makefile.patch': '7a8b4bb593d75cf51ca42f94cd2b0ae5440b80e53e0cd00f183821539bc43fc6'}, ] dependencies = [ diff --git a/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_makefile.patch b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_makefile.patch new file mode 100644 index 00000000000..f5b9c258b23 --- /dev/null +++ b/easybuild/easyconfigs/b/BerkeleyGW/BerkeleyGW-3.1.0_makefile.patch @@ -0,0 +1,24 @@ +* don't rebuild flavors when installing and checking, and check using MPI +author: Miguel Dias Costa (National University of Singapore) +--- Makefile.orig 2024-01-04 10:02:31.992454794 +0800 ++++ Makefile 2024-01-04 10:02:52.863330557 +0800 +@@ -130,7 +130,7 @@ + cp flavor_cplx.mk flavor.mk + $(MAKE) all + +-install: all ++install: + ifdef INSTDIR + mkdir -p $(INSTDIR)/bin + install bin/*.x $(INSTDIR)/bin/ +@@ -152,8 +152,8 @@ + $(error Error: Please define installation prefix INSTDIR via 'make install INSTDIR='.) + endif + +-check: all +- cd testsuite && $(MAKE) check ++check: ++ cd testsuite && $(MAKE) check-parallel + + check-save: all + cd testsuite && $(MAKE) check-save