Skip to content

Commit

Permalink
Merge branch 'easybuilders:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
branfosj authored Aug 5, 2024
2 parents bc7fa88 + 89ea2e4 commit b7f8bb5
Show file tree
Hide file tree
Showing 11 changed files with 1,371 additions and 1,217 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
pip install --upgrade pip
# fix to this version for develop branch (to avoid needing to fix geant4.py)
pip install --upgrade "flake8<7.1"
pip install --upgrade "flake8"
- name: Run flake8 to verify PEP8-compliance of Python code
run: flake8
5 changes: 3 additions & 2 deletions easybuild/easyblocks/e/extrae.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,17 @@ def configure_step(self):
deps = {
'binutils': ('', '--with-binutils=%s', ''),
'Boost': ('', '--with-boost=%s', ''),
'libunwind': ('', '--with-unwind=%s', ''),
'libunwind': ('', '--with-unwind=%s', '--without-unwind'),
'libxml2': ('--enable-merge-in-trace', '--with-xml=%s', ''),
'PAPI': ('--enable-sampling', '--with-papi=%s', '--without-papi'),
'zlib': ('', '--with-libz=%s', ''),
}
else:
deps = {
'binutils': ('', '--with-binutils=%s', ''),
'Boost': ('', '--with-boost=%s', ''),
'libdwarf': ('', '--with-dwarf=%s', '--without-dwarf'),
'libunwind': ('', '--with-unwind=%s', ''),
'libunwind': ('', '--with-unwind=%s', '--without-unwind'),
'libxml2': (' --enable-xml --enable-merge-in-trace', '', ''),
'PAPI': ('--enable-sampling', '--with-papi=%s', '--without-papi'),
}
Expand Down
110 changes: 55 additions & 55 deletions easybuild/easyblocks/g/geant4.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,102 +96,102 @@ def configure_step(self):
"There exists a config.sh file. Shall I use it to set the defaults? [y]": "n",
"Would you like to see the instructions? [n]": "",
"[Type carriage return to continue]": "",
"Definition of G4SYSTEM variable is Linux-g++. That stands for: 1) OS : Linux" \
"2) Compiler : g++ To modify default settings, select number above (e.g. 2) " \
"Definition of G4SYSTEM variable is Linux-g++. That stands for: 1) OS : Linux"
"2) Compiler : g++ To modify default settings, select number above (e.g. 2) "
"[Press [Enter] for default settings]": "2",
"Which C++ compiler? [g++]": "$(GPP)",
"Confirm your selection or set recommended 'g++'! [*]": "",
"Definition of G4SYSTEM variable is Linux-icc. That stands for: 1) OS : Linux 2)" \
"Compiler : icc To modify default settings, select number above (e.g. 2) " \
"Definition of G4SYSTEM variable is Linux-icc. That stands for: 1) OS : Linux 2)"
"Compiler : icc To modify default settings, select number above (e.g. 2) "
"[Press [Enter] for default settings]": "",
"Do you expect to run these scripts and binaries on multiple machines? [n]": "y",
"Where is Geant4 source installed? [%s]" % pwd: "",
"Specify the path where Geant4 libraries and source files should be installed." \
"Specify the path where Geant4 libraries and source files should be installed."
" [%s]" % pwd: dst,
"Do you want to copy all Geant4 headers in one directory? [n]": "y",
"Please, specify default directory where ALL the Geant4 data is installed:" \
"G4LEVELGAMMADATA: %(pwd)s/data/PhotonEvaporation2.0 G4RADIOACTIVEDATA: " \
"%(pwd)s/data/RadioactiveDecay3.2 G4LEDATA: %(pwd)s/data/G4EMLOW5.1 G4NEUTRONHPDATA: " \
"%(pwd)s/data/G4NDL3.12 G4ABLADATA: %(pwd)s/data/G4ABLA3.0 You will be asked about " \
"Please, specify default directory where ALL the Geant4 data is installed:"
"G4LEVELGAMMADATA: %(pwd)s/data/PhotonEvaporation2.0 G4RADIOACTIVEDATA: "
"%(pwd)s/data/RadioactiveDecay3.2 G4LEDATA: %(pwd)s/data/G4EMLOW5.1 G4NEUTRONHPDATA: "
"%(pwd)s/data/G4NDL3.12 G4ABLADATA: %(pwd)s/data/G4ABLA3.0 You will be asked about "
"customizing these next. [%(pwd)s/data]" % {'pwd': pwd}: "%s/data" % dst,
"Directory %s/data doesn't exist. Use that name anyway? [n]" % dst: "y",
"Please, specify default directory where the Geant4 data is installed: " \
"1) G4LEVELGAMMADATA: %(dst)s/data/PhotonEvaporation2.0 2) G4RADIOACTIVEDATA: " \
"%(dst)s/data/RadioactiveDecay3.2 3) G4LEDATA: %(dst)s/data/G4EMLOW5.1 4) G4NEUTRONHPDATA: " \
"%(dst)s/data/G4NDL3.12 5) G4ABLADATA: %(dst)s/data/G4ABLA3.0 To modify default settings, " \
"Please, specify default directory where the Geant4 data is installed: "
"1) G4LEVELGAMMADATA: %(dst)s/data/PhotonEvaporation2.0 2) G4RADIOACTIVEDATA: "
"%(dst)s/data/RadioactiveDecay3.2 3) G4LEDATA: %(dst)s/data/G4EMLOW5.1 4) G4NEUTRONHPDATA: "
"%(dst)s/data/G4NDL3.12 5) G4ABLADATA: %(dst)s/data/G4ABLA3.0 To modify default settings, "
"select number above (e.g. 2) [Press [Enter] for default settings]" % {'dst': dst}: "",
"Please, specify where CLHEP is installed: CLHEP_BASE_DIR: ": clhepdir,
"Please, specify where CLHEP is installed: CLHEP_BASE_DIR: [%s]" % clhepdir: "",
"You can customize paths and library name of you CLHEP installation: 1) CLHEP_INCLUDE_DIR: " \
"%(clhepdir)s/include 2) CLHEP_LIB_DIR: %(clhepdir)s/lib 3) CLHEP_LIB: CLHEP To modify " \
"You can customize paths and library name of you CLHEP installation: 1) CLHEP_INCLUDE_DIR: "
"%(clhepdir)s/include 2) CLHEP_LIB_DIR: %(clhepdir)s/lib 3) CLHEP_LIB: CLHEP To modify "
"default settings, select number above (e.g. 2) [Press [Enter] for default settings]" %
{'clhepdir': clhepdir}: "",
"By default 'static' (.a) libraries are built. Do you want to build 'shared' (.so) " \
"By default 'static' (.a) libraries are built. Do you want to build 'shared' (.so) "
"libraries? [n]": "y",
"You selected to build 'shared' (.so) libraries. Do you want to build 'static' (.a) " \
"You selected to build 'shared' (.so) libraries. Do you want to build 'static' (.a) "
"libraries too? [n]": "y",
"Do you want to build 'global' compound libraries? [n]": "",
"Do you want to compile libraries in DEBUG mode (-g)? [n]": "",
"G4UI_NONE If this variable is set, no UI sessions nor any UI libraries are built. " \
"This can be useful when running a pure batch job or in a user framework having its own " \
"G4UI_NONE If this variable is set, no UI sessions nor any UI libraries are built. "
"This can be useful when running a pure batch job or in a user framework having its own "
"UI system. Do you want to set this variable ? [n]": "",
"G4UI_BUILD_XAW_SESSION G4UI_USE_XAW Specifies to include and use the XAW interfaces in " \
"the application to be built. The XAW (X11 Athena Widget set) extensions are required to " \
"G4UI_BUILD_XAW_SESSION G4UI_USE_XAW Specifies to include and use the XAW interfaces in "
"the application to be built. The XAW (X11 Athena Widget set) extensions are required to "
"activate and build this driver. [n]": "",
"G4UI_BUILD_XM_SESSION G4UI_USE_XM Specifies to include and use the XM Motif based user " \
"G4UI_BUILD_XM_SESSION G4UI_USE_XM Specifies to include and use the XM Motif based user "
"interfaces. The XM Motif extensions are required to activate and build this driver. [n]": "",
"G4VIS_NONE If this variable is set, no visualization drivers will be built or used. Do " \
"G4VIS_NONE If this variable is set, no visualization drivers will be built or used. Do "
"you want to set this variable ? [n]": "n",
"G4VIS_BUILD_OPENGLX_DRIVER G4VIS_USE_OPENGLX It is an interface to the de facto standard " \
"3D graphics library, OpenGL. It is well suited for real-time fast visualization and " \
"G4VIS_BUILD_OPENGLX_DRIVER G4VIS_USE_OPENGLX It is an interface to the de facto standard "
"3D graphics library, OpenGL. It is well suited for real-time fast visualization and "
"prototyping. The X11 version of the OpenGL libraries is required. [n]": "",
"G4VIS_BUILD_OPENGLXM_DRIVER G4VIS_USE_OPENGLXM It is an interface to the de facto " \
"standard 3D graphics library, OpenGL. It is well suited for real-time fast visualization " \
"and prototyping. The X11 version of the OpenGL libraries and the Motif Xm extension is " \
"G4VIS_BUILD_OPENGLXM_DRIVER G4VIS_USE_OPENGLXM It is an interface to the de facto "
"standard 3D graphics library, OpenGL. It is well suited for real-time fast visualization "
"and prototyping. The X11 version of the OpenGL libraries and the Motif Xm extension is "
"required. [n]": "",
"G4VIS_BUILD_DAWN_DRIVER G4VIS_USE_DAWN DAWN drivers are interfaces to the Fukui Renderer " \
"DAWN. DAWN is a vectorized 3D PostScript processor suited to prepare technical high " \
"G4VIS_BUILD_DAWN_DRIVER G4VIS_USE_DAWN DAWN drivers are interfaces to the Fukui Renderer "
"DAWN. DAWN is a vectorized 3D PostScript processor suited to prepare technical high "
"quality outputs for presentation and/or documentation. [n]": "",
"G4VIS_BUILD_OIX_DRIVER G4VIS_USE_OIX The OpenInventor driver is based on OpenInventor tech" \
"G4VIS_BUILD_OIX_DRIVER G4VIS_USE_OIX The OpenInventor driver is based on OpenInventor tech"
"nology for scientific visualization. The X11 version of OpenInventor is required. [n]": "",
"G4VIS_BUILD_RAYTRACERX_DRIVER G4VIS_USE_RAYTRACERX Allows for interactive ray-tracing " \
"G4VIS_BUILD_RAYTRACERX_DRIVER G4VIS_USE_RAYTRACERX Allows for interactive ray-tracing "
"graphics through X11. The X11 package is required. [n]": "",
"G4VIS_BUILD_VRML_DRIVER G4VIS_USE_VRML These driver generate VRML files, which describe " \
"G4VIS_BUILD_VRML_DRIVER G4VIS_USE_VRML These driver generate VRML files, which describe "
"3D scenes to be visualized with a proper VRML viewer. [n]": "",
"G4LIB_BUILD_GDML Setting this variable will enable building of the GDML plugin module " \
"embedded in Geant4 for detector description persistency. It requires your system to have " \
"G4LIB_BUILD_GDML Setting this variable will enable building of the GDML plugin module "
"embedded in Geant4 for detector description persistency. It requires your system to have "
"the XercesC library and headers installed. Do you want to set this variable? [n]": "",
"G4LIB_BUILD_G3TOG4 The utility module 'g3tog4' will be built by setting this variable. " \
"NOTE: it requires a valid FORTRAN compiler to be installed on your system and the " \
"'cernlib' command in the path, in order to build the ancillary tools! Do you want to " \
"G4LIB_BUILD_G3TOG4 The utility module 'g3tog4' will be built by setting this variable. "
"NOTE: it requires a valid FORTRAN compiler to be installed on your system and the "
"'cernlib' command in the path, in order to build the ancillary tools! Do you want to "
"build 'g3tog4' ? [n]": "",
"G4LIB_BUILD_ZLIB Do you want to activate compression for output files generated by the " \
"G4LIB_BUILD_ZLIB Do you want to activate compression for output files generated by the "
"HepRep visualization driver? [n]": "y",
"G4ANALYSIS_USE Activates the configuration setup for allowing plugins to analysis tools " \
"based on AIDA (Astract Interfaces for Data Analysis). In order to use AIDA features and " \
"compliant analysis tools, the proper environment for these tools will have to be set " \
"G4ANALYSIS_USE Activates the configuration setup for allowing plugins to analysis tools "
"based on AIDA (Astract Interfaces for Data Analysis). In order to use AIDA features and "
"compliant analysis tools, the proper environment for these tools will have to be set "
"(see documentation for the specific analysis tools). [n]": "",
"Press [Enter] to start installation or use a shell escape to edit config.sh: ": "",
# extra questions and answers for version 9.2.p03
"Directory %s doesn't exist. Use that name anyway? [n]" % dst: "y",
"Specify the path where the Geant4 data libraries PhotonEvaporation%s " \
"RadioactiveDecay%s G4EMLOW%s G4NDL%s G4ABLA%s are " \
"installed. For now, a flat directory structure is assumed, and this can be customized " \
"Specify the path where the Geant4 data libraries PhotonEvaporation%s "
"RadioactiveDecay%s G4EMLOW%s G4NDL%s G4ABLA%s are "
"installed. For now, a flat directory structure is assumed, and this can be customized "
"at the next step if needed. [%s/data]" % (self.cfg['PhotonEvaporationVersion'],
self.cfg['G4RadioactiveDecayVersion'],
self.cfg['G4EMLOWVersion'],
self.cfg['G4NDLVersion'],
self.cfg['G4ABLAVersion'],
pwd
): "%s/data" % dst,
"Please enter 1) Another path to search in 2) 'f' to force the use of the path " \
"you entered previously (the data libraries are not needed to build Geant4, but " \
"are needed to run applications later). 3) 'c' to customize the data paths, e.g. " \
"Please enter 1) Another path to search in 2) 'f' to force the use of the path "
"you entered previously (the data libraries are not needed to build Geant4, but "
"are needed to run applications later). 3) 'c' to customize the data paths, e.g. "
"if you have the data libraries installed in different locations. [f]": "",
"G4UI_BUILD_QT_SESSION G4UI_USE_QT Setting these variables will enable the building " \
"of the G4 Qt based user interface module and the use of this module in your " \
"applications respectively. The Qt3 or Qt4 headers, libraries and moc application are " \
"required to enable the building of this module. Do you want to enable build and use of " \
"G4UI_BUILD_QT_SESSION G4UI_USE_QT Setting these variables will enable the building "
"of the G4 Qt based user interface module and the use of this module in your "
"applications respectively. The Qt3 or Qt4 headers, libraries and moc application are "
"required to enable the building of this module. Do you want to enable build and use of "
"this module? [n]": "",
# extra questions and answers for version 9.4.po1
"What is the path to the Geant4 source tree? [%s]" % pwd: "",
Expand All @@ -204,9 +204,9 @@ def configure_step(self):
"Do you want to build libraries with debugging information? [n]": "",
"Specify the path where the Geant4 data libraries are installed: [%s/data]" % pwd: "%s/data" % dst,
"How many parallel jobs should make launch? [1]": "%s" % self.cfg['parallel'],
"Please enter 1) Another path to search in 2) 'f' to force the use of the path you entered " \
"previously (the data libraries are NOT needed to build Geant4, but are needed to run " \
"applications later). 3) 'c' to customize the data paths, e.g. if you have the data " \
"Please enter 1) Another path to search in 2) 'f' to force the use of the path you entered "
"previously (the data libraries are NOT needed to build Geant4, but are needed to run "
"applications later). 3) 'c' to customize the data paths, e.g. if you have the data "
"libraries installed in different locations. [f]": "",
"Enable building of User Interface (UI) modules? [y]": "",
"Enable building of the XAW (X11 Athena Widget set) UI module? [n]": "",
Expand Down
12 changes: 12 additions & 0 deletions easybuild/easyblocks/o/openfoam.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ def configure_step(self):
regex_subs.append((r"^(CPP\s*(=|:=)\s*)/lib/cpp(.*)$", r"\1cpp\2"))
apply_regex_substitutions(fullpath, regex_subs)

# use relative paths to object files when compiling shared libraries
# in order to keep the build command short and to prevent "Argument list too long" errors
wmake_makefile_general = os.path.join(self.builddir, self.openfoamdir, 'wmake', 'makefiles', 'general')
if os.path.isfile(wmake_makefile_general):
objects_relpath_regex = (
# $(OBJECTS) is a list of absolute paths to all required object files
r'(\$\(LINKLIBSO\) .*) \$\(OBJECTS\)',
# we replace the absolute paths by paths relative to the current working directory
r'\1 $(subst $(WM_PROJECT_DIR),$(shell realpath --relative-to=$(PWD) $(WM_PROJECT_DIR)),$(OBJECTS))',
)
apply_regex_substitutions(wmake_makefile_general, [objects_relpath_regex])

# enable verbose build for debug purposes
# starting with openfoam-extend 3.2, PS1 also needs to be set
env.setvar("FOAM_VERBOSE", '1')
Expand Down
18 changes: 18 additions & 0 deletions easybuild/easyblocks/p/psmpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def extra_options(extra_vars=None):
'threaded': [False, "Enable multithreaded build (which is slower)", CUSTOM],
'pscom_allin_path': [None, "Enable pscom integration by giving its source path", CUSTOM],
'cuda': [False, "Enable CUDA awareness", CUSTOM],
'msa': [False, "Enable MSA awareness", CUSTOM],
'pmix': [None, "Enable PMIx support", CUSTOM],
})
return extra_vars

Expand Down Expand Up @@ -88,6 +90,10 @@ def configure_step(self):
self.log.info("Enabling CUDA-Awareness...")
self.cfg.update('configopts', ' --with-cuda')

if self.cfg['msa']:
self.log.info("Enabling MSA-Awareness...")
self.cfg.update('configopts', ' --with-msa-awareness')

# Set confset
comp_fam = self.toolchain.comp_family()
if comp_fam in comp_opts:
Expand All @@ -104,6 +110,18 @@ def configure_step(self):
if self.cfg['mpich_opts'] is not None:
self.cfg.update('configopts', ' --with-mpichconf="%s"' % self.cfg['mpich_opts'])

# Add PMIx support
pmix_path = get_software_root('PMIx')
# No specific value passed to the option, so automatically determine it judging the dependencies
if self.cfg['pmix'] is None and pmix_path:
self.cfg.update('configopts', ' --with-pmix="%s"' % pmix_path)
# A particular value was added, so act accordingly
elif self.cfg['pmix']:
if pmix_path:
self.cfg.update('configopts', ' --with-pmix="%s"' % pmix_path)
else:
self.cfg.update('configopts', ' --with-pmix')

# Lastly, set pscom related variables
if self.cfg['pscom_allin_path'] is None:
pscom_path = get_software_root('pscom')
Expand Down
Loading

0 comments on commit b7f8bb5

Please sign in to comment.