IBM Support

How do I load a specific module file at login time?

Troubleshooting


Problem

How do I load a specific module file at login time?

Resolving The Problem

How do I load a specific module file at login time?
Here is an example showing how to get the default modules loaded at login time.

1- Backup the module init script for bash
sudo cp -p /opt/modules/init/bash /opt/modules/init/bash.orig

2- Edit the module init script for bash
sudo vim /opt/modules/init/bash
Please find attached 2 init scripts (bash and bash.orig)

3- Update the /etc/bashrc
Comment these lines :
----------------------------------------------------------
#if [ -f /pam/include/bashrc.pam ]; then
# . /pam/include/bashrc.pam
#fi
----------------------------------------------------------


So, just to compare :

 

Before (/pam/include/bashrc.pam) :
Intel compilers : setup for 9.0 version
Open-mpi : same setup as the hpc/ompi112-i2 plus additional environment variables : OPENMPI, OMPI_CC and OMPI_CXX
Additional PATH : .

After (modules) :
Intel compilers : handled by /etc/profile.d scripts (iccvars and ifortvars).
Open-mpi : handled by the hpc/ompi112-i2 module launched at login time
Additional environment : (OPENMPI, OMPI_CC and OMPI_CXX, PATH) : handled by the pam_default module.

For now, you should have exactly the same environment. The only difference is how it was setup.

[{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"4.1.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
11 September 2018

UID

isg3T1014013