clusterflow icon indicating copy to clipboard operation
clusterflow copied to clipboard

Clusterflow doesn't work with Lmod modulefile system

Open s-andrews opened this issue 6 years ago • 4 comments

On our system we're using the newer Lmod environment module system rather than the original environment modules.

LMod is syntactically and API compatible with environment modules, but uses different back end commands. Because clusterflow doesn't call module but goes behind to call modulecmd then it fails with Lmod.

I'll attach a patch which will test for LMod and will support it if that's what people are running.

s-andrews avatar Jun 07 '19 12:06 s-andrews

$ diff cf-orig cf
334,336c334,342
< if($CF_MODULES){
<       if (system('which modulecmd > /dev/null 2>&1')){
<               die( "ERROR - could not find modulecmd on the PATH. Aborting run.\n" .
---
>
> my $modulecmd = "modulecmd";
>
> if (exists $ENV{LMOD_CMD}) {
>               $modulecmd = $ENV{LMOD_CMD};
> }
>
> if($CF_MODULES){if (system("which $modulecmd > /dev/null 2>&1")){
>               die( "ERROR - could not find $modulecmd on the PATH. Aborting run.\n" .
1339c1345
<       my $mod_list = `modulecmd sh list 2>&1`;
---
>       my $mod_list = `$modulecmd sh list 2>&1`;

s-andrews avatar Jun 07 '19 12:06 s-andrews

Thanks! Can you just submit a PR instead of a diff?

ewels avatar Jun 07 '19 15:06 ewels

I already did :-)

s-andrews avatar Jun 07 '19 15:06 s-andrews

Ah you did already! x-ref #126

ewels avatar Jun 07 '19 15:06 ewels