CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
1 stars 3 forks source link

Need to deal with already loaded modules in environment #200

Open ccarouge opened 8 months ago

ccarouge commented 8 months ago

Currently, benchcab loads modules but does not check or deal with already loaded modules. So if someone has netcdf, an intel compiler or MPI loaded, benchcab will return a module load error.

Should we use module switch instead? I haven't checked if switch works when no equivalent module is already loaded.

bschroeter commented 5 months ago

I've often seen a module purge being used prior to loading any modules and then loading the required set of modules on an empty module environment. Are there any issues with this approach?

ccarouge commented 4 months ago

If we do a module purge, we nuke pbs and have to load it again. It also nuke conda but I'm not sure if it's a problem. So I thought module switch was simpler. But benchcab could do a module purge+module load pbs when it is setting the environment instead.

The purge route is safer as it avoids dealing with weird issues when people load modules in their .bashrc.