[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Shell default environment variables were gone



On Mar 7, 2006, at 4:06 AM, Hsieh Tsan Lung wrote:

   The problem is that,
      I submit a very simple tcsh shell script to condor.
But I can not get the variable, $PATH, in tcsh shell, also in bash.
      It seems it ignores system source file.

   Below is the output of command, printenv, in tcsh shell
      _CONDOR_SCRATCH_DIR=/condor_local/execute/dir_4712
      _CONDOR_ANCESTOR_29802=3829:1141724207:3428512000
      _CONDOR_ANCESTOR_3829=4712:1141725109:3428512004
      _CONDOR_ANCESTOR_4712=4714:1141725110:976216192
      HOSTTYPE=i386-linux
      VENDOR=intel
      OSTYPE=linux
      MACHTYPE=i386
      SHLVL=1
      PWD=/condor_local/execute/dir_4712
      LOGNAME=tsan
      USER=tsan
      GROUP=cdf
      HOST=osgwn007.phys.sinica.edu.tw

Condor doesn't read any shell source files before invoking your jobs. Here are a couple things you can try:

* Add 'getenv=true' to your submit file. This will cause the job to receive the environment varaibles that were set when condor_submit was run.

* Make tcsh read the source files, either by giving it the proper command line argument or sourcing them directly in your script.

+--------------------------------+-----------------------------------+
|           Jaime Frey           | I used to be a heavy gambler.     |
|       jfrey@xxxxxxxxxxx        | But now I just make mental bets.  |
| http://www.cs.wisc.edu/~jfrey/ | That's how I lost my mind.        |
+--------------------------------+-----------------------------------+