Issue208

Title avoid absolute paths in gkigrid scripts
Priority wish Status resolved
Superseder Nosy List jendrik, malte
Assigned To jendrik Keywords
Optional summary

Created on 2011-01-17.22:04:42 by malte, last changed by jendrik.

Messages
msg2088 (view) Author: jendrik Date: 2012-04-02.11:58:27
The new-new scripts make this obsolete. If the user wants he can use his own code 
to submit the experiment or just use our submission code that calls qsub in the 
experiment's directory.
msg1351 (view) Author: jendrik Date: 2011-05-10.20:10:04
FYI, I have looked at the output of env, but there seems to be no 
variable that's useful for our purpose. Let's talk about it offline then :)
msg1350 (view) Author: malte Date: 2011-05-10.19:57:57
I can think of a few ways to work around the grid's limitations; it'll take too
long to elaborate on this in writing, so let's discuss this offline,
msg1349 (view) Author: jendrik Date: 2011-05-10.19:54:25
Closing this bug as there appears to be no workaround except the already existing 
wrapper experiment.sh
msg1223 (view) Author: jendrik Date: 2011-01-24.02:05:03
It seems that it is not possible to create a job, move the directory and 
submit it from a directory that doesn't contain the job file.

The only environment variable that might have been helpful SGE_O_WORKDIR 
only returns the current working directory when the job is submitted. I 
can't find a variable for the directory that contains the job file.

The directory in which the jobs should be executed can be set by adding 
"#$ -wd /path/to/dir" to the job file. However I couldn't figure out how 
to programmatically compute the path there or if that's even possible.
msg1222 (view) Author: malte Date: 2011-01-23.21:17:00
qsub has a bunch of working directory options; try "man 1 qsub" and search for
"working directory"; there are several leads.

Also, it sets a bunch of environment variables. Try running a job and looking at
the output of "env".
msg1221 (view) Author: jendrik Date: 2011-01-23.18:40:03
Unfortunately this does not work since the gkigrid seems to be in a 
special directory.

I also tried getting the absolute dirname, but

echo "$(dirname $(readlink -f $0))" returns 
/opt/sge6-2/spool/gkigridb/job_scripts

Do you have an idea how to solve this problem?
msg1212 (view) Author: malte Date: 2011-01-22.17:32:33
cd "$(dirname "$0")"

(The quotes are often not necessary, but it's better to use them in case there
are filenames with spaces or other unusual characters involved.)
msg1211 (view) Author: jendrik Date: 2011-01-22.15:16:27
This has been implemented. However currently gkigrid jobs can only be submitted 
while being in the directory that contains the job file. Is it possible to change 
into that directory with a bash command in the job file? If so, what would be the 
best way to do so?
msg1194 (view) Author: malte Date: 2011-01-17.22:04:42
It would be nice if the scripts generated by downward-experiments.py did not
include absolute paths, so that they can be run on machines with a different
filesystem layout than the one where the script was generated. (This is not just
a theoretical problem; it has already tripped me up multiple times.)

In general, I think it'd be a good idea if absolute paths were not stored
anywhere, i.e., they might be computed during a program invocation, but it'd be
good not to write them to a file to be used as a script or similar later.
History
Date User Action Args
2012-04-02 11:58:27jendriksetstatus: chatting -> resolved
messages: + msg2088
2011-05-10 20:10:04jendriksetmessages: + msg1351
2011-05-10 19:57:57maltesetstatus: resolved -> chatting
messages: + msg1350
2011-05-10 19:54:25jendriksetstatus: chatting -> resolved
messages: + msg1349
2011-01-24 02:05:03jendriksetmessages: + msg1223
2011-01-23 21:17:00maltesetmessages: + msg1222
2011-01-23 18:40:03jendriksetmessages: + msg1221
2011-01-22 17:32:34maltesetmessages: + msg1212
2011-01-22 15:16:27jendriksetmessages: + msg1211
2011-01-17 22:04:42maltecreate