Add ICON easyblock - #4206
Conversation
| if comp_fam in (toolchain.GCC, toolchain.INTELCOMP): | ||
| # LIBS is identical for foss and intel (no CUDA libraries, both need | ||
| # -Wl,--disable-new-dtags); NVHPC sets its own LIBS below. | ||
| self.cfg.update('configopts', ( | ||
| 'LIBS="' | ||
| ' -Wl,--disable-new-dtags -Wl,--as-needed' | ||
| ' -lxml2' | ||
| ' -lfyaml' | ||
| ' -leccodes_f90 -leccodes' | ||
| ' $LIBLAPACK' | ||
| ' -lnetcdff -lnetcdf' | ||
| ' -lstdc++' | ||
| '"' | ||
| )) |
There was a problem hiding this comment.
I think this can be confusing for people touching the EB after.
Here i would do something like
gcc_libs = ...
intel_libs = gcc_libs
nvhpc_libs = ...
and then do a self.cfg.update in the respective if blocks so that we have only one if/elseif/else chahin
There was a problem hiding this comment.
Also since we are writing an EB we can also add checks so that the required dependencies for the libraries specified here are actually loaded
More generically we should bring all the options that are now in the EC here and enable them when the appropriate dependency or toolchain + toolchain options are set
There was a problem hiding this comment.
Moved all configopts to the easyblock. Checking the necessary dependencies are present for the libraries. Also checking now for dependencies which would replace the installation via git submodules (one slightly strange thing here is that I had to infer the names of such a dependency even though no easyconfigs for those exist yet.) Is this what you had in mind?
| nvcc_gencode = ' '.join( | ||
| f'-gencode arch=compute_{cc},code=sm_{cc}' for cc in cuda_ccs.split(',') | ||
| ) | ||
| self.cfg.update('configopts', f'CUDAFLAGS="-ccbin=$CXX -O3 {nvcc_gencode}"') |
There was a problem hiding this comment.
Here and also for the other places i think we should try to respect the optimization flags passed by the TChain
There was a problem hiding this comment.
Passed them in the other places, but not here as I am not sure we have appropriate CUDAFLAGS for nvcc anywhere in easybuild. (CFLAGS is only compatible with nvc and not with nvcc.)
There was a problem hiding this comment.
We do in https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/toolchains/compiler/cuda.py, but we might need to initialize a separate TC inside the EB to extract this info, i am wondering if this should not somehow be part of the nvidia-compilers TC as well
There was a problem hiding this comment.
Yes, that makes more sense to me to add it to nvidia-compilers.
Move the configopts for ICON into an easyblock. In particular this is necessary for nicely including the CUDAFLAGS:
for each cuda compute capability. See easybuilders/easybuild-easyconfigs#26615.
Claude (Sonnet 5) was used to write and iterate on this easyblock under my direction and review; I verified claims against ICON's own configure.ac/autoconf macros and NVIDIA's nvcc documentation and ran all three (NVHPC/foss/intel) builds to completion to confirm correctness.