Skip to content

Commit

Permalink
Merge pull request #19247 from lcniel/20231116154205_new_pr_WIEN2k232
Browse files Browse the repository at this point in the history
{chem} [intel/2021b] WIEN2k 23.2 update
  • Loading branch information
akesandgren authored Jan 10, 2024
2 parents 01cc786 + 22ba067 commit 6057663
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 0 deletions.
78 changes: 78 additions & 0 deletions easybuild/easyconfigs/w/WIEN2k/WIEN2k-23.2-intel-2021b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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 = [
'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.
"""

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.
('tcsh')
]

# 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 100', [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.0',
r'^:FGL001.*\s+[0.]+\s+[0.]+\s+[0.]+\s+total forces',
r'^:FGL002.*15.*total forces',
]),
]

moduleclass = 'chem'
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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 @@
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

0 comments on commit 6057663

Please sign in to comment.