Re: [Lmod-users] [EXT] Re: Lmod mrc function not working anymore
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
From: Thomas E. <tho...@pa...> - 2024-11-06 18:10:58
|
Hi Robert Thank you for solving the reported bug. I have tested your changes with lmod from the IS690-hide branch, and the reported bug is now solved for me. However, I still see 2 other minor bugs 1 ) When I load the modules in the order below: $ module load modules/make_foo_visible #extend MODULEPATH to enable loading foo modules $ module load foo/invisible_A foo/visible_B $ module load modules/make_foo_visible # => all unhidden modules are tracked again. 2) When a modulefile has the following statement in the lua file: prepend_path{"PATH", root, priority=100} I'm getting the following error message when using lmod from IS690-hide branch: Lmod has detected the following error: Error in LocationT:search(). Best regards / met vriendelijke groeten Thomas Eylenbosch DevOps Engineer, Gluo N.V. Email: tho...@pa...<mailto:tho...@pa...> Postal Address: BASF Belgium Coordination Center CommV, Technologiepark 101, 9052 Gent Zwijnaarde, Belgium BASF Belgium Coordination Center CommV Scheldelaan 600, 2040 Antwerpen, België RPR Antwerpen (afd. Antwerpen) BTW BE0862.390.376 www.basf.be<http://www.basf.be/> Deutsche Bank AG IBAN: BE43 8262 8044 4801 BIC: DEUTBEBE Information on data protection can be found here: https://www.basf.com/global/en/legal/data-protection-at-basf.html From: Robert McLay <mc...@ta...> Sent: Monday, November 4, 2024 7:09 PM To: Thomas Eylenbosch <tho...@pa...> Cc: lmo...@li... Subject: Re: [EXT] Re: Lmod mrc function not working anymore Thanks very much for the bug report! While your bug seemed small, it had far reaching changes needed to support updating $MODULEPATH and knowing about a hidden module in that new directory in $MODULEPATH. Again, thanks for the report. This allowed us to fixed an issue that we didn't see. Please test the IS690-hide branch to see if it works for you. Please report back to the mailing list on how it goes for you. This branch is going to be merged in the main before SC'24 (Nov. 19+) Best, Robert ________________________________ From: Thomas Eylenbosch <tho...@pa...<mailto:tho...@pa...>> Sent: Tuesday, October 15, 2024 3:19 AM To: Robert McLay <mc...@ta...<mailto:mc...@ta...>> Cc: lmo...@li...<mailto:lmo...@li...> <lmo...@li...<mailto:lmo...@li...>> Subject: RE: [EXT] Re: Lmod mrc function not working anymore Hi Robert Thank you for the feedback and providing a fix in Lmod version 8.7.53 It is now working fine. However, I still see a minor bug with the following use case: Case 1: $ module load modules/make_foo_visible #extend MODULEPATH to enable loading foo modules $ module load foo/invisible_A foo/visible_B ==> only foo/visible_B is tracked which is normal behaviour Case 2: $ module load modules/make_foo_visible $ module load modules/make_foo_visible foo/invisible_A foo/visible_B ==> Both modules foo/invisible_A foo/visible_B are tracked, which should not be the intention. Best regards / met vriendelijke groeten Thomas Eylenbosch DevOps Engineer, Gluo N.V. Email: tho...@pa...<mailto:tho...@pa...> Postal Address: BASF Belgium Coordination Center CommV, Technologiepark 101, 9052 Gent Zwijnaarde, Belgium BASF Belgium Coordination Center CommV Scheldelaan 600, 2040 Antwerpen, België RPR Antwerpen (afd. Antwerpen) BTW BE0862.390.376 www.basf.be<http://www.basf.be/> Deutsche Bank AG IBAN: BE43 8262 8044 4801 BIC: DEUTBEBE Information on data protection can be found here: https://www.basf.com/global/en/legal/data-protection-at-basf.html From: Robert McLay <mc...@ta...<mailto:mc...@ta...>> Sent: Sunday, October 13, 2024 3:02 AM To: lmo...@li...<mailto:lmo...@li...>; Thomas Eylenbosch <tho...@pa...<mailto:tho...@pa...>> Subject: [EXT] Re: Lmod mrc function not working anymore If you wish to debug your current code, please read the following new section on how to debug Lmod: https://lmod.readthedocs.io/en/latest/165_debugging_lmod.html However, the internals of Lmod can change between versions so relying on internal can lead to problems. In fact, the internals of how the Lmod determines if a module is visible has changed considerably in 8.7.51+ I believe that I have a better way to know if a module is visible or not. As the updated documentation shows: https://lmod.readthedocs.io/en/latest/300_tracking_module_usage.html local hook = require("Hook") local uname = require("posix").uname local cosmic = require("Cosmic"):singleton() local syshost = cosmic:value("LMOD_SYSHOST") local s_msgT = {} local function load_hook(t) -- the arg t is a table: -- t.modFullName: the module full name: (i.e: gcc/4.7.2) -- t.fn: The file name: (i.e /apps/modulefiles/Core/gcc/4.7.2.lua) -- t.mname: The Module Name object. local isVisible = t.mname:isVisible() I have created and uploaded a new version of Lmod 8.7.53 which includes the new member function MName:isVisible(). If you have a chance, please test Lmod 8.7.53 to see if works for you. Best ________________________________ From: Thomas Eylenbosch via Lmod-users <lmo...@li...<mailto:lmo...@li...>> Sent: Friday, October 11, 2024 4:36 AM To: lmo...@li...<mailto:lmo...@li...> <lmo...@li...<mailto:lmo...@li...>> Subject: [Lmod-users] Lmod mrc function not working anymore Hi Lmod community We have a customized SitePackage.lua in our platform to track the lmod usage of the users. Since the upgrade of Lmod from 8.7.32 to 8.7.48, the following functions are not working anymore to include the visible modules only in our tracking system: local mrc = MRC:singleton() local isVisible = mrc:isVisible({fullName=t.modFullName, sn=t.sn, fn=t.fn}) What has changed in the Lmod package that now did break this functionality? I already tried to search related changes in the lmod source code, but I can't figure it out. How the SitePackage.lua file looks like: require("strict") require("lmod_system_execute") require("string_utils") local MRC = require("MRC") local mrc = MRC:singleton() local hook = require("Hook") local uname = require("posix").uname local cosmic = require("Cosmic"):singleton() local syshost = cosmic:value("LMOD_SYSHOST") local FrameStk = require("FrameStk") -- By using the hook.register function, this function "load_hook" is called -- ever time a module is loaded with the file name and the module name. local s_msgA = {} local function isnotempty(s) return s ~= nil and s ~= '' end function load_hook(t) local isVisible = mrc:isVisible({fullName=t.modFullName, sn=t.sn, fn=t.fn}) ... end Best regards / met vriendelijke groeten Thomas Eylenbosch DevOps Engineer, Gluo N.V. Email: tho...@pa...<mailto:tho...@pa...> Postal Address: BASF Belgium Coordination Center CommV, Technologiepark 101, 9052 Gent Zwijnaarde, Belgium BASF Belgium Coordination Center CommV Scheldelaan 600, 2040 Antwerpen, België RPR Antwerpen (afd. Antwerpen) BTW BE0862.390.376 www.basf.be<http://www.basf.be/> Deutsche Bank AG IBAN: BE43 8262 8044 4801 BIC: DEUTBEBE Information on data protection can be found here: https://www.basf.com/global/en/legal/data-protection-at-basf.html |