-
Notifications
You must be signed in to change notification settings - Fork 308
update Siesta easyblock for v3.2 to 4.1-b3 #1510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
4525c78
a8e7747
ba034f5
5860828
7157f7f
35566d2
03cb9a5
8477a32
36e7c19
2013044
77fe35e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,9 +171,9 @@ def configure_step(self): | |
| if netcdff_loc: | ||
| regex_subs.extend([ | ||
| (r"^(LIBS\s*=.*)$", r"\1 $(NETCDF_LIBS)"), | ||
| (r"^(FPPFLAGS\s*=.*)$", r"\1 -DCDF"), | ||
| (r"^(FPPFLAGS\s*=.*)$", r"\1 -DCDF $(NETCDF_INCLUDE)"), | ||
| ]) | ||
| regex_newlines.append((r"^(COMP_LIBS\s*=.*)$", r"\1\nNETCDF_LIBS = -lnetcdff")) | ||
| regex_newlines.append((r"^(COMP_LIBS\s*=.*)$", r"\1\nNETCDF_LIBS = -lnetcdff\nNETCDF_INCLUDE = -I%s/include" % netcdff_loc)) | ||
|
|
||
| apply_regex_substitutions(arch_make, regex_subs) | ||
|
|
||
|
|
@@ -190,9 +190,10 @@ def configure_step(self): | |
| # Make the utils | ||
| change_dir(os.path.join(start_dir, 'Util')) | ||
|
|
||
| # clean_all.sh might be missing executable bit... | ||
| adjust_permissions('./clean_all.sh', stat.S_IXUSR, recursive=False, relative=True) | ||
| run_cmd('./clean_all.sh', log_all=True, simple=True, log_output=True) | ||
| if LooseVersion(self.version) >= LooseVersion('4'): | ||
| # clean_all.sh might be missing executable bit... | ||
| adjust_permissions('./clean_all.sh', stat.S_IXUSR, recursive=False, relative=True) | ||
| run_cmd('./clean_all.sh', log_all=True, simple=True, log_output=True) | ||
|
|
||
| if LooseVersion(self.version) >= LooseVersion('4.1'): | ||
| regex_subs_TS = [ | ||
|
|
@@ -205,52 +206,59 @@ def configure_step(self): | |
| makefile = os.path.join(start_dir, 'Util', 'TS', 'tshs2tshs', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_TS) | ||
|
|
||
| # SUFFIX rules in wrong place | ||
| regex_subs_suffix = [ | ||
| (r'^(\.SUFFIXES:.*)$', r''), | ||
| (r'^(include\s*\$\(ARCH_MAKE\).*)$', r'\1\n.SUFFIXES:\n.SUFFIXES: .c .f .F .o .a .f90 .F90'), | ||
| ] | ||
| makefile = os.path.join(start_dir, 'Util', 'Sockets', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_suffix) | ||
| makefile = os.path.join(start_dir, 'Util', 'SiestaSubroutine', 'SimpleTest', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_suffix) | ||
| if LooseVersion(self.version) >= LooseVersion('4'): | ||
| # SUFFIX rules in wrong place | ||
| regex_subs_suffix = [ | ||
| (r'^(\.SUFFIXES:.*)$', r''), | ||
| (r'^(include\s*\$\(ARCH_MAKE\).*)$', r'\1\n.SUFFIXES:\n.SUFFIXES: .c .f .F .o .a .f90 .F90'), | ||
| ] | ||
| makefile = os.path.join(start_dir, 'Util', 'Sockets', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_suffix) | ||
| makefile = os.path.join(start_dir, 'Util', 'SiestaSubroutine', 'SimpleTest', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_suffix) | ||
|
|
||
| regex_subs_UtilLDFLAGS = [ | ||
| (r'(\$\(FC\)\s*-o\s)', r'$(FC) %s %s -o ' % (os.environ['FCFLAGS'], os.environ['LDFLAGS'])), | ||
| ] | ||
| makefile = os.path.join(start_dir, 'Util', 'Optimizer', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_UtilLDFLAGS) | ||
| makefile = os.path.join(start_dir, 'Util', 'JobList', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_UtilLDFLAGS) | ||
| if LooseVersion(self.version) >= LooseVersion('4'): | ||
| makefile = os.path.join(start_dir, 'Util', 'JobList', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, regex_subs_UtilLDFLAGS) | ||
|
|
||
| # remove clean at the end of default target | ||
| if self.version == '4.0.1' or self.version == '4.1-b3': | ||
| makefile = os.path.join(start_dir, 'Util', 'SiestaSubroutine', 'SimpleTest', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, [(r"simple_mpi_parallel clean", r"simple_mpi_parallel")]) | ||
| makefile = os.path.join(start_dir, 'Util', 'SiestaSubroutine', 'ProtoNEB', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, [(r"protoNEB clean", r"protoNEB")]) | ||
|
|
||
| # And yes, they are re-introducing this bug. | ||
| if ((LooseVersion(self.version) >= LooseVersion('4.0') | ||
| and LooseVersion(self.version) < LooseVersion('4.0.2')) | ||
| or LooseVersion(self.version) == LooseVersion('4.1-b3')): | ||
|
||
| makefile = os.path.join(start_dir, 'Util', 'SiestaSubroutine', 'SimpleTest', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, [(r"simple_mpi_parallel clean", r"simple_mpi_parallel")]) | ||
| makefile = os.path.join(start_dir, 'Util', 'SiestaSubroutine', 'ProtoNEB', 'Src', 'Makefile') | ||
| apply_regex_substitutions(makefile, [(r"protoNEB clean", r"protoNEB")]) | ||
|
|
||
| # build_all.sh might be missing executable bit... | ||
| adjust_permissions('./build_all.sh', stat.S_IXUSR, recursive=False, relative=True) | ||
| run_cmd('./build_all.sh', log_all=True, simple=True, log_output=True) | ||
|
|
||
| # Now move all the built utils to the temp installdir | ||
| expected_utils = [ | ||
| 'Bands/eigfat2plot', | ||
| 'CMLComp/ccViz', | ||
| 'Contrib/APostnikov/eig2bxsf', 'Contrib/APostnikov/rho2xsf', | ||
| 'Contrib/APostnikov/vib2xsf', 'Contrib/APostnikov/fmpdos', | ||
| 'Contrib/APostnikov/xv2xsf', 'Contrib/APostnikov/md2axsf', | ||
| 'COOP/mprop', 'COOP/fat', | ||
| 'Contrib/APostnikov/eig2bxsf', 'Contrib/APostnikov/fmpdos', | ||
| 'Contrib/APostnikov/md2axsf', 'Contrib/APostnikov/rho2xsf', | ||
| 'Contrib/APostnikov/vib2xsf', 'Contrib/APostnikov/xv2xsf', | ||
| 'COOP/fat', 'COOP/mprop', | ||
| 'Denchar/Src/denchar', | ||
| 'DensityMatrix/dm2cdf', 'DensityMatrix/cdf2dm', | ||
| 'DensityMatrix/cdf2dm', 'DensityMatrix/dm2cdf', | ||
| 'Eig2DOS/Eig2DOS', | ||
| 'Gen-basis/ioncat', 'Gen-basis/gen-basis', | ||
| 'Grid/cdf2grid', 'Grid/cdf_laplacian', 'Grid/cdf2xsf', | ||
| 'Grid/grid2cube', | ||
| 'Grid/grid_rotate', 'Grid/g2c_ng', 'Grid/grid2cdf', 'Grid/grid2val', | ||
| 'Gen-basis/gen-basis', 'Gen-basis/ioncat', | ||
| 'Gen-basis/ionplot.sh', | ||
| 'Grid/cdf2grid', 'Grid/cdf2xsf', 'Grid/cdf_laplacian', | ||
| 'Grid/g2c_ng', 'Grid/grid2cdf', 'Grid/grid2cube', | ||
| 'Grid/grid2val', 'Grid/grid_rotate', | ||
| 'Helpers/get_chem_labels', | ||
| 'HSX/hs2hsx', 'HSX/hsx2hs', | ||
| 'JobList/Src/getResults', 'JobList/Src/countJobs', | ||
| 'JobList/Src/runJobs', 'JobList/Src/horizontal', | ||
| 'JobList/Src/countJobs', 'JobList/Src/getResults', | ||
| 'JobList/Src/horizontal', 'JobList/Src/runJobs', | ||
| 'Macroave/Src/macroave', | ||
| 'ON/lwf2cdf', | ||
| 'Optimizer/simplex', 'Optimizer/swarm', | ||
|
|
@@ -259,33 +267,69 @@ def configure_step(self): | |
| 'SiestaSubroutine/FmixMD/Src/driver', | ||
| 'SiestaSubroutine/FmixMD/Src/para', | ||
| 'SiestaSubroutine/FmixMD/Src/simple', | ||
| 'STM/simple-stm/plstm', 'STM/ol-stm/Src/stm', | ||
| 'VCA/mixps', 'VCA/fractional', | ||
| 'Vibra/Src/vibra', 'Vibra/Src/fcbuild', | ||
| 'WFS/info_wfsx', 'WFS/wfsx2wfs', | ||
| 'WFS/readwfx', 'WFS/wfsnc2wfsx', 'WFS/readwf', 'WFS/wfs2wfsx', | ||
| 'STM/ol-stm/Src/stm', 'STM/simple-stm/plstm', | ||
| 'VCA/fractional', 'VCA/mixps', | ||
| 'Vibra/Src/fcbuild', 'Vibra/Src/vibra', | ||
| 'WFS/info_wfsx', | ||
| 'WFS/readwf', 'WFS/readwfx', 'WFS/wfs2wfsx', | ||
| 'WFS/wfsnc2wfsx', 'WFS/wfsx2wfs', | ||
| ] | ||
|
|
||
| if LooseVersion(self.version) <= LooseVersion('4.0'): | ||
| if LooseVersion(self.version) >= LooseVersion('3.2'): | ||
| expected_utils.extend([ | ||
| 'Bands/new.gnubands', | ||
| 'TBTrans/tbtrans', | ||
| 'Bands/eigfat2plot', | ||
| ]) | ||
|
|
||
| if LooseVersion(self.version) >= LooseVersion('4.0'): | ||
| expected_utils.extend([ | ||
| 'SiestaSubroutine/ProtoNEB/Src/protoNEB', | ||
| 'SiestaSubroutine/SimpleTest/Src/simple_pipes_parallel', | ||
| 'SiestaSubroutine/SimpleTest/Src/simple_pipes_serial', | ||
| 'SiestaSubroutine/SimpleTest/Src/simple_sockets_parallel', | ||
| 'SiestaSubroutine/SimpleTest/Src/simple_sockets_serial', | ||
| 'Sockets/f2fmaster', 'Sockets/f2fslave', | ||
| ]) | ||
| if self.toolchain.options.get('usempi', None): | ||
| expected_utils.extend([ | ||
| 'SiestaSubroutine/SimpleTest/Src/simple_mpi_parallel', | ||
| 'SiestaSubroutine/SimpleTest/Src/simple_mpi_serial', | ||
| ]) | ||
|
|
||
| if LooseVersion(self.version) < LooseVersion('4.1'): | ||
| if LooseVersion(self.version) >= LooseVersion('4.0'): | ||
| expected_utils.extend([ | ||
| 'COOP/dm_creator', | ||
| 'TBTrans_rep/tbtrans', | ||
| ]) | ||
| else: | ||
| expected_utils.extend([ | ||
| 'TBTrans/tbtrans', | ||
| ]) | ||
|
|
||
| if LooseVersion(self.version) < LooseVersion('4.0.2'): | ||
| expected_utils.extend([ | ||
| 'Bands/new.gnubands', | ||
| ]) | ||
| else: | ||
| expected_utils.extend([ | ||
| 'Bands/gnubands', | ||
| ]) | ||
| # Need to revisit this when 4.1 is officialy released. | ||
| # This is based on b1-b3 releases | ||
| if LooseVersion(self.version) < LooseVersion('4.1'): | ||
| expected_utils.extend([ | ||
| 'Contour/grid1d', 'Contour/grid2d', | ||
| 'Optical/optical', 'Optical/optical_input', | ||
| 'sies2arc/sies2arc', | ||
| ]) | ||
|
|
||
| if LooseVersion(self.version) >= LooseVersion('4.1'): | ||
| expected_utils.extend([ | ||
| 'Bands/gnubands', | ||
| 'DensityMatrix/dmbs2dm', 'DensityMatrix/dmUnblock', | ||
| 'Grimme/fdf2grimme', | ||
| 'SpPivot/pvtsp', | ||
| 'TS/ts2ts/ts2ts', 'TS/tshs2tshs/tshs2tshs', 'TS/TBtrans/tbtrans', | ||
| 'TS/TBtrans/tbtrans', 'TS/tselecs.sh', | ||
| 'TS/ts2ts/ts2ts', 'TS/tshs2tshs/tshs2tshs', | ||
| ]) | ||
|
|
||
| for util in expected_utils: | ||
|
|
@@ -327,6 +371,9 @@ def sanity_check_step(self): | |
| custom_commands = [] | ||
| if self.toolchain.options.get('usempi', None): | ||
| # make sure Siesta was indeed built with support for running in parallel | ||
| custom_commands.append("echo 'SystemName test' | mpirun -np 2 siesta 2>/dev/null | grep PARALLEL") | ||
| # The "cd to builddir" is required to not contaminate the install dir with cruft from running siesta | ||
| mpi_test_cmd = "cd %s && " % self.builddir | ||
| mpi_test_cmd = mpi_test_cmd + "echo 'SystemName test' | mpirun -np 2 siesta 2>/dev/null | grep PARALLEL" | ||
| custom_commands.append(mpi_test_cmd) | ||
|
|
||
| super(EB_Siesta, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (140 > 120 characters)