Dear Xavier,
Thank you for your time and help!!!
I actually did the 2nd option already.
As also recommended I replaced ‘prepend-path MODULEPATH’ by ‘module use’.
Things seem to work just fine now.
Thank you and again!
Danny
From: Xavier Delaruelle <xav...@gm...>
Sent: Tuesday, October 17, 2023 9:25 PM
To: Environment Modules usage and discussion. <mod...@li...>
Subject: Re: [Modules] unloading dependent modules
Hello Danny, I took time to reproduce your setup with intel modulefiles installed. tbb, compiler-rt and oclfpga modulefiles are not auto unloaded as they are loaded through conditional code like: if { ![ is-loaded tbb ] } { module load tbb
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
Report Suspicious <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/BQNorrFsuw!1NtAYp1Rtx2EjdbCJ8ENg7LoCoomN8kr4yzG_56odrbGr7F2QUIkBnVO7bgkJlAzSetvVn_w3qGhnz1MNZ3tBWLmXtnEMLad-atkcLfzdQ6VC6SCPJ5jCbGxfsI_NMg8fg$>
ZjQcmQRYFpfptBannerEnd
Hello Danny,
I took time to reproduce your setup with intel modulefiles installed.
tbb, compiler-rt and oclfpga modulefiles are not auto unloaded as they are loaded through conditional code like:
if { ![ is-loaded tbb ] } { module load tbb }
Due to such code, when the modulefile is evaluated in unload mode, it does not evaluate the "module load tbb" (to transform it into module unload tbb) as the " ![ is-loaded tbb ] " condition is false.
You have 2 options to auto unload these modulefiles:
1. enable the auto_handling option, to automatically unload dependencies declared at load time
$ module config auto_handling 1
2. update your intel_oneapi/2023.2 modulefile to add a "module load tbb compiler-rt oclfpga" line after "module load icc init_opencl" line
The whole modulefile will look like this:
#%Module1.0
#
set name "Intel oneAPI Toolkit"
set version "2023.2.0"
module-whatis "$name $version"
#
conflict intel
conflict intel_oneapi
#
if { [ module-info mode load ] } {
prepend-path MODULEPATH /hpc/sw/modulefiles/nec/apps/intel_oneapi/.files_2023.2/
}
module load compiler mkl mpi
module load debugger dpl ccl itac inspector
module load dev-utilities dnnl dpct intel_ipp_intel64
module load icc init_opencl
module load tbb compiler-rt oclfpga
Best regards,
Xavier
Le lun. 9 oct. 2023 à 18:06, Danny Sternkopf <Dan...@em...<mailto:Dan...@em...>> a écrit :
Dear Xavier,
Please find the module file attached.
Here what I run:
$ module list
Currently Loaded Modulefiles:
1) apps 3) gcc/9.2.0(default) 5) aec/1.0.6-x86-intel 7) libdwd/1.1.8-x86-intel(default)
2) x86/default 4) skyClient/12.0.7-0(default:prerelease:release:testing) 6) eccodes/2.28.0-x86-intel(default) 8) nectools/1.0
$ module load intel_oneapi/2023.2
Loading compiler version 2023.2.0
Loading tbb version 2021.10.0
Loading compiler-rt version 2023.2.0
Loading oclfpga version 2023.2.0
Load "debugger" to debug DPC++ applications with the gdb-oneapi debugger.
Load "dpl" for additional DPC++ APIs: https://github.com/oneapi-src/oneDPL [github.com]<https://urldefense.com/v3/__https:/github.com/oneapi-src/oneDPL__;!!BQNorrFsuw!n8GMuuAmImFmZGVLLM9P2ZHNF74er2ZzSqF_HGjp0R6FIXileLcP5v3uI7S48xfA9asR8DyYm5ts6QvUUidlQ379zOGyLG0b$>
Loading mkl version 2023.2.0
Loading mpi version 2021.10.0
Loading debugger version 2023.2.0
Loading dpl version 2022.2.0
Loading ccl version 2021.10.0
Loading itac version 2021.10.0
Loading inspector version 2023.2.0
Loading dev-utilities version 2021.10.0
Loading dnnl version 2023.2.0
Loading dpct version 2023.2.0
Loading intel_ipp_intel64 version 2021.9.0
For a full Intel(R) Integrated Performance Primitives functionality, you should load Intel(R) oneAPI Compiler and Intel(R) oneAPI Threading Building Blocks modules.
Loading icc version 2023.2.0
Loading init_opencl version 2023.1.0
$ module list
Currently Loaded Modulefiles:
1) apps 8) nectools/1.0 15) debugger/2023.2.0 22) dpct/2023.2.0
2) x86/default 9) tbb/2021.10.0 16) dpl/2022.2.0 23) intel_ipp_intel64/2021.9.0
3) gcc/9.2.0(default) 10) compiler-rt/2023.2.0 17) ccl/2021.10.0 24) icc/2023.2.0
4) skyClient/12.0.7-0(default:prerelease:release:testing) 11) oclfpga/2023.2.0 18) itac/2021.10.0 25) init_opencl/2023.1.0
5) aec/1.0.6-x86-intel 12) compiler/2023.2.0 19) inspector/2023.2.0 26) intel_oneapi/2023.2
6) eccodes/2.28.0-x86-intel(default) 13) mkl/2023.2.0 20) dev-utilities/2021.10.0
7) libdwd/1.1.8-x86-intel(default) 14) mpi/2021.10.0 21) dnnl/2023.2.0
$ module unload intel_oneapi/2023.2
Removing mpi version 2021.10.0
Use `module list` to view any remaining dependent modules.
Removing mkl version 2023.2.0
Use `module list` to view any remaining dependent modules.
Removing compiler version 2023.2.0
Use `module list` to view any remaining dependent modules.
Removing inspector version 2023.2.0
Use `module list` to view any remaining dependent modules.
Removing itac version 2021.10.0
Use `module list` to view any remaining dependent modules.
Removing ccl version 2021.10.0
Use `module list` to view any remaining dependent modules.
Removing dpl version 2022.2.0
Use `module list` to view any remaining dependent modules.
Removing debugger version 2023.2.0
Use `module list` to view any remaining dependent modules.
Removing intel_ipp_intel64 version 2021.9.0
Use `module list` to view any remaining dependent modules.
Removing dpct version 2023.2.0
Use `module list` to view any remaining dependent modules.
Removing dnnl version 2023.2.0
Use `module list` to view any remaining dependent modules.
Removing dev-utilities version 2021.10.0
Use `module list` to view any remaining dependent modules.
Removing init_opencl version 2023.1.0
Use `module list` to view any remaining dependent modules.
Removing icc version 2023.2.0
Use `module list` to view any remaining dependent modules.
$ module list
Currently Loaded Modulefiles:
1) apps 4) skyClient/12.0.7-0(default:prerelease:release:testing) 7) libdwd/1.1.8-x86-intel(default) 10) compiler-rt/2023.2.0
2) x86/default 5) aec/1.0.6-x86-intel 8) nectools/1.0 11) oclfpga/2023.2.0
3) gcc/9.2.0(default) 6) eccodes/2.28.0-x86-intel(default) 9) tbb/2021.10.0
Thank you and Best regards,
Danny
From: Xavier Delaruelle <xav...@gm...<mailto:xav...@gm...>>
Sent: Friday, October 6, 2023 7:41 PM
To: Environment Modules usage and discussion. <mod...@li...<mailto:mod...@li...>>
Subject: Re: [Modules] unloading dependent modules
Dear Danny, Could you provide the whole modulefile, the command you run and loaded module you get after running the commands. It would help to guide you. When defining dependencies with "module load" or "prereq", it is important not to enclose
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
Report Suspicious <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/BQNorrFsuw!1NtAYp1Rtx2EjfyER8FNofIDEvApPUVyw6ychC86FGSrgYE1IOhQHqa6Kckws6nwlu7E_cObXeJubKxQ8RG10slYBE4aVrGUTCxHlhHm_3Zfawd1_85Ib7Yenss_QgiCkQ$>
ZjQcmQRYFpfptBannerEnd
Dear Danny,
Could you provide the whole modulefile, the command you run and loaded
module you get after running the commands. It would help to guide you.
When defining dependencies with "module load" or "prereq", it is
important not to enclose these commands within an evaluation mode test
(e.g., "if { [ module-info mode remove ] } {").
This way, what is done at load evaluation is reversed during unload.
Let's say you have "module load tbb" in your modulefile. tbb will get
loaded as a dependency when loading your module and it will be
automatically unloaded when unloading your module.
@Paul: I do not think there is a difference between using *-path
commands or "module use" in modulefile.
Best regards,
Xavier
Le ven. 6 oct. 2023 à 18:35, Paul Markfort <pau...@gm...<mailto:pau...@gm...>> a écrit :
>
> Took me awhile to find it (module use, completely forgot what the command was, just remembered there was one), but you should use the "module use" or "module use --append" command to mess with MODULEPATH.
>
> My guess is those modules you are having trouble with, are in the /hpc/sw/modulefiles/nec/apps/intel_oneapi/.files_2023.2/ folder.
> (the module command can't find them to unload them).
>
> Hopefully, the implied "module unuse" command waits until the end of module processing to run (when the module unload is run, the module use becomes a module unuse).
>
> Xavier,
> May I suggest you update the man page so the append-path and prepend-path items suggest you use "module use" to modify MODULEPATH.
>
>
> On 10/6/2023 10:20 AM, Danny Sternkopf wrote:
> > Dear all,
> >
> > we have module which is loading quite few submodules. But when unloading it not all the dependent modules get unloaded. That's why we us a section like this:
> >
> > if { [ module-info mode remove ] } {
> > module unload tbb
> > module unload compiler-rt
> > module unload oclfpga
> > remove-path MODULEPATH /hpc/sw/modulefiles/nec/apps/intel_oneapi/.files_2023.2/
> > }
> >
> > I also tried with a "module-info mode unload" section, but there is no difference.
> >
> > We're using:
> > $ module --version
> > Modules Release 4.5.2 (2020-07-30)
> >
> > Should it work like this? Or is there something completely wrong here?
> >
> > The "module-info mode load" section works as expected btw.
> > if { [ module-info mode load ] } {
> > prepend-path MODULEPATH /hpc/sw/modulefiles/nec/apps/intel_oneapi/.files_2023.2/
> > }
> >
> > Thank you and Best regards,
> > Danny
_______________________________________________
Modules-interest mailing list
Mod...@li...<mailto:Mod...@li...>
https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/modules-interest__;!!BQNorrFsuw!jKgrcO7e93DTqjaL28BNIywkRDD6jTLncZoxnUK0OTSqoc7rZlVAQ_CscSfnawPgIKy55UpUtW4Vse_Td8spRMnVmZbGRgiS$<https://urldefense.com/v3/__https:/lists.sourceforge.net/lists/listinfo/modules-interest__;!!BQNorrFsuw!jKgrcO7e93DTqjaL28BNIywkRDD6jTLncZoxnUK0OTSqoc7rZlVAQ_CscSfnawPgIKy55UpUtW4Vse_Td8spRMnVmZbGRgiS$>[lists[.]sourceforge[.]net]
_______________________________________________
Modules-interest mailing list
Mod...@li...<mailto:Mod...@li...>
https://lists.sourceforge.net/lists/listinfo/modules-interest [lists.sourceforge.net]<https://urldefense.com/v3/__https:/lists.sourceforge.net/lists/listinfo/modules-interest__;!!BQNorrFsuw!n8GMuuAmImFmZGVLLM9P2ZHNF74er2ZzSqF_HGjp0R6FIXileLcP5v3uI7S48xfA9asR8DyYm5ts6QvUUidlQ379zPrkvcGO$>
|