The Environment Modules package is used for dynamic modification of a user's environment (debian package environment-modules
).
I would like to use module
directly from a ssh
command line. The purpose is to be able to execute commands on different nodes from a bash script executed on a front node. I don't want to explicitly update PATH
and LD_LIBRARY_PATH
environment variables for each different node configuration.
When I directly connect to the node and then call module
from the node, it is obviously working:
jyvet> ssh mynode
jyvet@mynode> module load gcc-6.0
jyvet@mynode> gcc --version
gcc (GCC) 6.0.1
But the following approach fails:
jyvet> ssh mynode "module load gcc-6.0; gcc --version"
command not found: module
gcc-4.8 (Debian 4.8.4-1) 4.8.4