Hello,
I would like to add on this discussion that the "family" modulefile command
that will be available in upcoming version 5.1 could help for such use case:
https://modules.readthedocs.io/en/latest/modulefile.html#mfcmd-family
Regards,
Xavier
Le jeu. 17 juin 2021 à 18:47, Bloecker, Martin <
Mar...@am...> a écrit :
> Hello Eric,
>
> One thing I forgot to point out: The approach described below requires the
> module auto-loading to be switched on. This can be done in multiple ways:
>
> 1. ./configure --enable-auto-handling during installation,
> 2. Setting environment variable MODULES_AUTO_HANDLING 1 , or
> 3. Using the --auto command line switch to the module command.
>
> Regards,
>
> Martin
>
> -----Original Message-----
> From: Bloecker, Martin <Mar...@am...>
> Sent: Donnerstag, 17. Juni 2021 12:56
> To: Environment Modules usage and discussion. <
> mod...@li...>
> Subject: Re: [Modules] module dependencies question :: sort of provides
>
> Hello Eric,
>
> I think one way to achieve what you want is for your 'foo' module to be
> dependent on a generic e.g. 'java8' module (i.e. prereq java8) rather than
> the explicit 'java/1.8.0'. This generic 'java8' module would then need to
> be dependent on either the 'java/1.8.0' or the 'graalvm-ce/java8-20.0.0'
> module to be loaded (i.e. prereq java/1.8.0 graalvm-ce/java8-20.0).
>
> With this setup
>
> module load foo
>
> should result in the modules 'java/1.8.0', 'java8' and 'foo' to be loaded,
> while a
>
> module load graalvm-ce/java8-20.0.0 foo
>
> should result in the modules 'graalvm-ce/java8-20.0.0', 'java8' and 'foo'
> to be loaded.
>
> Regards,
>
> Martin
>
> -----Original Message-----
> From: Eric Deveaud <ede...@pa...>
> Sent: Donnerstag, 17. Juni 2021 12:38
> To: mod...@li...
> Subject: [Modules] module dependencies question :: sort of provides
>
>
> Hello
>
>
> we have some tools that relies on java.
>
> we have installed various java flavours:
> java/1.7.0
> java/1.8.0
> java/13.0.2
> graalvm-ce/java8-20.0.0
> graalvm-ce/java11-20.0.0
>
>
> some user prefers to run with one of the java flavour installed, some with
> other one
>
>
> is there a way to have a modulefile describing a dependency to let's say
> JAVA that will be satisfied when one of the java//graalvm-ce module is
> loaded ?
>
> for exemple currently we have chosen that module foo depends on java/1.8.0
> so one wnating to run module foo with graallvm-ce/8 will have to do te
> following
>
> module load java/1.8.0 foo
> module swich -f java/1.8.0 graalvm-ce/java8-20.0.0
>
> best regards
>
> Eric
>
>
>
> _______________________________________________
> 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
>
|