Bright-Computing / bic

Bright-Illumina collaboration
GNU General Public License v2.0
4 stars 5 forks source link

$MODULEPATH should be totally free to be set by site #30

Closed fgeorgatos closed 8 years ago

fgeorgatos commented 8 years ago

OK, this is a continuation of #16 really, with a bug reported below, to consider a fix

I would recommend now a "contrib" kind of template (ie. not valid by default) with values such as:

[root@bright-lmod ~]# cat /etc/profile.d/0000-set_site_vars.sh
## Initializations
export LMOD_SYSTEM_DEFAULT_MODULES="HPCBIOS/2016q2 sge"
export LMOD_PACKAGE_PATH=/etc/site/lmod
## help EasyBuild, too
export EASYBUILD_BUILDPATH=/dev/shm
export EASYBUILD_MODULES_TOOL=Lmod

## default modulepath; ensure $LMOD_SYSTEM_DEFAULT_MODULES are retrievable over here.
## Notice the guarded variable setting; this is important for correct functioning of `module use`!
if [ -z "$MODULEPATH" ]; then
  export MODULEPATH=/etc/site/modules
fi

and also need the same for .csh; this is to reduce entropy across HPC sites, and create a template which is overall supportable by Bright, in some long-term mode, if all sites follow the same pattern.

N.B. The above works well, however it seems that site-tuning by site of MODULEPATH goes astray:

[root@bright-lmod ~]# su - fgeorgatos
Last login: Mon May 23 15:40:55 CEST 2016 on pts/3
[fgeorgatos@bright-lmod ~]$ ml

Currently Loaded Modules:
  1) HPCBIOS/2016q2   2) sge

[fgeorgatos@bright-lmod ~]$ echo $MODULEPATH
/etc/site/modules:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core
[fgeorgatos@bright-lmod ~]$

Unfortunately, the culprit for this is under /etc/profile.d/z00_lmod.sh and I do not have the quick fix to propose about it.

@johnnydevaprasad: Your feedback?

fgeorgatos commented 8 years ago

apparently, #31 fixes this; T.B.C.

fgeorgatos commented 8 years ago

31 OKs this.