You can subscribe to this list here.
1996 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(14) |
Jul
(6) |
Aug
(7) |
Sep
(1) |
Oct
(16) |
Nov
(9) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1997 |
Jan
(9) |
Feb
(1) |
Mar
(1) |
Apr
(3) |
May
(4) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
1998 |
Jan
(5) |
Feb
(5) |
Mar
(1) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(6) |
Oct
(8) |
Nov
|
Dec
(1) |
1999 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
(10) |
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(6) |
2000 |
Jan
(5) |
Feb
(19) |
Mar
(27) |
Apr
(22) |
May
(11) |
Jun
(1) |
Jul
|
Aug
(7) |
Sep
(3) |
Oct
(1) |
Nov
(13) |
Dec
(4) |
2001 |
Jan
(14) |
Feb
|
Mar
(5) |
Apr
(9) |
May
|
Jun
(5) |
Jul
(19) |
Aug
(8) |
Sep
(4) |
Oct
(4) |
Nov
(9) |
Dec
(17) |
2002 |
Jan
(17) |
Feb
(11) |
Mar
(5) |
Apr
(17) |
May
(17) |
Jun
(7) |
Jul
(18) |
Aug
(10) |
Sep
(20) |
Oct
(30) |
Nov
(3) |
Dec
(2) |
2003 |
Jan
(8) |
Feb
|
Mar
(2) |
Apr
|
May
(16) |
Jun
(35) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(45) |
Nov
(7) |
Dec
(13) |
2004 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(3) |
Jun
(11) |
Jul
(1) |
Aug
(2) |
Sep
(34) |
Oct
(26) |
Nov
(32) |
Dec
|
2005 |
Jan
(11) |
Feb
(2) |
Mar
(6) |
Apr
(60) |
May
(21) |
Jun
(14) |
Jul
(3) |
Aug
(6) |
Sep
(6) |
Oct
(13) |
Nov
(10) |
Dec
(19) |
2006 |
Jan
(32) |
Feb
(36) |
Mar
(7) |
Apr
(24) |
May
(5) |
Jun
(10) |
Jul
(4) |
Aug
(17) |
Sep
(13) |
Oct
(12) |
Nov
(1) |
Dec
(7) |
2007 |
Jan
(21) |
Feb
(16) |
Mar
(19) |
Apr
(2) |
May
(15) |
Jun
(18) |
Jul
(6) |
Aug
(2) |
Sep
(33) |
Oct
(21) |
Nov
|
Dec
|
2008 |
Jan
(10) |
Feb
(6) |
Mar
(2) |
Apr
(6) |
May
|
Jun
(13) |
Jul
(7) |
Aug
(12) |
Sep
(22) |
Oct
(8) |
Nov
(1) |
Dec
(25) |
2009 |
Jan
(6) |
Feb
(9) |
Mar
(13) |
Apr
(15) |
May
(17) |
Jun
(6) |
Jul
(7) |
Aug
|
Sep
(9) |
Oct
(28) |
Nov
(6) |
Dec
|
2010 |
Jan
(17) |
Feb
(3) |
Mar
|
Apr
(2) |
May
(20) |
Jun
(3) |
Jul
(9) |
Aug
(18) |
Sep
(10) |
Oct
(8) |
Nov
(9) |
Dec
(2) |
2011 |
Jan
(9) |
Feb
(4) |
Mar
(9) |
Apr
(7) |
May
(9) |
Jun
(31) |
Jul
(9) |
Aug
(15) |
Sep
(17) |
Oct
(7) |
Nov
(31) |
Dec
(2) |
2012 |
Jan
(16) |
Feb
(14) |
Mar
(59) |
Apr
(36) |
May
(28) |
Jun
(17) |
Jul
(6) |
Aug
(12) |
Sep
(21) |
Oct
(38) |
Nov
(14) |
Dec
(8) |
2013 |
Jan
(22) |
Feb
(8) |
Mar
(16) |
Apr
(50) |
May
(8) |
Jun
(44) |
Jul
(22) |
Aug
(7) |
Sep
(6) |
Oct
(5) |
Nov
(10) |
Dec
(1) |
2014 |
Jan
(1) |
Feb
(4) |
Mar
(16) |
Apr
(11) |
May
(24) |
Jun
(22) |
Jul
(32) |
Aug
(5) |
Sep
(5) |
Oct
(3) |
Nov
(15) |
Dec
(6) |
2015 |
Jan
(1) |
Feb
(33) |
Mar
(10) |
Apr
(2) |
May
(2) |
Jun
(8) |
Jul
(14) |
Aug
(4) |
Sep
(6) |
Oct
(1) |
Nov
(14) |
Dec
(8) |
2016 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(8) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
(4) |
Dec
|
2017 |
Jan
(1) |
Feb
(8) |
Mar
(32) |
Apr
(31) |
May
(23) |
Jun
(1) |
Jul
(7) |
Aug
(28) |
Sep
(17) |
Oct
(18) |
Nov
(16) |
Dec
(17) |
2018 |
Jan
(6) |
Feb
(26) |
Mar
(6) |
Apr
(15) |
May
(22) |
Jun
(11) |
Jul
(12) |
Aug
(28) |
Sep
(7) |
Oct
(22) |
Nov
(21) |
Dec
(10) |
2019 |
Jan
(12) |
Feb
(23) |
Mar
(4) |
Apr
(17) |
May
(29) |
Jun
(5) |
Jul
(15) |
Aug
(12) |
Sep
(21) |
Oct
(17) |
Nov
(9) |
Dec
(8) |
2020 |
Jan
(11) |
Feb
(14) |
Mar
(28) |
Apr
(2) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(7) |
2021 |
Jan
(5) |
Feb
(11) |
Mar
(6) |
Apr
(1) |
May
(10) |
Jun
(21) |
Jul
(21) |
Aug
(8) |
Sep
(4) |
Oct
(37) |
Nov
(4) |
Dec
|
2022 |
Jan
(27) |
Feb
|
Mar
(34) |
Apr
(41) |
May
(3) |
Jun
(18) |
Jul
(16) |
Aug
(5) |
Sep
(1) |
Oct
(3) |
Nov
(9) |
Dec
|
2023 |
Jan
(13) |
Feb
(2) |
Mar
(2) |
Apr
(18) |
May
(4) |
Jun
(9) |
Jul
(3) |
Aug
(3) |
Sep
(6) |
Oct
(6) |
Nov
(4) |
Dec
(3) |
2024 |
Jan
(8) |
Feb
(13) |
Mar
(1) |
Apr
(5) |
May
(4) |
Jun
(11) |
Jul
(3) |
Aug
(7) |
Sep
(5) |
Oct
(6) |
Nov
(9) |
Dec
(20) |
2025 |
Jan
(40) |
Feb
(27) |
Mar
(4) |
Apr
(2) |
May
(15) |
Jun
(14) |
Jul
(3) |
Aug
(5) |
Sep
(8) |
Oct
(3) |
Nov
|
Dec
|
From: Xavier D. <xav...@gm...> - 2024-12-24 10:25:13
|
The "is-loading" procedure exists but is not currently exposed in the modulefile evaluation context. You may try to expose it with "modulefile_extra_cmds" hook variable and see if it cope with your use case. The variant propagation method is a good one also. But I feel with your message that the "goat" module is not compiler-specific so it may not be semantically correct to have a compiler variant? Best regards, Xavier Le mar. 24 déc. 2024 à 11:13, Adrien COTTE <adr...@as...> a écrit : > > Hi Xavier, > Thank you for your quick response. > Indeed, it works. I thought I had already tried that, but my case was slightly different, unfortunately. > What about an "asked variant"? Perhaps an equivalent of "is-loading"? > If goat/2.0 is a prerequisite for ziege/1.0, the "is-loaded" approach cannot work. > Example: > File: /usr/share/modulefiles/ziege/1.0 > > #%Module > > set name "ziege" > set version "1.0" > > variant compiler > > prereq goat/2.0 > > File: /usr/share/modulefiles/goat/2.0 > > #%Module > > set name "goat" > set version "2.0" > > if { [is-loaded ziege compiler=gcc] } { > // does not work > } > > The only solution I've found is to propagate variants across my modules. > Updated Example: > File: /usr/share/modulefiles/ziege/1.0 > > #%Module > > set name "ziege" > set version "1.0" > > variant compiler > > prereq goat/2.0 compiler=[getvariant compiler] > > File: /usr/share/modulefiles/goat/2.0 > > #%Module > > set name "goat" > set version "2.0" > > variant compiler > > if { [getvariant compiler] == gcc } { > // code > } > > Let me know if you see any better way to handle this. > Best regards, > Adrien > ________________________________ > De : Xavier Delaruelle <xav...@gm...> > Envoyé : mardi 24 décembre 2024 09:52 > À : Environment Modules usage and discussion. <mod...@li...> > Objet : Re: [Modules] Get variant of another module > > Hi Adrien, > > As far as I remind, there is no function that currently gives you the > variants of a loaded module from another module, but you may try using > the "is-loaded" command: > > if {[is-loaded ziege compiler=gcc]} { > // code > } elseif {[is-loaded ziege compiler=llvm]} > .. > } > > Best, > Xavier > > Le mar. 24 déc. 2024 à 09:44, Adrien COTTE <adr...@as...> a écrit : > > > > Hi, > > > > Is it possible to get the variant of another module? > > > > A dummy example. > > > > $ module load ziege/1.0 compiler=gcc > > $ module load goat/2.0 > > > > In the goat/2.0 modulefile, I would like to check the ziege/1.0 compiler variant. > > > > Best, > > Adrien Cotte > > _______________________________________________ > > Modules-interest mailing list > > Mod...@li... > > https://lists.sourceforge.net/lists/listinfo/modules-interest > > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Adrien C. <adr...@as...> - 2024-12-24 09:49:35
|
Hi Xavier, Thank you for your quick response. Indeed, it works. I thought I had already tried that, but my case was slightly different, unfortunately. What about an "asked variant"? Perhaps an equivalent of "is-loading"? If goat/2.0 is a prerequisite for ziege/1.0, the "is-loaded" approach cannot work. Example: File: /usr/share/modulefiles/ziege/1.0 #%Module set name "ziege" set version "1.0" variant compiler prereq goat/2.0 File: /usr/share/modulefiles/goat/2.0 #%Module set name "goat" set version "2.0" if { [is-loaded ziege compiler=gcc] } { // does not work } The only solution I've found is to propagate variants across my modules. Updated Example: File: /usr/share/modulefiles/ziege/1.0 #%Module set name "ziege" set version "1.0" variant compiler prereq goat/2.0 compiler=[getvariant compiler] File: /usr/share/modulefiles/goat/2.0 #%Module set name "goat" set version "2.0" variant compiler if { [getvariant compiler] == gcc } { // code } Let me know if you see any better way to handle this. Best regards, Adrien ________________________________ De : Xavier Delaruelle <xav...@gm...> Envoyé : mardi 24 décembre 2024 09:52 À : Environment Modules usage and discussion. <mod...@li...> Objet : Re: [Modules] Get variant of another module Hi Adrien, As far as I remind, there is no function that currently gives you the variants of a loaded module from another module, but you may try using the "is-loaded" command: if {[is-loaded ziege compiler=gcc]} { // code } elseif {[is-loaded ziege compiler=llvm]} .. } Best, Xavier Le mar. 24 déc. 2024 à 09:44, Adrien COTTE <adr...@as...> a écrit : > > Hi, > > Is it possible to get the variant of another module? > > A dummy example. > > $ module load ziege/1.0 compiler=gcc > $ module load goat/2.0 > > In the goat/2.0 modulefile, I would like to check the ziege/1.0 compiler variant. > > Best, > Adrien Cotte > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest _______________________________________________ Modules-interest mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Xavier D. <xav...@gm...> - 2024-12-24 08:52:33
|
Hi Adrien, As far as I remind, there is no function that currently gives you the variants of a loaded module from another module, but you may try using the "is-loaded" command: if {[is-loaded ziege compiler=gcc]} { // code } elseif {[is-loaded ziege compiler=llvm]} .. } Best, Xavier Le mar. 24 déc. 2024 à 09:44, Adrien COTTE <adr...@as...> a écrit : > > Hi, > > Is it possible to get the variant of another module? > > A dummy example. > > $ module load ziege/1.0 compiler=gcc > $ module load goat/2.0 > > In the goat/2.0 modulefile, I would like to check the ziege/1.0 compiler variant. > > Best, > Adrien Cotte > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Adrien C. <adr...@as...> - 2024-12-24 08:42:49
|
Hi, Is it possible to get the variant of another module? A dummy example. $ module load ziege/1.0 compiler=gcc $ module load goat/2.0 In the goat/2.0 modulefile, I would like to check the ziege/1.0 compiler variant. Best, Adrien Cotte |
From: Xavier D. <xav...@gm...> - 2024-12-24 08:16:04
|
Hello Baudilio, I suggest to use a Unix group to distinguish the users that may test the code, then sourcing this test file in etc/initrc if user is part of this group: if {[module-info usergroups group_name]} { source /path/to/etc/nitric.TEST } I take the opportunity of this message to wish everyone a merry christmas. Best regards, Xavier Le mar. 24 déc. 2024 à 01:57, Baudilio Tejerina - NOAA Affiliate via Modules-interest <mod...@li...> a écrit : > > Hello. > > I need to add the following logic to the etc/initrc file. > Before putting the codeI in production, I have created the file etc/nitric.TEST also located in etc/ > > > switch -regexp -matchvar name -- $tcl_platform(osVersion) { > {el8} { > module use --append {/this/path8} > } > {el7} { > module use --append {/this/path7} > } > } > > > Is there a way a user could test it instead of parsing the current etc/initrc? > > Thank You! > > Baudilio > > > > Baudilio Tejerina, Ph. D. (Theoretical Physics and Chemistry) > NOAA Geophysical Fluid Dynamics Laboratory > Forrestal Campus, Princeton University > 201 Forrestal Rd., 164 > Princeton, NJ - 08540 > _______________________________ > GPG Key ID: 72668D3DD3D71B44 > ☎: (609) 452 5839 > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Baudilio T. - N. A. <bau...@no...> - 2024-12-24 00:56:23
|
Hello. I need to add the following logic to the etc/initrc file. Before putting the codeI in production, I have created the file etc/nitric.TEST also located in etc/ switch -regexp -matchvar name -- $tcl_platform(osVersion) { {el8} { module use --append {/this/path8} } {el7} { module use --append {/this/path7} } } Is there a way a user could test it instead of parsing the current etc/initrc? Thank You! Baudilio Baudilio Tejerina, Ph. D. (Theoretical Physics and Chemistry) NOAA Geophysical Fluid Dynamics Laboratory Forrestal Campus, Princeton University 201 Forrestal Rd., 164 Princeton, NJ - 08540 _______________________________ GPG Key ID: 72668D3DD3D71B44 ☎: (609) 452 5839 |
From: Xavier D. <xav...@gm...> - 2024-12-18 06:40:43
|
Dear All, I would like to let you know that I have improved the development documentation of the project in several ways: * add Developer HowTo (to understand how to add config option/module sub-command or how a new Modules release is created) [1] * create an acknowledgment page for former project leads [2] * write Modules project governance [3] to clarify how this project is currently organized Do not hesitate to comment, provide suggestion on that. You are welcome. Best regards, Xavier [1] https://modules.readthedocs.io/en/latest/devel.html [2] https://modules.readthedocs.io/en/latest/acknowledgments.html [3] https://modules.readthedocs.io/en/latest/GOVERNANCE.html |
From: Xavier D. <xav...@gm...> - 2024-12-13 07:27:41
|
Dear All, Modules repository is moving! It will now be available at https://github.com/envmodules/modules but don't panic old links will still be valid. The project is aiming at a neutral home, here named "envmodules", that also reflects the name handle used on social media platforms. This move does not change a thing regarding CEA support to the project. Many thanks to CEA for its support during the past years. Regards, Xavier |
From: Byron B. <byr...@pr...> - 2024-12-04 03:30:32
|
Perfect! I’ll give that a try! Thank you, Xavier and Paul. Byron Boulton On Tue, Dec 3, 2024 at 10:25 PM, Xavier Delaruelle <[xav...@gm...](mailto:On Tue, Dec 3, 2024 at 10:25 PM, Xavier Delaruelle <<a href=)> wrote: > The full module may look like: > > #%Module > if {[module-info mode load]} { > switch -- [module-info shelltype] { > sh {puts stdout "FOO='my\nmulti\nline\nvalue'; export FOO;"} > } > } elseif {[module-info mode unload]} { > unsetenv --unset-on-unload FOO > } > > Regards, > Xavier > > Le mar. 3 déc. 2024 à 23:53, Paul Markfort <pau...@gm...> a écrit : >> >> >> A little complicatesd; but, you should be able to figure this out for yourself: >> >> Read the MAN page for modulefile >> man modulefile >> >> The section you want is about module-info >> >> Specifically this: >> module-info mode [modetype] >> >> >> The if statement is similar to the way I used module-info shell >> You might put this new test inside the module-info shell test (or maybe outside, depending on what you want). >> >> You need to decide which module modes need an action - and what action you want for each. >> >> Obviously, for the "load" mode you want the puts statement. >> >> >> On 2024-12-03 4:33 PM, Byron Boulton via Modules-interest wrote: >> > Oh good point. I think people on our system are only using modules with bash and maybe zsh, but I should wrap it. >> > >> > Any idea if I can put something in the module file to undo setting the environment variable when someone runs “ml unload”? >> > >> > Byron Boulton >> > >> > Sent from [Proton Mail](https://proton.me/mail/home) for iOS >> > >> > On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <[pau...@gm...](mailto:On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <<a href=)> wrote: >> > >> >> You might want to surround that code to make sure it is only run for bash. >> >> >> >> if { [module-info shell bash] } { >> >> puts stdout "export FOO='my\nmulti\nline\nvalue';" >> >> } >> >> >> >> Note: >> >> The real sh (bourne shell) doesn't allow export to set values inline. >> >> However, on linux, sh is actually bash (usually). >> >> >> >> On 2024-12-03 1:59 PM, Xavier Delaruelle wrote: >> >>> Hello Byron, >> >>> >> >>> Setting a multi-line value to an environment variable with "setenv" is >> >>> not possible with current version of Modules. I will look at >> >>> implementing such feature. >> >>> >> >>> As a workaround, you may use the "puts" command to craft the shell >> >>> command to define variable with such specific value: >> >>> >> >>> #%Module >> >>> puts stdout "export FOO='my\nmulti\nline\nvalue';" >> >>> >> >>> Regards, >> >>> Xavier >> >>> >> >>> Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest >> >>> <mod...@li...> a écrit : >> >>>> >> >>>> I need to set-env a variable with contents from a file. In bash I can do this with >> >>>> >> >>>> export FOO="$(cat /home/username/foofile.dat)" >> >>>> >> >>>> So far I tried various permutations like >> >>>> >> >>>> set fp [open "/home/username/foofile.dat"] >> >>>> set file_data [read $fp] >> >>>> close $fp >> >>>> set-env FOO "$file_data" >> >>>> >> >>>> But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. >> >>>> >> >>>> Does anyone have ideas on how I can set a multiline variable from the contents of a file? >> >>>> >> >>>> (Some keywords for future searchability in the archives: multiline, multi-line, newline) >> >>>> >> >>>> Byron >> >>> >> >>> >> >>> _______________________________________________ >> >>> Modules-interest mailing list >> >>> Mod...@li... >> >>> https://lists.sourceforge.net/lists/listinfo/modules-interest >> >>> >> >> >> >> -- >> >> -------------------------------------------------------- >> >> 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: http://paulfm.com/~paulfm/ >> >> -------------------------------------------------------- >> >> >> >> _______________________________________________ >> >> Modules-interest mailing list >> >> Mod...@li... >> >> https://lists.sourceforge.net/lists/listinfo/modules-interest >> >> >> >> >> >> _______________________________________________ >> >> Modules-interest mailing list >> >> Mod...@li... >> >> https://lists.sourceforge.net/lists/listinfo/modules-interest >> >> -- >> -------------------------------------------------------- >> 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: http://paulfm.com/~paulfm/ >> -------------------------------------------------------- >> >> >> _______________________________________________ >> Modules-interest mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/modules-interest > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Xavier D. <xav...@gm...> - 2024-12-04 03:26:00
|
The full module may look like: #%Module if {[module-info mode load]} { switch -- [module-info shelltype] { sh {puts stdout "FOO='my\nmulti\nline\nvalue'; export FOO;"} } } elseif {[module-info mode unload]} { unsetenv --unset-on-unload FOO } Regards, Xavier Le mar. 3 déc. 2024 à 23:53, Paul Markfort <pau...@gm...> a écrit : > > > A little complicatesd; but, you should be able to figure this out for yourself: > > Read the MAN page for modulefile > man modulefile > > The section you want is about module-info > > Specifically this: > module-info mode [modetype] > > > The if statement is similar to the way I used module-info shell > You might put this new test inside the module-info shell test (or maybe outside, depending on what you want). > > You need to decide which module modes need an action - and what action you want for each. > > Obviously, for the "load" mode you want the puts statement. > > > On 2024-12-03 4:33 PM, Byron Boulton via Modules-interest wrote: > > Oh good point. I think people on our system are only using modules with bash and maybe zsh, but I should wrap it. > > > > Any idea if I can put something in the module file to undo setting the environment variable when someone runs “ml unload”? > > > > Byron Boulton > > > > Sent from [Proton Mail](https://proton.me/mail/home) for iOS > > > > On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <[pau...@gm...](mailto:On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <<a href=)> wrote: > > > >> You might want to surround that code to make sure it is only run for bash. > >> > >> if { [module-info shell bash] } { > >> puts stdout "export FOO='my\nmulti\nline\nvalue';" > >> } > >> > >> Note: > >> The real sh (bourne shell) doesn't allow export to set values inline. > >> However, on linux, sh is actually bash (usually). > >> > >> On 2024-12-03 1:59 PM, Xavier Delaruelle wrote: > >>> Hello Byron, > >>> > >>> Setting a multi-line value to an environment variable with "setenv" is > >>> not possible with current version of Modules. I will look at > >>> implementing such feature. > >>> > >>> As a workaround, you may use the "puts" command to craft the shell > >>> command to define variable with such specific value: > >>> > >>> #%Module > >>> puts stdout "export FOO='my\nmulti\nline\nvalue';" > >>> > >>> Regards, > >>> Xavier > >>> > >>> Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest > >>> <mod...@li...> a écrit : > >>>> > >>>> I need to set-env a variable with contents from a file. In bash I can do this with > >>>> > >>>> export FOO="$(cat /home/username/foofile.dat)" > >>>> > >>>> So far I tried various permutations like > >>>> > >>>> set fp [open "/home/username/foofile.dat"] > >>>> set file_data [read $fp] > >>>> close $fp > >>>> set-env FOO "$file_data" > >>>> > >>>> But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. > >>>> > >>>> Does anyone have ideas on how I can set a multiline variable from the contents of a file? > >>>> > >>>> (Some keywords for future searchability in the archives: multiline, multi-line, newline) > >>>> > >>>> Byron > >>> > >>> > >>> _______________________________________________ > >>> Modules-interest mailing list > >>> Mod...@li... > >>> https://lists.sourceforge.net/lists/listinfo/modules-interest > >>> > >> > >> -- > >> -------------------------------------------------------- > >> 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: http://paulfm.com/~paulfm/ > >> -------------------------------------------------------- > >> > >> _______________________________________________ > >> Modules-interest mailing list > >> Mod...@li... > >> https://lists.sourceforge.net/lists/listinfo/modules-interest > >> > >> > >> _______________________________________________ > >> Modules-interest mailing list > >> Mod...@li... > >> https://lists.sourceforge.net/lists/listinfo/modules-interest > > -- > -------------------------------------------------------- > 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: http://paulfm.com/~paulfm/ > -------------------------------------------------------- > > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Paul M. <pau...@gm...> - 2024-12-03 22:53:13
|
A little complicatesd; but, you should be able to figure this out for yourself: Read the MAN page for modulefile man modulefile The section you want is about module-info Specifically this: module-info mode [modetype] The if statement is similar to the way I used module-info shell You might put this new test inside the module-info shell test (or maybe outside, depending on what you want). You need to decide which module modes need an action - and what action you want for each. Obviously, for the "load" mode you want the puts statement. On 2024-12-03 4:33 PM, Byron Boulton via Modules-interest wrote: > Oh good point. I think people on our system are only using modules with bash and maybe zsh, but I should wrap it. > > Any idea if I can put something in the module file to undo setting the environment variable when someone runs “ml unload”? > > Byron Boulton > > Sent from [Proton Mail](https://proton.me/mail/home) for iOS > > On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <[pau...@gm...](mailto:On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <<a href=)> wrote: > >> You might want to surround that code to make sure it is only run for bash. >> >> if { [module-info shell bash] } { >> puts stdout "export FOO='my\nmulti\nline\nvalue';" >> } >> >> Note: >> The real sh (bourne shell) doesn't allow export to set values inline. >> However, on linux, sh is actually bash (usually). >> >> On 2024-12-03 1:59 PM, Xavier Delaruelle wrote: >>> Hello Byron, >>> >>> Setting a multi-line value to an environment variable with "setenv" is >>> not possible with current version of Modules. I will look at >>> implementing such feature. >>> >>> As a workaround, you may use the "puts" command to craft the shell >>> command to define variable with such specific value: >>> >>> #%Module >>> puts stdout "export FOO='my\nmulti\nline\nvalue';" >>> >>> Regards, >>> Xavier >>> >>> Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest >>> <mod...@li...> a écrit : >>>> >>>> I need to set-env a variable with contents from a file. In bash I can do this with >>>> >>>> export FOO="$(cat /home/username/foofile.dat)" >>>> >>>> So far I tried various permutations like >>>> >>>> set fp [open "/home/username/foofile.dat"] >>>> set file_data [read $fp] >>>> close $fp >>>> set-env FOO "$file_data" >>>> >>>> But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. >>>> >>>> Does anyone have ideas on how I can set a multiline variable from the contents of a file? >>>> >>>> (Some keywords for future searchability in the archives: multiline, multi-line, newline) >>>> >>>> Byron >>> >>> >>> _______________________________________________ >>> Modules-interest mailing list >>> Mod...@li... >>> https://lists.sourceforge.net/lists/listinfo/modules-interest >>> >> >> -- >> -------------------------------------------------------- >> 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: http://paulfm.com/~paulfm/ >> -------------------------------------------------------- >> >> _______________________________________________ >> Modules-interest mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/modules-interest >> >> >> _______________________________________________ >> Modules-interest mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/modules-interest -- -------------------------------------------------------- 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: http://paulfm.com/~paulfm/ -------------------------------------------------------- |
From: Byron B. <byr...@pr...> - 2024-12-03 22:33:56
|
Oh good point. I think people on our system are only using modules with bash and maybe zsh, but I should wrap it. Any idea if I can put something in the module file to undo setting the environment variable when someone runs “ml unload”? Byron Boulton Sent from [Proton Mail](https://proton.me/mail/home) for iOS On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <[pau...@gm...](mailto:On Tue, Dec 3, 2024 at 4:13 PM, Paul Markfort <<a href=)> wrote: > You might want to surround that code to make sure it is only run for bash. > > if { [module-info shell bash] } { > puts stdout "export FOO='my\nmulti\nline\nvalue';" > } > > Note: > The real sh (bourne shell) doesn't allow export to set values inline. > However, on linux, sh is actually bash (usually). > > On 2024-12-03 1:59 PM, Xavier Delaruelle wrote: >> Hello Byron, >> >> Setting a multi-line value to an environment variable with "setenv" is >> not possible with current version of Modules. I will look at >> implementing such feature. >> >> As a workaround, you may use the "puts" command to craft the shell >> command to define variable with such specific value: >> >> #%Module >> puts stdout "export FOO='my\nmulti\nline\nvalue';" >> >> Regards, >> Xavier >> >> Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest >> <mod...@li...> a écrit : >>> >>> I need to set-env a variable with contents from a file. In bash I can do this with >>> >>> export FOO="$(cat /home/username/foofile.dat)" >>> >>> So far I tried various permutations like >>> >>> set fp [open "/home/username/foofile.dat"] >>> set file_data [read $fp] >>> close $fp >>> set-env FOO "$file_data" >>> >>> But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. >>> >>> Does anyone have ideas on how I can set a multiline variable from the contents of a file? >>> >>> (Some keywords for future searchability in the archives: multiline, multi-line, newline) >>> >>> Byron >> >> >> _______________________________________________ >> Modules-interest mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/modules-interest >> > > -- > -------------------------------------------------------- > 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: http://paulfm.com/~paulfm/ > -------------------------------------------------------- > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Paul M. <pau...@gm...> - 2024-12-03 21:13:56
|
You might want to surround that code to make sure it is only run for bash. if { [module-info shell bash] } { puts stdout "export FOO='my\nmulti\nline\nvalue';" } Note: The real sh (bourne shell) doesn't allow export to set values inline. However, on linux, sh is actually bash (usually). On 2024-12-03 1:59 PM, Xavier Delaruelle wrote: > Hello Byron, > > Setting a multi-line value to an environment variable with "setenv" is > not possible with current version of Modules. I will look at > implementing such feature. > > As a workaround, you may use the "puts" command to craft the shell > command to define variable with such specific value: > > #%Module > puts stdout "export FOO='my\nmulti\nline\nvalue';" > > Regards, > Xavier > > Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest > <mod...@li...> a écrit : >> >> I need to set-env a variable with contents from a file. In bash I can do this with >> >> export FOO="$(cat /home/username/foofile.dat)" >> >> So far I tried various permutations like >> >> set fp [open "/home/username/foofile.dat"] >> set file_data [read $fp] >> close $fp >> set-env FOO "$file_data" >> >> But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. >> >> Does anyone have ideas on how I can set a multiline variable from the contents of a file? >> >> (Some keywords for future searchability in the archives: multiline, multi-line, newline) >> >> Byron > > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest > -- -------------------------------------------------------- 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: http://paulfm.com/~paulfm/ -------------------------------------------------------- |
From: Byron B. <byr...@pr...> - 2024-12-03 21:07:50
|
If I use a puts command to set the variable, is there a way to have the module unset that value when I run module unload? Byron Boulton On Tue, Dec 3, 2024 at 2:59 PM, Xavier Delaruelle <[xav...@gm...](mailto:On Tue, Dec 3, 2024 at 2:59 PM, Xavier Delaruelle <<a href=)> wrote: > Hello Byron, > > Setting a multi-line value to an environment variable with "setenv" is > not possible with current version of Modules. I will look at > implementing such feature. > > As a workaround, you may use the "puts" command to craft the shell > command to define variable with such specific value: > > #%Module > puts stdout "export FOO='my\nmulti\nline\nvalue';" > > Regards, > Xavier > > Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest > <mod...@li...> a écrit : >> >> I need to set-env a variable with contents from a file. In bash I can do this with >> >> export FOO="$(cat /home/username/foofile.dat)" >> >> So far I tried various permutations like >> >> set fp [open "/home/username/foofile.dat"] >> set file_data [read $fp] >> close $fp >> set-env FOO "$file_data" >> >> But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. >> >> Does anyone have ideas on how I can set a multiline variable from the contents of a file? >> >> (Some keywords for future searchability in the archives: multiline, multi-line, newline) >> >> Byron > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Xavier D. <xav...@gm...> - 2024-12-03 19:59:53
|
Hello Byron, Setting a multi-line value to an environment variable with "setenv" is not possible with current version of Modules. I will look at implementing such feature. As a workaround, you may use the "puts" command to craft the shell command to define variable with such specific value: #%Module puts stdout "export FOO='my\nmulti\nline\nvalue';" Regards, Xavier Le mar. 3 déc. 2024 à 15:16, Byron Boulton via Modules-interest <mod...@li...> a écrit : > > I need to set-env a variable with contents from a file. In bash I can do this with > > export FOO="$(cat /home/username/foofile.dat)" > > So far I tried various permutations like > > set fp [open "/home/username/foofile.dat"] > set file_data [read $fp] > close $fp > set-env FOO "$file_data" > > But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. > > Does anyone have ideas on how I can set a multiline variable from the contents of a file? > > (Some keywords for future searchability in the archives: multiline, multi-line, newline) > > Byron |
From: Byron B. <byr...@pr...> - 2024-12-03 14:15:18
|
I need to set-env a variable with contents from a file. In bash I can do this with export FOO="$(cat /home/username/foofile.dat)" So far I tried various permutations like set fp [open "/home/username/foofile.dat"] set file_data [read $fp] close $fp set-env FOO "$file_data" But I always end up with a “command not found” message from bash trying to evaluate the second line of the file. This shows me that the module load must outputting a string to bash that is only setting the first line of the file to the variable FOO, then the subsequent file lines are getting dropped right to bash to evaluate. Does anyone have ideas on how I can set a multiline variable from the contents of a file? (Some keywords for future searchability in the archives: multiline, multi-line, newline) Byron |
From: Patrick B. <Pat...@un...> - 2024-11-27 09:58:38
|
Thank you Laurent for the quick answer. I'm not familiar with tcl language and I was not aware of this syntax! I've juste moved the loading of the required modules in a "prereq-all" directive and all is running as expected with your suggestion. So, changing a required module update "automagically" the setup. Patrick Le 27/11/2024 à 10:30, Laurent BESSON a écrit : > > Hello Patrick > > Module syntax is in tcl. So, if I understand correctly your need, I > would write something like > > setenv IRL_DIR [exec pkg-config --variable=prefix irl_fortran] > > Best regards, > > Laurent BESSON > > -----Message d'origine----- > De : Patrick Begou <Pat...@un...> > Envoyé : mercredi 27 novembre 2024 10:05 > À : mod...@li... > Objet : [Modules] Using linux command in module file > > Hi, > > this is my first post on the list. I'm using module environment for a > while, but I'm stuck to create a module for a specific software. > > The sotfware requires some additional libraries managed with module > environment so, for example, in my user module file I use: > > if [ module-info mode load ] { > > module load GCC14/irl-2024.11.26 > > } > > to load this required irl-2024.11.26 module which is system wide. > > Then, in my user's module file, I need to set a variable based on the > environment set up with the above module. With bash I would write: > > IRL_DIR=$(pkg-config --variable=prefix irl_fortran) > > as the pkg-config path has been setup when loading the > > GCC14/irl-2024.11.26 module. > > Is there a way to do this in my module file to ensure that the IRL_DIR > variable will be set dynamicaly and correctly with the irl loaded module ? > > Thank you for your advices. > > Patrick > > _______________________________________________ > > Modules-interest mailing list > > Mod...@li... > <mailto:Mod...@li...> > > https://lists.sourceforge.net/lists/listinfo/modules-interest > <https://lists.sourceforge.net/lists/listinfo/modules-interest> > > > > _______________________________________________ > Modules-interest mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Laurent B. <lau...@ea...> - 2024-11-27 09:30:55
|
Hello Patrick Module syntax is in tcl. So, if I understand correctly your need, I would write something like setenv IRL_DIR [exec pkg-config --variable=prefix irl_fortran] Best regards, Laurent BESSON -----Message d'origine----- De : Patrick Begou <Pat...@un...> Envoyé : mercredi 27 novembre 2024 10:05 À : mod...@li... Objet : [Modules] Using linux command in module file Hi, this is my first post on the list. I'm using module environment for a while, but I'm stuck to create a module for a specific software. The sotfware requires some additional libraries managed with module environment so, for example, in my user module file I use: if [ module-info mode load ] { module load GCC14/irl-2024.11.26 } to load this required irl-2024.11.26 module which is system wide. Then, in my user's module file, I need to set a variable based on the environment set up with the above module. With bash I would write: IRL_DIR=$(pkg-config --variable=prefix irl_fortran) as the pkg-config path has been setup when loading the GCC14/irl-2024.11.26 module. Is there a way to do this in my module file to ensure that the IRL_DIR variable will be set dynamicaly and correctly with the irl loaded module ? Thank you for your advices. Patrick _______________________________________________ Modules-interest mailing list Mod...@li...<mailto:Mod...@li...> https://lists.sourceforge.net/lists/listinfo/modules-interest |
From: Patrick B. <Pat...@un...> - 2024-11-27 09:23:03
|
Hi, this is my first post on the list. I'm using module environment for a while, but I'm stuck to create a module for a specific software. The sotfware requires some additional libraries managed with module environment so, for example, in my user module file I use: if [ module-info mode load ] { module load GCC14/irl-2024.11.26 } to load this required irl-2024.11.26 module which is system wide. Then, in my user's module file, I need to set a variable based on the environment set up with the above module. With bash I would write: IRL_DIR=$(pkg-config --variable=prefix irl_fortran) as the pkg-config path has been setup when loading the GCC14/irl-2024.11.26 module. Is there a way to do this in my module file to ensure that the IRL_DIR variable will be set dynamicaly and correctly with the irl loaded module ? Thank you for your advices. Patrick |
From: Xavier D. <xav...@gm...> - 2024-11-22 22:08:57
|
Hello All, I would like to let you know that I have created an account for Modules project on the Bluesky social media. The account is @envmodules.bsky.social. Like for Twitter/X and Mastodon, I will share news of the project on this platform. Cheers, Xavier |
From: Xavier D. <xav...@gm...> - 2024-11-19 18:03:50
|
If you want a broader view on the available "module" implementations, Robert McLay is also participating to SC24 and he will talk about Lmod on TACC booth (1203) on Wednesday at 2pm. Cheers, Xavier Le dim. 17 nov. 2024 à 16:22, Xavier Delaruelle <xav...@gm...> a écrit : > > Hi All, > > I am participating to SC24. I will be on CEA booth (#4143) on > Wednesday 20th at 11am. > > I have cooked some examples to demonstrate new and upcoming features > of Modules. It will also be a good opportunity to chat or if you have > some specific question. > > There will also be some Modules stickers to grab :-). > > Cheers, > Xavier |
From: Xavier D. <xav...@gm...> - 2024-11-17 21:22:57
|
Hi All, I am participating to SC24. I will be on CEA booth (#4143) on Wednesday 20th at 11am. I have cooked some examples to demonstrate new and upcoming features of Modules. It will also be a good opportunity to chat or if you have some specific question. There will also be some Modules stickers to grab :-). Cheers, Xavier |
From: Xavier D. <xav...@gm...> - 2024-11-14 06:18:58
|
Hello All, I am taking the opportunity of the Modules 5.5 release to announce that I am starting my self-company, XaDev, in addition to my primary job. This new activity will be about developing specific features on Modules, providing expertise to deploy and setup the tool to fit your needs, etc. Do not hesitate to contact me if you want to exchange on some needs and get a quote. If you just want to support my regular work on the Modules project, you can now sponsor me on GitHub: https://github.com/sponsors/xdelaruelle Best regards, Xavier Le lun. 11 nov. 2024 à 14:03, Xavier Delaruelle <xav...@gm...> a écrit : > > Hello All, > > I am thrilled to announce that Modules 5.5 is out! Many new features > have been added, the most prominent are: Logging activity, Negating > extra match search criteria, PowerShell support, Specific modulepath > for requirements, Conflict unload and Improved automated module > handling mechanisms. > > Details on the major changes included in this new release are provided > in the MIGRATING document. The list of all changes made in this new > version are described in the NEWS document. > > http://modules.readthedocs.io/en/stable/MIGRATING.html > http://modules.readthedocs.io/en/stable/NEWS.html > > The tarball of this new version can be downloaded at: > > http://downloads.sourceforge.net/modules/modules-5.5.0.tar.gz > > The zipball to install this new version on Windows platform can be > downloaded at: > > http://downloads.sourceforge.net/modules/modules-5.5.0-win.zip > > If you encounter any issue, please let us know by creating a ticket on > the project bug tracker at: > > https://github.com/cea-hpc/modules/issues > > Many thanks to Laurent Besson, Robert McLay and Simon Lukas Märtens > for their contribution to this release. Many thanks also to all of you > who improve Modules by reporting bugs or sharing new ideas. > > Best regards, > Xavier |
From: Xavier D. <xav...@gm...> - 2024-11-11 13:03:55
|
Hello All, I am thrilled to announce that Modules 5.5 is out! Many new features have been added, the most prominent are: Logging activity, Negating extra match search criteria, PowerShell support, Specific modulepath for requirements, Conflict unload and Improved automated module handling mechanisms. Details on the major changes included in this new release are provided in the MIGRATING document. The list of all changes made in this new version are described in the NEWS document. http://modules.readthedocs.io/en/stable/MIGRATING.html http://modules.readthedocs.io/en/stable/NEWS.html The tarball of this new version can be downloaded at: http://downloads.sourceforge.net/modules/modules-5.5.0.tar.gz The zipball to install this new version on Windows platform can be downloaded at: http://downloads.sourceforge.net/modules/modules-5.5.0-win.zip If you encounter any issue, please let us know by creating a ticket on the project bug tracker at: https://github.com/cea-hpc/modules/issues Many thanks to Laurent Besson, Robert McLay and Simon Lukas Märtens for their contribution to this release. Many thanks also to all of you who improve Modules by reporting bugs or sharing new ideas. Best regards, Xavier |
From: Xavier D. <xav...@gm...> - 2024-11-11 08:21:52
|
Dear All, Last feature addition for upcoming v5.5: the introduction of a --modulepath option on the always-load, depends-on, prereq, prereq-all and prereq-any modulefile commands. This new option indicates that requirement should be specifically searched in the provided list of modulepaths. Such mechanism helps to ensure loaded requirements are those expected and they are not coming from an unexpected module tree. See examples at: https://modules.readthedocs.io/en/latest/MIGRATING.html#specific-modulepath-for-requirements Regards, Xavier |