You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm configuring our modules enviornent with pre-built bundles of components that have cross-dependencies, like OpenMPI being built with the PGI compiler and CUDA, for example.
I'm adding the paths to these bundles to the init/.modulespath file so their contents will be visible when I run a "module avail" command.
It's a pain, though, to have to add a new path each time I define a new bundle. It would be trivial if I could add the path
/shared/apps/centos-6.6_SB/PrgEnv/*/*
to the init/.modulespath file and have all the bundles picked up automatically.
I know this doesn't work right now, I'm testing the latest code from the repository. But can you add this? If you could tell me what to patch, I could test it for you.
Reported by: cponder
The text was updated successfully, but these errors were encountered:
It looks like an okay solution would be to change this part of the $MODULESHOME/init/bash script
if [ "${MODULEPATH:-}" = "" ]; then
MODULEPATH=`sed -n 's/[ #].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' /shared/apps/centos-6.6_SB/Modules/3.3_2015-11-19/init/.modulespath`
export MODULEPATH
fi
to this form
if [ "${MODULEPATH:-}" = "" ]; then
while read -r line
do
line=`echo -n $line | sed -e 's/#.*$//'` # Remove trailing comments.
line=`echo -n $line | sed -e 's/^[[:space:]]$//'` # Remove leading whitespace.
line=`echo -n $line | sed -e 's/[[:space:]]*$//'` # Remove trailing whitespace.
for item in $line
do
MODULEPATH+=:$item
done
done < $(MODULESHOME)/init/.modulespath
export MODULEPATH
fi
I suppose the sed's could be comacted together. Beyond this, I don't want to use bash-dependent features because I want it to be easy to re-code (and compare with) ksh/csh etc.
From discussion with R.K. Owen, we need to confirm that this will work correctly when the user has adjusted the globbing parameters in the environement. I'll take a look at this.
I'm configuring our modules enviornent with pre-built bundles of components that have cross-dependencies, like OpenMPI being built with the PGI compiler and CUDA, for example.
I'm adding the paths to these bundles to the init/.modulespath file so their contents will be visible when I run a "module avail" command.
It's a pain, though, to have to add a new path each time I define a new bundle. It would be trivial if I could add the path
to the init/.modulespath file and have all the bundles picked up automatically.
I know this doesn't work right now, I'm testing the latest code from the repository. But can you add this? If you could tell me what to patch, I could test it for you.
Reported by: cponder
The text was updated successfully, but these errors were encountered: