Tracking Module Usage

From HPC users
Revision as of 17:02, 16 February 2023 by Harfst (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Instruction are available from https://lmod.readthedocs.io/en/latest/300_tracking_module_usage.html

Trying to implement on master04:

  • for testing created SitePackage.lua in /user/lees4820/lmod
  • executed export LMOD_PACKAGE_PATH=/user/lees4820/lmod
  • checked if setup works:
$ module --config 2>&1 | grep 'Site Pkg'
Site Pkg location                  /user/lees4820/lmod/SitePackage.lua
  • test if logging works:
$ module load foss
# grep ModuleUsageTracking /var/log/messages | grep foss
Feb 16 12:10:05 master01 ModuleUsageTracking[1427074]: user=lees4820 module=foss/2022a path=/cm/shared/uniol/modules/11.3/toolchain/foss/2022a.lua host=master01 time=1676545805.459937
  • added the groupname to the log output (after user= with account=)
  • for some reason module loading works but unloading gives a strange error (related to hpc-env). Problem disappears when LMOD_PACKAGE_PATH is unset.
  • step 2 and 3 are not needed since BCM seems to take care of forwarding messages to master, putting these messages in an extra file could be helpful tough