-
Notifications
You must be signed in to change notification settings - Fork 61
{2023.06}[NVHPC/25.1-CUDA-12.6] add hook for nvhpc #1043
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 2 commits
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 |
---|---|---|
|
@@ -744,6 +744,25 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs): | |
else: | ||
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!") | ||
|
||
def pre_configure_hook_nvhpc_x86_64(self, *args, **kwargs): | ||
""" | ||
pre-configure hook for nvhpc | ||
- search and replace operations in the ec dict | ||
""" | ||
if self.name == "NVHPC": | ||
eprefix = get_eessi_envvar("EPREFIX") | ||
new_opts = f'''installdir=%(installdir)s/Linux_x86_64/%(version)s | ||
EPREFIX={eprefix} | ||
sed -i "s@\(set LDSO=.*\);@\\1 --sysroot=$EPREFIX;@" $installdir/compilers/bin/localrc | ||
echo "set DEFLIBDIR=$EPREFIX/usr/lib64;" >> $installdir/compilers/bin/localrc | ||
echo "set DEFSTDOBJDIR=$EPREFIX/usr/lib64;" >> $installdir/compilers/bin/localrc''' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking about this a bit more, the logic here could be added directly to the relevant section of the NVHPC easyblock (and used conditionally based on whether the EB build option There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
old_opts = self.cfg['postinstallcmds'] | ||
self.cfg.update('postinstallcmds', new_opts) | ||
print_msg("Updated postinstall cmds from %s to %s", old_opts, new_opts) | ||
else: | ||
raise EasyBuildError("NVHPC-specific hook triggered for non-NVHPC easyconfig?!") | ||
|
||
|
||
|
||
def pre_test_hook(self, *args, **kwargs): | ||
"""Main pre-test hook: trigger custom functions based on software name.""" | ||
|
@@ -1218,6 +1237,7 @@ def post_module_hook(self, *args, **kwargs): | |
'GROMACS': pre_configure_hook_gromacs, | ||
'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic, | ||
'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep, | ||
'NVHPC': pre_configure_hook_nvhpc_x86_64, | ||
'OpenBLAS': pre_configure_hook_openblas_optarch_generic, | ||
'WRF': pre_configure_hook_wrf_aarch64, | ||
'LAMMPS': pre_configure_hook_LAMMPS_zen4, | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
This is good for now, but there is quite a bit of discussion currently about changing the naming in the EasyBuild context. We are currently naming the compilers only
NVHPC
but we should perhaps be defining a toolchain hierarchy forNVHPC
since they also contain MPI and some math libraries. This may lead to the compilers being called something likenvidia_compilers
orNVHPC
becoming a fatter toolchain.Uh oh!
There was an error while loading. Please reload this page.
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.
You're also going to need some versioning clauses here for things you have actually tested.
This is definitely a corner case at present as EESSI itself will not ship his toolchain (currently), and I wonder if we should not allow an environment variable to force the use of the hook, something like