From f1616c9de49d18f97958a3e9de058954cd3ef908 Mon Sep 17 00:00:00 2001 From: zhenrong-wang Date: Wed, 17 Jul 2024 13:05:11 +0800 Subject: [PATCH] Updated the script for envmod --- scripts/cluster_initv7.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/cluster_initv7.sh b/scripts/cluster_initv7.sh index ca52ad6..ac7511f 100644 --- a/scripts/cluster_initv7.sh +++ b/scripts/cluster_initv7.sh @@ -387,6 +387,9 @@ if ! command -v module >/dev/null 2>&1; then make -j$num_processors && make install ln -s /opt/environment-modules/init/profile.sh /etc/profile.d/modules.sh ln -s /opt/environment-modules/init/profile.sh /etc/profile.d/modules.csh +else + #if module is already available, add the /hpc_apps/envmod to system envvar + echo -e "export MODULEPATH=/hpc_apps/envmod:\$MODULEPATH" >> /etc/profile fi time_current=`date "+%Y-%m-%d %H:%M:%S"` echo -e "# $time_current Environment Module has been installed." >> ${logfile}