Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Kepler environment management *** oops ?


On Jul 10, 2013, at 10:07 AM, Christoph Pospiech <Christoph.Pospiech@xxxxxxxxxx> wrote:

On Wednesday, July 10, 2013 07:59:19 Greg Watson <g.watson@xxxxxxxxxxxx> wrote:
> 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 ?

I wouldn't have expected this behavior, but somehow the environment must be being changed so that the .bashrc no longer gets executed. You could try turning on the logging option (Preferences>Remote Development>RemoteTools>Environments>Generic Host) to see what commands are actually being executed. Note you need to restart Eclipse for this setting to be used.

Regards,
Greg





Back to the top