From 57d633d419140ccb983cd507602775f2b7e1c2f9 Mon Sep 17 00:00:00 2001 From: Leonard Nielsen Date: Thu, 16 Nov 2023 15:42:08 +0100 Subject: [PATCH 1/7] Build for new WIEN2k versions, include easybuild-easyblocks/pull/3035 --- .../w/WIEN2k/WIEN2k-23.2-intel-2021b.eb | 80 +++++++++++++++++++ .../WIEN2k-23.2_fix_libxc_for_lapw0_mpi.patch | 30 +++++++ ...k-23.2_fix_system_stderr_redirection.patch | 29 +++++++ 3 files changed, 139 insertions(+) create mode 100644 easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb create mode 100644 easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_libxc_for_lapw0_mpi.patch create mode 100644 easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb new file mode 100644 index 00000000000..a40da29ea43 --- /dev/null +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb @@ -0,0 +1,80 @@ +name = 'WIEN2k' +version = '23.2' + +homepage = 'http://www.wien2k.at/' +description = """The program package WIEN2k allows to perform electronic structure calculations of solids +using density functional theory (DFT). It is based on the full-potential (linearized) augmented plane-wave +((L)APW) + local orbitals (lo) method, one among the most accurate schemes for band structure calculations. +WIEN2k is an all-electron scheme including relativistic effects and has many features.""" + +toolchain = {'name': 'intel', 'version': '2021b'} + +sources = ['%(name)s_%(version)s.tar'] +patches = [ + '%(name)s-%(version)s_fix_libxc_for_lapw0_mpi.patch', + '%(name)s-%(version)s_fix_system_stderr_redirection.patch', +] +#checksums = [ +# '32590778440a9280322bf2dc0d63f4f42a9fc48814fa6b8b7ee2d199c94bed11', # WIEN2k_21.1.tar +# '1cc480a4824d9185ad5918dfc68c47bcb7826114626c8133d573be901bbdca84', # WIEN2k-21.1_fix_libxc_for_lapw0_mpi.patch + # WIEN2k-21.1_fix_system_stderr_redirection.patch +# 'cdba467b0b6f2b310c2e1e2a3e6cabe75f8fd15ee0f7c14f8ef80c7e48073bdd', +#] + +download_instructions = """ +WIEN2k can be ordered at http://susi.theochem.tuwien.ac.at/index.html. +""" + +builddependencies = [ + ('tcsh', '6.24.01') +] + +dependencies = [ + ('Python', '3.9.6'), + ('Perl', '5.34.0'), + ('DFT-D3', '3.2.0'), + ('ELPA', '2021.05.001'), + ('FFTW', '3.3.10'), + ('libxc', '5.1.6'), +] + +osdependencies = [ + ('glibc-devel', 'libc6-dev'), # required for libpthread.a +] + +# remote = 'pbsssh' +# If using a Slurm batch system it is highly recommended to use +# 'srun -n_NP_ _EXEC_' for wien_mpirun +wien_mpirun = 'mpirun -np _NP_ _EXEC_' +use_remote = False +mpi_remote = False +wien_granularity = True +taskset = 'no' + +# Change as needed, these are the defaults +# nmatmax = 19000 +# nume = 6000 + +fix_perl_shebang_for = [ + 'iniel_pressure_in2reader.pl_lapw', + 'iniel_pressure_reader.pl_lapw', + 'setrmt_lapw', + 'elast_setup_input.pl_lapw', + 'bashtime2csh.pl_lapw', +] + +tests = [ + # test case 1: NaCl +# ('NaCl', '-b', '-i 3', [r'^:DIS.*0.1', r'^:ENE.*-1248.14']), + # test case 2: TiO2 + ('TiO2', + '-b -numk 1000 -rkmax 7.5', + '-in1ef -cc 0.00001 -fc 0.5 -i 100', + [ + r'^:ENE.*-4018.07', + r'^:FGL001.*\s+[0.]+\s+[0.]+\s+[0.]+\s+total forces', + r'^:FGL002.*15.*total forces', + ]), +] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_libxc_for_lapw0_mpi.patch b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_libxc_for_lapw0_mpi.patch new file mode 100644 index 00000000000..473da9ef378 --- /dev/null +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_libxc_for_lapw0_mpi.patch @@ -0,0 +1,30 @@ +The Makefile.orig lapw0 is not updated according to how the Makefile works. +That causes a build failure for lapw0_mpi with libxc + +Åke Sandgren, 20210910 +diff -ru wien2k.orig/SRC_lapw0/Makefile.orig wien2k/SRC_lapw0/Makefile.orig +--- wien2k.orig/SRC_lapw0/Makefile.orig 2021-03-13 09:40:10.023772496 +0100 ++++ wien2k/SRC_lapw0/Makefile.orig 2021-09-10 14:53:07.875144996 +0200 +@@ -55,7 +55,9 @@ + #-------------- loader options ------------- + LDFLAGS = _LDFLAGS_ + R_LIBS = $(FFTW_LIBS) _R_LIBS_ $(LIBXC_LIBS) ++RR_LIBS = $(FFTW_LIBS) $(R_LIBS) $(LIBXC_LIBS) + RP_LIBS = $(FFTW_PLIBS) _RP_LIBS_ ++RPP_LIBS = $(FFTW_PLIBS) $(FFTW_LIBS) $(RP_LIBS) $(LIBXC_LIBS) + + ############################################################################### + # End of user defined variables # +@@ -128,10 +130,10 @@ + #.............................................................................. + + $(S_EXEC): $(OBJS) +- $(FORT) -o $(S_EXEC) $(OBJS) $(LDFLAGS) $(R_LIBS) ++ $(FORT) -o $(S_EXEC) $(OBJS) $(LDFLAGS) $(RR_LIBS) + + $(P_EXEC): $(OBJS) +- $(FORT) -o $(P_EXEC) $(OBJS) $(LDFLAGS) $(RP_LIBS) ++ $(FORT) -o $(P_EXEC) $(OBJS) $(LDFLAGS) $(RPP_LIBS) + + # sequential + keep_s_files: diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch new file mode 100644 index 00000000000..23b08d93cfb --- /dev/null +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch @@ -0,0 +1,29 @@ +--- SRC_Globals/W2kinit.F.orig 2023-11-08 17:54:06.183370012 +0100 ++++ SRC_Globals/W2kinit.F 2023-11-08 18:29:21.436975434 +0100 +@@ -403,7 +403,7 @@ + logical AVX512, AVX2, AVX, SSE + integer istat, system + AVX512=.false.; AVX2=.false.; AVX=.false.; SSE=.false. +- istat=system('ls /proc/cpuinfo > /dev/null') ++ istat=system('test -f /proc/cpuinfo') + if(istat.ne.0.and.myid.eq.0) then + print*, "Could not read your /proc/cpuinfo. The default kernel of your ELPA installation" + print*, "will be used." +@@ -413,13 +413,13 @@ + !_REAL print*, " ELPA_DEFAULT_real_kernel" + !_COMPLEX print*, " ELPA_DEFAULT_complex_kernel" + else +- istat=system('grep -i avx512 /proc/cpuinfo > /dev/null') ++ istat=system('grep -qi avx512 /proc/cpuinfo') + if(istat.eq.0) AVX512=.true. +- istat=system('grep -i avx2 /proc/cpuinfo > /dev/null') ++ istat=system('grep -qi avx2 /proc/cpuinfo') + if(istat.eq.0) AVX2=.true. +- istat=system('grep -i avx /proc/cpuinfo > /dev/null') ++ istat=system('grep -qi avx /proc/cpuinfo') + if(istat.eq.0) AVX=.true. +- istat=system('grep -i sse /proc/cpuinfo > /dev/null') ++ istat=system('grep -qi sse /proc/cpuinfo') + if(istat.eq.0) SSE=.true. + endif + return From 741ae8083a0f291146bd610a63d31a04f02f8e43 Mon Sep 17 00:00:00 2001 From: Leonard Nielsen <55690238+lcniel@users.noreply.github.com> Date: Thu, 16 Nov 2023 16:56:56 +0100 Subject: [PATCH 2/7] Update WIEN2k-23.2-intel-2021b.eb --- .../easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb index a40da29ea43..4e4c6e0714a 100644 --- a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb @@ -14,21 +14,11 @@ patches = [ '%(name)s-%(version)s_fix_libxc_for_lapw0_mpi.patch', '%(name)s-%(version)s_fix_system_stderr_redirection.patch', ] -#checksums = [ -# '32590778440a9280322bf2dc0d63f4f42a9fc48814fa6b8b7ee2d199c94bed11', # WIEN2k_21.1.tar -# '1cc480a4824d9185ad5918dfc68c47bcb7826114626c8133d573be901bbdca84', # WIEN2k-21.1_fix_libxc_for_lapw0_mpi.patch - # WIEN2k-21.1_fix_system_stderr_redirection.patch -# 'cdba467b0b6f2b310c2e1e2a3e6cabe75f8fd15ee0f7c14f8ef80c7e48073bdd', -#] download_instructions = """ WIEN2k can be ordered at http://susi.theochem.tuwien.ac.at/index.html. """ -builddependencies = [ - ('tcsh', '6.24.01') -] - dependencies = [ ('Python', '3.9.6'), ('Perl', '5.34.0'), @@ -39,7 +29,8 @@ dependencies = [ ] osdependencies = [ - ('glibc-devel', 'libc6-dev'), # required for libpthread.a + ('glibc-devel', 'libc6-dev'), # required for libpthread. + ('tcsh', '6.24.01') ] # remote = 'pbsssh' From 41802cbe4d3a521772e7c89bcd44e4935b985493 Mon Sep 17 00:00:00 2001 From: Leonard Nielsen <55690238+lcniel@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:42:19 +0100 Subject: [PATCH 3/7] Update WIEN2k-23.2-intel-2021b.eb --- easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb index 4e4c6e0714a..2067f8abc66 100644 --- a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb @@ -56,13 +56,13 @@ fix_perl_shebang_for = [ tests = [ # test case 1: NaCl -# ('NaCl', '-b', '-i 3', [r'^:DIS.*0.1', r'^:ENE.*-1248.14']), + ('NaCl', '-b', '-i 3', [r'^:DIS.*0.1', r'^:ENE.*-1248.1']), # test case 2: TiO2 ('TiO2', '-b -numk 1000 -rkmax 7.5', '-in1ef -cc 0.00001 -fc 0.5 -i 100', [ - r'^:ENE.*-4018.07', + r'^:ENE.*-4018.0', r'^:FGL001.*\s+[0.]+\s+[0.]+\s+[0.]+\s+total forces', r'^:FGL002.*15.*total forces', ]), From 1d2f6d3a6d09d2944bfbbe8e428bffcf75212f0d Mon Sep 17 00:00:00 2001 From: Leonard Nielsen <55690238+lcniel@users.noreply.github.com> Date: Thu, 16 Nov 2023 18:36:21 +0100 Subject: [PATCH 4/7] Update WIEN2k-23.2-intel-2021b.eb --- easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb index 2067f8abc66..cc8aed4ffbd 100644 --- a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb @@ -56,7 +56,7 @@ fix_perl_shebang_for = [ tests = [ # test case 1: NaCl - ('NaCl', '-b', '-i 3', [r'^:DIS.*0.1', r'^:ENE.*-1248.1']), + ('NaCl', '-b', '-i 100', [r'^:DIS.*0.1', r'^:ENE.*-1248.1']), # test case 2: TiO2 ('TiO2', '-b -numk 1000 -rkmax 7.5', From 0a30199b0ffda1cfb308de5cd0c0ee787949ea04 Mon Sep 17 00:00:00 2001 From: Leonard Nielsen <55690238+lcniel@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:59:11 +0100 Subject: [PATCH 5/7] Update WIEN2k-23.2_fix_system_stderr_redirection.patch --- .../w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch index 23b08d93cfb..4c0a3adaeef 100644 --- a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2_fix_system_stderr_redirection.patch @@ -1,3 +1,5 @@ +This fix removes the assumption that tcsh is being used to run the software. + --- SRC_Globals/W2kinit.F.orig 2023-11-08 17:54:06.183370012 +0100 +++ SRC_Globals/W2kinit.F 2023-11-08 18:29:21.436975434 +0100 @@ -403,7 +403,7 @@ From bc197a8db5f1c0778e7b5fca1c2010f2d33fcf31 Mon Sep 17 00:00:00 2001 From: Leonard Nielsen <55690238+lcniel@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:06:04 +0100 Subject: [PATCH 6/7] Update WIEN2k-23.2-intel-2021b.eb --- easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb index cc8aed4ffbd..256edac8785 100644 --- a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb @@ -14,6 +14,13 @@ patches = [ '%(name)s-%(version)s_fix_libxc_for_lapw0_mpi.patch', '%(name)s-%(version)s_fix_system_stderr_redirection.patch', ] +checksums = [ + '3a71565a4fb114a2f9af9a1710bd3160781a7566bb2746bef1ba8af372b4d7b0', # WIEN2k_23.2.tar + '1cc480a4824d9185ad5918dfc68c47bcb7826114626c8133d573be901bbdca84', # WIEN2k-23.2_fix_libxc_for_lapw0_mpi.patch + 'eb3f987b1f839b9f10c315d3f7a57e181e46bc98bec3a18e5b9942689b75fcc7', + # WIEN2k-23.2_fix_system_stderr_redirection.patch +] + download_instructions = """ WIEN2k can be ordered at http://susi.theochem.tuwien.ac.at/index.html. From ea34fe86f8125f686c7ea7c1d9e2a654330bbaef Mon Sep 17 00:00:00 2001 From: Leonard Nielsen <55690238+lcniel@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:10:19 +0100 Subject: [PATCH 7/7] Update WIEN2k-23.2-intel-2021b.eb --- easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb index 256edac8785..a8881dbe118 100644 --- a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb +++ b/easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb @@ -37,7 +37,7 @@ dependencies = [ osdependencies = [ ('glibc-devel', 'libc6-dev'), # required for libpthread. - ('tcsh', '6.24.01') + ('tcsh') ] # remote = 'pbsssh'