Hi Michael,
thank you for helping out! We did already figure out that our workload manager(which is not PBS) simply ignores PATH when exporting is enabled. We‘re already in touch with the vendor(us;-)).
Best regards,
Danny
Gesendet von Outlook für iOS<https://aka.ms/o0ukef>
________________________________
Von: Paul Markfort <pau...@gm...>
Gesendet: Sunday, April 23, 2023 8:10:06 PM
An: mod...@li... <mod...@li...>
Betreff: Re: [Modules] "module load" compatibility
Another use of reloading a module (effectively unload+load), is to make sure a path component is either at the end or start of the path (assuming it was originally added by that module). A good example is that base/dot module I have. NOTE:
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/BQNorrFsuw!2ltOJvky9tLhRT6N6sshjSQgycfo4YypYTOepjVPKAraY4qm5pKqXTgfoUq33tJ07fUyu6w9VsMb1gUSqZUnfO2a4JqacI91PEqUbMM$>
Report Suspicious
ZjQcmQRYFpfptBannerEnd
Another use of reloading a module (effectively unload+load), is to make sure a path component is either at the end or start of the path (assuming it was originally added by that module).
A good example is that base/dot module I have.
NOTE: (having dealt with windows for years) I prefer that "." (the current directory) NOT be in the path.
I use remove-path, in case . is already in the path; to guarantee that . is at the end of the path (the only place it should be if you put it in the path - In Windows/DOS: it is assumed at the start of the path, even if not there).
It is simply:
------------------ START ----
#%Module1.0
proc ModulesHelp { } {
puts stderr "Provides path support for . "
}
# Make sure it is put at the end
remove-path PATH "."
append-path PATH "."
------------------ END ------
I note, that a quick test with "Modules Release 5.2.0 (2022-11-08" points out an interesting behavior (that you should be aware of when using remove-path).
I first put . in the front of the path with:
PATH=".:$PATH"
Then "module load base/dot" - works as expected (. moves to the end).
Then "module unload base/dot" - and it does an unexpected (but not a bad thing):
It removes . from the path (I was expecting it to restore it to the front).
This is properly and fully documented in: man modulefile
(you can change this behavior) - so it is not a bug, nor does the default unload action of remove-path need to be changed (just unexpected, unless you read the man page thoroughly).
On 4/23/2023 11:53 AM, Sternberg, Michael G. via Modules-interest wrote:
> Danny,
>
> To diagnose where PATH takes an unexpected turn on a test execution node, temporarily add to /etc/profile or a subordinate file:
>
> test -n "$PBS_JOBID" && set -x
>
> Results will land in stderr of a test job that you have PBS run there. Don't forget to undo the above.
>
> The "#PBS -V" directive is a rather blunt instrument to carry over env. vars from the submission node to the job execution node (and the first one only at that). The env. may contain state variables from the submission node that are irrelevant or misleading on the execution node. Preferable would be loading modules per the system and user's shell dotfiles, or if needed to vary by job then by "module load …" commands in the job script itself, preceding the main application command.
>
>
>
> With best regards,
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly
those of the author(s). The content of this message has
not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: https://urldefense.com/v3/__http://paulfm.com/*paulfm/__;fg!!BQNorrFsuw!mSTkUSX2MK5sAHVOIZz9UODcS4SEbCWY0LaOf7R1fLgm55W23YE2vGoYYi18993VewzCF_Sjl-_Gask9VZV1ZSQS$[paulfm[.]com]
--------------------------------------------------------
_______________________________________________
Modules-interest mailing list
Mod...@li...
https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/modules-interest__;!!BQNorrFsuw!mSTkUSX2MK5sAHVOIZz9UODcS4SEbCWY0LaOf7R1fLgm55W23YE2vGoYYi18993VewzCF_Sjl-_Gask9VawtpOwF$[lists[.]sourceforge[.]net]
|