Currently, environment-variables in modules.yaml are consequently casted to uppercase.
In packages like Ice-T it's actually relevant if ICET_DIR or IceT_DIR is set in the environment, since only the latter is honored by CMake properly.
Probably, we should not change the spelling of such variables if the user sets them explicitly. This "cast-to-uppercase" was probably added because generic syntax such as
environment:
set:
'${PACKAGE}_ROOT': '${PREFIX}'
is allowed which usually needs the package name in uppercase.
Example snippet that breaks my IceT hint:
modules:
enable::
- lmod
lmod:
core_compilers:
- 'gcc@5.4.0'
hash_length: 0
gcc:
environment:
set:
CC: gcc
CXX: g++
FC: gfortran
F90: gfortran
F77: gfortran
openmpi:
environment:
set:
OMPI_MCA_mpi_leave_pinned: '0'
icet:
environment:
set:
IceT_DIR: '${PREFIX}/lib'
does not set and IceT_DIR but an ICET_DIR.
Both cases are actually only triggered by a double-inconsistency in IceT:
- it's CMake config scripts are installed at the wrong place and
- all CMake ENV var hints are traditionally UPPERCASE (and only CMake vars are case-sensitive)
Therefore we could also decide to just ignore that problem and I could try to work-around it via:
icet:
environment:
prepend_path:
CMAKE_PREFIX_PATH: '${PREFIX}/lib'
which is luckily already uppercase.
The same happens to OMPI_MCA_mpi_leave_pinned (-> OMPI_MCA_MPI_LEAVE_PINNED) above, where I am not sure if the spelling might again be critical for MPI's understanding of it.
ccing @alalazo
Currently, environment-variables in
modules.yamlare consequently casted to uppercase.In packages like
Ice-Tit's actually relevant ifICET_DIRorIceT_DIRis set in the environment, since only the latter is honored by CMake properly.Probably, we should not change the spelling of such variables if the user sets them explicitly. This "cast-to-uppercase" was probably added because generic syntax such as
is allowed which usually needs the package name in uppercase.
Example snippet that breaks my
IceThint:does not set and
IceT_DIRbut anICET_DIR.Both cases are actually only triggered by a double-inconsistency in IceT:
Therefore we could also decide to just ignore that problem and I could try to work-around it via:
which is luckily already uppercase.
The same happens to
OMPI_MCA_mpi_leave_pinned(->OMPI_MCA_MPI_LEAVE_PINNED) above, where I am not sure if the spelling might again be critical for MPI's understanding of it.ccing @alalazo