clusterflow
clusterflow copied to clipboard
Clusterflow doesn't work with Lmod modulefile system
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.
$ 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`;
Thanks! Can you just submit a PR instead of a diff?
I already did :-)
Ah you did already! x-ref #126