> Christoph,
>
> If you put 'module list' into a shell script and execute it from the command
> line on the machine, does it work? If not, you'll need to find out from the
> system administrator how to use module commands in shell scripts.
>
> It may be that 'module' is a shell function rather than a command, so the
> script needs to be properly set up before it can use modules. If this is
> the case, you may need to modify the target system configuration so that
> the submission script has the additional commands required to set this up
> correctly.
>
> Greg
Greg,
that shot hit the bulls eye !
cp@sirius:~$ ssh SuperMUC cat module_test
#!/bin/bash
module list
cp@sirius:~$ ssh SuperMUC module_test
./module_test: line 3: module: command not found
cp@sirius:~$ ssh SuperMUC cat .bashrc
. /etc/profile
. /etc/profile.d/modules.sh
module load git/latest
The main question that remains - why is my .bashrc not executed prior to the modules stuff ? Is there a button that I missed ?
If I go to Project Mgr -> Properties -> C/C++ Build -> Environment and tick
"Replace native environment with specified one", the .bashrc gets executed and the module function will be found.
If ticking "Append variables to native environment", .bashrc is not executed and the module function is unknown.
Is this something that I should expect ? Another candidate for FAQ ?