Hi all,

I have encountered a problem where sometimes (but not always) my jobs
ignore the -cwd or -wd flags and run in my home directory instead of
the specified working directory. I can run the same job multiple times
launching from the same directory, and sometimes the job correctly
runs from the current directory, and sometimes it runs from my home
directory.

Interestingly, though, it always outputs the stderr and stdout log
files into the correct folder (specified by -o and -e) which is in the
current directory.

To help debug the problem, I made a sample script that simply calls
pwd. The script is below:

#!/bin/bash

# Tell SGE to use bash instead of the SGE default shell
#$ -S /bin/bash

# Tell SGE to keep all current environment variables
#$ -V

# Tell SGE to run job from current working directory
#$ -cwd

# Tell SGE which queue to use
#$ -q all.q

# Tell SGE the name of this job
#$ -N fr-en.mert

# Tell SGE where to log this job
#$ -o log/mert/fr-en/
#$ -e log/mert/fr-en/

# Tell SGE how much memory this job needs
#$ -l mem_free=8G

echo "pwd=`pwd`"
echo "PWD=$PWD"



I'm running OGS/GE2011.11. I also have another setup with SGE/ge6.2u6
- on that older setup this problem does not occur.

Has anyone ever seen this type of problem? If I change the script to
use -wd /path/to/current/dir instead of -cwd I get exactly the same
inconsistent behavior. Likewise, it doesn't appear to matter whether I
pass the flag at the command line or within the script, as above.

Are there any grid engine or scheduler log files that I could examine
which might be helpful in tracking down this behavior?

Thanks,
Lane Schwartz
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to