Hi Adrien,
To cover the need you express, I think a new modulefile Tcl command
`provide` should be introduced.
I have created an issue for that: https://github.com/cea-hpc/modules/issues/539
I currently plan to land such new feature for 5.6 (so after 5.5)
Best regards,
Xavier
Le ven. 26 avr. 2024 à 10:44, Adrien COTTE - Groupe EOLEN
<adr...@eo...> a écrit :
>
> Hi Xavier,
>
> The module family feature is really cool, but not enough in my situation
> (I guess).
>
> My module nvhpc provides a certain version of CUDA.
> For example, "nvhpc/24.3" provides CUDA-12.3 and "nvhpc/21.7" provides
> CUDA-11.4.
> And my modules "cuda-toolkit/<version>" provide CUDA-<version>.
>
> It's the same issue with "python3/3.11.4" and "anaconda3/2023.09" which
> provide Python3.11.
> But, "intelpython/24.1" provides Python3.9.
>
> So, if i'm right, I have to combine family with several conflicts,
> example with "nvhpc/24.3":
>
> #%Module
>
> family CUDA-12.3
> conflict CUDA-11.8
> conflict CUDA-11.7
> conflict CUDA-11.6
> conflict CUDA-11.5
> conflict CUDA-11.4
> conflict CUDA-11.3
> conflict CUDA-11.2
> conflict CUDA-11.1
> conflict CUDA-11.0
>
> Any way to specify a sort of "sub family" or "family version"?
> Maybe I miss something, what do you think about my use case?
>
> Best,
> Adrien
>
> note: my modules are in lowercase, my families are in uppercase
>
> ________________________________
> De : Adrien COTTE - Groupe EOLEN <adr...@eo...>
> Envoyé : samedi 20 avril 2024 à 09:49
> À : Environment Modules usage and discussion.
> Objet : Re: [Modules] Set a module "family provider" as a prerequisite?
>
> Thanks, gonna give a try!
> ________________________________
> From: Xavier Delaruelle <xav...@gm...>
> Sent: Saturday, April 20, 2024 7:53:18 AM
> To: Environment Modules usage and discussion. <mod...@li...>
> Subject: Re: [Modules] Set a module "family provider" as a prerequisite?
>
> Hi Adrien,
>
> family and module-alias should help you there.
>
> family defines a conflict + a module alias when module is loaded. Add
> this line in your cuda-toolkit and nvhpc modulefiles:
>
> family cuda
>
> then a module alias shoud be added to find the default "cuda" module.
> Add the following command to the global or modulepath-specific
> .modulerc file:
>
> module-alias cuda cuda-toolkit/<version>
>
> you can now update all modulefiles requiring either cuda-toolkit or
> nvhpc to make them requiring cuda:
>
> prereq cuda
>
> I have tested this on my side and it seems to work well:
>
> $ ml app
> Loading app/1
> Loading requirement: cuda-toolkit/1
>
> $ ml switch cuda-toolkit nvhpc
> Switching from cuda-toolkit/1 to nvhpc/1
> Unloading dependent: app/1
> Reloading dependent: app/1
>
> I am quite interested to know if you find some issues or corner cases
> with this solution.
>
> Best regards,
> Xavier
>
> Le ven. 19 avr. 2024 à 12:58, Adrien COTTE - Groupe EOLEN
> <adr...@eo...> a écrit :
> >
> > Hi,
> >
> > I have a module with à prereq "cuda-toolkit" or "nvhpc".
> >
> > So here is my prereq line:
> >
> > %Module
> > prereq cuda-toolkit nvhpc
> >
> > But, is it possible to declare my modules to be a sort of "cuda provider"?
> >
> > So i juste have to declare "prereq cuda" or "prereq --provider cuda" in my module?
> >
> > In fact, it's not just about cuda. I have some python modules too: intelpython, python3 and anaconda.
> >
> > I would like to set them as "python3.10" providers.
> >
> > I hope my ask in clear, if not please tell me.
> >
> > Best,
> > Adrien
> >
> > _______________________________________________
> > 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
|