Inactivated lmod is mistakenly used like module load

I am a system admin. We have tcl modules (activated) and lmod (deactivated) installed on the system.

I tested Lmod on our cluster on a single node a month back with “source /usr/share/lmod/lmod/init/bash” to activate lmod. Then my open ondemand job started to use lmod, I got error message "Lmod has detected the following error: The following module(s) are unknown: “matlab/r2020b” ". Our system is currently using tcl Modules.

It looks like Lmod is called within OOD. Yet tcl Modules is used correctly outside OOD with my regular HPC tasks, such as module load… I checked my env such as ~/.bashrc, they look fine.

What/where should I look into to figure out why OOD is using lmod?

Thank you,
Wei

Hi and welcome!

I’d check your /etc/profile.d files. What scheduler are you using? Different ones initialize the sessons differently.

Also check your before.sh.erb of your app. We often have things like this to export the module function. I’m guessing in tcl modules it’s a function too? In any case, this statement maybe what’s throwing it off?

Hi Jeff,

Thank you for timely reply.

However, what puzzles me is both /etc/profile.d/ and before.sh.erb are system files, users do not have issues with system apps using tcl Modules, which shows the system setup is right. I am the one who have the lmod problem when launching both system apps and my own sandbox apps. It is likely related to my own env. Because of this problem, I can’t launch any dev apps due to “Lmod has detected the following error: …” , which is from output.log.

I did check before.sh.erb and /etc/profile.d/. I can provide their contents if needed. What else to look for clues?

Thank you,

OK sorry, I misread that it only affects you and only through OOD - bash shell sessions work fine.

Hmmmm… What’s your login shell? Is it bash or does the scheduler somehow thing it’s something different? I’d guess also spot check ~/.bash_profile if your ~/.bashrc seems OK.

Hi Jeff,

I did check my .bashrc in the first place, however I missed the line “[[ $- != i ]] && return”, which was used to test non-interactive shell stuff.

Once the line is commented out, my ood is back to normal.

Appreciated for your time!!

1 Like