kiwiroy / RLinuxModules

R package that makes linux environment modules available from R
Other
1 stars 1 forks source link

Update moduleInit.R to check env for modulecmd #8

Closed warrenson closed 3 months ago

warrenson commented 4 months ago

Fail only if modulecmd is not in the installation tree and not on the PATH.


Motivation

In RHEL9, modulecmd is not contained within the installation tree at MODULESHOME/bin/modulecmd, but is on the PATH at /usr/bin/modulecmd.

It seems wrong to moduleInit(modulesHome='/usr' when MODULESHOME=/usr/share/modules, even though this works.

Solution

One possible solution is to test for modulecomd in the env if it is not found at MODULESHOME/bin/modulecmd.

Foreseen Consequences

Possible issues where the modulecmd binary and installation mismatch, when multiple installations of Environment Modules exist on the same system, depending on how PATH is managed.

warrenson commented 3 months ago

This doesn't fix the issue, on further testing.