Skip to content
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

Rename easyconfig parameters #4483

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f296f0c
add renamed easyconfig parameters to DEPRECATED_PARAMETERS
jfgrimm Mar 8, 2024
9ee3c0c
update easyconfig parameters in framework
jfgrimm Mar 11, 2024
b2f364a
Fix deprecation of exts_defaultclass
jfgrimm Mar 12, 2024
50d8709
clean up easybuild/framework/easyconfig/default.py
jfgrimm Mar 12, 2024
81fabbf
clean up easybuild/framework/easyconfig/easyconfig.py
jfgrimm Mar 12, 2024
8330da4
clean up easybuild/framework/easyconfig/format/one.py
jfgrimm Mar 12, 2024
31f8aeb
clean up easybuild/framework/easyconfig/tools.py
jfgrimm Mar 12, 2024
1906e59
clean up easybuild/framework/easyconfig/tweak.py
jfgrimm Mar 12, 2024
7f87961
clean up easybuild/framework/easyconfig/types.py
jfgrimm Mar 12, 2024
3cd7f9e
easybuild/framework/extension.py
jfgrimm Mar 12, 2024
ba4e9d1
clean up easybuild/main.py
jfgrimm Mar 12, 2024
9a3285b
clean up easybuild/scripts/findPythonDeps.py
jfgrimm Mar 12, 2024
5a1e1f7
clean up easybuild/toolchains/fcc.py
jfgrimm Mar 12, 2024
c8211cc
clean up easybuild/tools/config.py
jfgrimm Mar 12, 2024
fa3da5e
clean up easybuild/tools/containers/singularity.py
jfgrimm Mar 12, 2024
ee7a5f2
clean up easybuild/tools/containers/utils.py
jfgrimm Mar 12, 2024
88dd0ef
clean up easybuild/tools/github.py
jfgrimm Mar 12, 2024
9a1a3e1
clean up easybuild/tools/module_generator.py
jfgrimm Mar 12, 2024
659f18b
clean up easybuild/tools/module_naming_scheme/hierarchical_mns.py
jfgrimm Mar 12, 2024
4a78315
clean up easybuild/tools/module_naming_scheme/mns.py
jfgrimm Mar 12, 2024
eee5258
clean up easybuild/tools/modules.py
jfgrimm Mar 12, 2024
152414a
clean up easybuild/tools/options.py
jfgrimm Mar 12, 2024
7ae3b07
clean up easybuild/tools/package/utilities.py
jfgrimm Mar 12, 2024
ea49604
clean up easybuild/tools/parallelbuild.py
jfgrimm Mar 12, 2024
5b9e34d
clean up easybuild/tools/robot.py
jfgrimm Mar 12, 2024
2e93194
clean up easybuild/tools/systemtools.py
jfgrimm Mar 12, 2024
378beed
clean up easybuild/tools/toolchain/toolchain.py
jfgrimm Mar 12, 2024
30b13b1
clean up test/framework/options.py
jfgrimm Mar 12, 2024
6947f78
clean up test/framework/robot.py
jfgrimm Mar 12, 2024
bb427a0
clean up test/framework/toolchain.py
jfgrimm Mar 12, 2024
a997c18
clean up test/framework/tweak.py
jfgrimm Mar 12, 2024
ea203fd
linting
jfgrimm Mar 12, 2024
50ff94c
linting
jfgrimm Mar 12, 2024
24eded2
fix quote
jfgrimm Mar 12, 2024
a6bb5da
quote
jfgrimm Mar 12, 2024
9f93010
revert changes to easybuild configuration options
jfgrimm Mar 13, 2024
c9bae02
more fixes
jfgrimm Mar 13, 2024
b6faed2
fixes
jfgrimm Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions contrib/hooks/add_delete_configopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def pre_configure_hook(self, *args, **kwargs):

# Now add the options
self.log.info("[pre-configure hook] Adding %s" % extra_opts)
self.cfg.update('configopts', extra_opts)
self.cfg.update('configure_opts', extra_opts)

# Now we delete some options
# For newer versions of OpenMPI we can re-enable ucx, i.e. delete the --without-ucx flag
if LooseVersion(self.version) >= LooseVersion('2.1'):
self.log.info("[pre-configure hook] Re-enabling ucx")
self.cfg['configopts'] = self.cfg['configopts'].replace('--without-ucx', ' ')
self.cfg['configure_opts'] = self.cfg['configure_opts'].replace('--without-ucx', ' ')

# And we can remove the --disable-dlopen option from the easyconfig file
self.log.info("[pre-configure hook] Re-enabling dlopen")
self.cfg['configopts'] = self.cfg['configopts'].replace('--disable-dlopen', ' ')
self.cfg['configure_opts'] = self.cfg['configure_opts'].replace('--disable-dlopen', ' ')
50 changes: 25 additions & 25 deletions contrib/hooks/hpc2n_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
def parse_hook(ec, *args, **kwargs):

# Internal helper function
def add_extra_dependencies(ec, dep_type, extra_deps):
"""dep_type: must be in DEPENDENCY_PARAMETERS or 'osdependencies'"""
def add_extra_deps(ec, dep_type, extra_deps):
"""dep_type: must be in DEPENDENCY_PARAMETERS or 'os_deps'"""
ec.log.info("[parse hook] Adding %s: %s" % (dep_type, extra_deps))

if dep_type in DEPENDENCY_PARAMETERS:
for dep in extra_deps:
ec[dep_type].append(dep)
elif dep_type == 'osdependencies':
elif dep_type == 'os_deps':
if isinstance(extra_deps, tuple):
ec[dep_type].append(extra_deps)
else:
raise EasyBuildError("parse_hook: Type of extra_deps argument (%s), for 'osdependencies' must be "
raise EasyBuildError("parse_hook: Type of extra_deps argument (%s), for 'os_deps' must be "
"tuple, found %s" % (extra_deps, type(extra_deps)))
else:
raise EasyBuildError("parse_hook: Incorrect dependency type in add_extra_dependencies: %s" % dep_type)
raise EasyBuildError("parse_hook: Incorrect dependency type in add_extra_deps: %s" % dep_type)

extra_deps = []

Expand Down Expand Up @@ -73,15 +73,15 @@ def add_extra_dependencies(ec, dep_type, extra_deps):
extra_deps.append(('PMIx', pmix_version))

if extra_deps:
add_extra_dependencies(ec, 'dependencies', extra_deps)
add_extra_deps(ec, 'deps', extra_deps)


def pre_configure_hook(self, *args, **kwargs):
if self.name == 'GROMACS':
# HPC2N always uses -DGMX_USE_NVML=ON on GPU builds
if get_software_root('CUDA'):
self.log.info("[pre-configure hook] Adding -DGMX_USE_NVML=ON")
self.cfg.update('configopts', "-DGMX_USE_NVML=ON ")
self.cfg.update('configure_opts', "-DGMX_USE_NVML=ON ")

if self.name == 'OpenMPI':
extra_opts = ""
Expand All @@ -104,7 +104,7 @@ def pre_configure_hook(self, *args, **kwargs):
"external libevent, which was not found. "
"Check parse_hook for dependency settings.")
else:
raise EasyBuildError("Error in pre_configure_hook for OpenMPI: PMIx not defined in dependencies. "
raise EasyBuildError("Error in pre_configure_hook for OpenMPI: PMIx not defined in deps. "
"Check parse_hook for dependency settings.")

if get_software_root('UCX'):
Expand All @@ -120,29 +120,29 @@ def pre_configure_hook(self, *args, **kwargs):
# extra_opts += "--with-knem=/opt/knem-1.1.2.90mlnx1 "

self.log.info("[pre-configure hook] Adding %s" % extra_opts)
self.cfg.update('configopts', extra_opts)
self.cfg.update('configure_opts', extra_opts)

if LooseVersion(self.version) >= LooseVersion('2.1'):
self.log.info("[pre-configure hook] Re-enabling ucx")
self.cfg['configopts'] = self.cfg['configopts'].replace('--without-ucx', ' ')
self.cfg['configure_opts'] = self.cfg['configure_opts'].replace('--without-ucx', ' ')

self.log.info("[pre-configure hook] Re-enabling dlopen")
self.cfg['configopts'] = self.cfg['configopts'].replace('--disable-dlopen', ' ')
self.cfg['configure_opts'] = self.cfg['configure_opts'].replace('--disable-dlopen', ' ')

if self.name == 'PMIx':
self.log.info("[pre-configure hook] Adding --with-munge")
self.cfg.update('configopts', "--with-munge ")
self.cfg.update('configure_opts', "--with-munge ")
if LooseVersion(self.version) >= LooseVersion('2'):
self.log.info("[pre-configure hook] Adding --with-tests-examples")
self.cfg.update('configopts', "--with-tests-examples ")
self.cfg.update('configure_opts', "--with-tests-examples ")
self.log.info("[pre-configure hook] Adding --disable-per-user-config-files")
self.cfg.update('configopts', "--disable-per-user-config-files")
self.cfg.update('configure_opts', "--disable-per-user-config-files")


def pre_build_hook(self, *args, **kwargs):
if self.name == 'pyslurm':
self.log.info("[pre-build hook] Adding --slurm=/lap/slurm")
self.cfg.update('buildopts', "--slurm=/lap/slurm ")
self.cfg.update('build_opts', "--slurm=/lap/slurm ")


def post_install_hook(self, *args, **kwargs):
Expand All @@ -160,25 +160,25 @@ def pre_module_hook(self, *args, **kwargs):
# Add I_MPI_PMI_LIBRARY to module for IntelMPI so it works with
# srun.
self.log.info("[pre-module hook] Set I_MPI_PMI_LIBRARY in impi module")
# Must be done this way, updating self.cfg['modextravars']
# Must be done this way, updating self.cfg['env_mod_extra_vars']
# directly doesn't work due to templating.
with self.cfg.disable_templating():
shlib_ext = get_shared_lib_ext()
pmix_root = get_software_root('PMIx')
if pmix_root:
mpi_type = 'pmix_v3'
self.cfg['modextravars'].update({
self.cfg['env_mod_extra_vars'].update({
'I_MPI_PMI_LIBRARY': os.path.join(pmix_root, "lib", "libpmi." + shlib_ext)
})
self.cfg['modextravars'].update({'SLURM_MPI_TYPE': mpi_type})
self.cfg['env_mod_extra_vars'].update({'SLURM_MPI_TYPE': mpi_type})
# Unfortunately UCX doesn't yet work for unknown reasons. Make sure it is off.
self.cfg['modextravars'].update({'SLURM_PMIX_DIRECT_CONN_UCX': 'false'})
self.cfg['env_mod_extra_vars'].update({'SLURM_PMIX_DIRECT_CONN_UCX': 'false'})
else:
self.cfg['modextravars'].update({'I_MPI_PMI_LIBRARY': "/lap/slurm/lib/libpmi.so"})
self.cfg['env_mod_extra_vars'].update({'I_MPI_PMI_LIBRARY': "/lap/slurm/lib/libpmi.so"})

if self.name == 'OpenBLAS':
self.log.info("[pre-module hook] Set OMP_NUM_THREADS=1 in OpenBLAS module")
self.cfg.update('modluafooter', 'if ((mode() == "load" and os.getenv("OMP_NUM_THREADS") == nil) '
self.cfg.update('env_mod_lua_footer', 'if ((mode() == "load" and os.getenv("OMP_NUM_THREADS") == nil) '
'or (mode() == "unload" and os.getenv("__OpenBLAS_set_OMP_NUM_THREADS") == "1")) then '
'setenv("OMP_NUM_THREADS","1"); setenv("__OpenBLAS_set_OMP_NUM_THREADS", "1") end')

Expand All @@ -193,16 +193,16 @@ def pre_module_hook(self, *args, **kwargs):
mpi_type = 'pmix_v3'

self.log.info("[pre-module hook] Set SLURM_MPI_TYPE=%s in OpenMPI module" % mpi_type)
# Must be done this way, updating self.cfg['modextravars']
# Must be done this way, updating self.cfg['env_mod_extra_vars']
# directly doesn't work due to templating.
with self.cfg.disable_templating():
self.cfg['modextravars'].update({'SLURM_MPI_TYPE': mpi_type})
self.cfg['env_mod_extra_vars'].update({'SLURM_MPI_TYPE': mpi_type})
# Unfortunately UCX doesn't yet work for unknown reasons. Make sure it is off.
self.cfg['modextravars'].update({'SLURM_PMIX_DIRECT_CONN_UCX': 'false'})
self.cfg['env_mod_extra_vars'].update({'SLURM_PMIX_DIRECT_CONN_UCX': 'false'})

if self.name == 'PMIx':
# This is a, hopefully, temporary workaround for https://github.com/pmix/pmix/issues/1114
if LooseVersion(self.version) > LooseVersion('2') and LooseVersion(self.version) < LooseVersion('3'):
self.log.info("[pre-module hook] Set PMIX_MCA_gds=^ds21 in PMIx module")
with self.cfg.disable_templating():
self.cfg['modextravars'].update({'PMIX_MCA_gds': '^ds21'})
self.cfg['env_mod_extra_vars'].update({'PMIX_MCA_gds': '^ds21'})