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
|