easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

Avoid using a priority in prepend_module_path (Lmod) to avoid costly module calls

Open Flamefire opened this issue 3 years ago • 6 comments

This PR avoids using a priority in prepend_module_path (Lmod) which means that $MODULEPATH can be directly modified by this and all subsequent calls to either prepend_module_path or use which is a lot faster than calling Lmod.

The test has been changed so it now expects that prepend_module_path actually does prepend even when no priority is passed and another priority is in effect. For compatibility I kept the constant 10000 as HIGH_PRIORITY so user sites that really want other module paths to take preference can use any higher priority.

As discussed in Slack this change is unlikely to effectively change any behavior and will very likely continue to work, see https://github.com/TACC/Lmod/issues/509#issuecomment-814502541

Fixes #3631

Flamefire avatar Apr 07 '21 10:04 Flamefire

@Flamefire Let's close #3634 and continue the discussion here. When this PR (#3636) gets merged, #3634 will also be merged automatically (since the commits included in here are also included in there), but context w.r.t. the discussion will be missing...

boegel avatar Apr 07 '21 12:04 boegel

@Flamefire Conflict resolution needed

akesandgren avatar May 26 '21 18:05 akesandgren

Rebased and conflicts resolved. That was quite a lot... Please double-check the changes

Flamefire avatar May 27 '21 07:05 Flamefire

This now looks good to me, but since it's large i'll wait for @boegel to review before merging.

akesandgren avatar May 27 '21 12:05 akesandgren

This one has a conflict

akesandgren avatar Feb 13 '23 07:02 akesandgren

@boegel A final review by you needed.

akesandgren avatar May 11 '23 08:05 akesandgren