Closed ashleyz closed 12 years ago
Hi Ashley,
that sound good. Yu can also have a look at the local job plugin (line 44):
https://github.com/saga-project/bliss/blob/master/bliss/plugins/local/process.py
That's how I implemented it using the os.path (built-in) Python module.
HTH Ole
On May 29, 2012, at 11:27 AM, ashleyz wrote:
Hello,
I took a look at some of the new tests, and the SSH plugin doesn't seem to pass 07 properly.
In 07_work_directory.py we have:
output options
jd.output = "bliss_job.07.stdout" jd.error = "bliss_job.07.stderr"
In 08_absolute_output.py we have:
output options
jd.output = "%s/bliss_job.08.stdout" % (outprefix) jd.error = "%s/bliss_job.08.stderr" % (outprefix)
So, it looks like what we want to do is:
1) If working_directory contains a relative path (ex. localdir/wd), prepend this to the output/error filenames working_directory = "localdir/wd", outputfilename = "exp1.out", outputfilename becomes "localdir/wd/exp1.out"
2) If working_directory contains an absolute path, (ex. /tmp/output) prepend this to the output/error filenames working_directory = "/tmp/output", outputfilename = "exp1.out", outputfilename becomes "/tmp/output/exp1.out"
3) If the output/error filenames contain a relative path, append this to the working directory path working_directory= "/tmp/output", outputfilename = "ex1/exp1.out", outputfilename becomes "/tmp/output/ex1/exp1.out"
4) If the output/error filenames contain an absolute path, ignore the working directory path entirely and use the plain output/error filenames working_directory = "/tmp/output", outputfilename = "/home/ashley/results/output.txt", outputfilename becomes "/home/ashley/results/output.txt"
Currently what I do is execute via SSH a bash command that looks like:
(/bin/sh -c 'cd WORKINGDIRECTORY && COMMAND')> OUTPUTFILENAME 2> ERRORFILENAME
Reply to this email directly or view it on GitHub: https://github.com/saga-project/bliss/issues/52
*\ Accidentally submitted this while typing it out to make sense of it, ignore for now please sorry...)
Hello,
I took a look at some of the new tests, and the SSH plugin doesn't seem to pass 07 properly.
In 07_work_directory.py we have:
output options
In 08_absolute_output.py we have:
output options
So, it looks like what we want to do is:
1) If working_directory contains a relative path (ex. localdir/wd), prepend this to the output/error filenames working_directory = "localdir/wd", outputfilename = "exp1.out", outputfilename becomes "localdir/wd/exp1.out"
2) If working_directory contains an absolute path, (ex. /tmp/output) prepend this to the output/error filenames working_directory = "/tmp/output", outputfilename = "exp1.out", outputfilename becomes "/tmp/output/exp1.out"
3) If the output/error filenames contain a relative path, append this to the working directory path working_directory= "/tmp/output", outputfilename = "ex1/exp1.out", outputfilename becomes "/tmp/output/ex1/exp1.out"
4) If the output/error filenames contain an absolute path, ignore the working directory path entirely and use the plain output/error filenames working_directory = "/tmp/output", outputfilename = "/home/ashley/results/output.txt", outputfilename becomes "/home/ashley/results/output.txt"
Currently what I do is execute via SSH a bash command that looks like:
(/bin/sh -c 'cd WORKINGDIRECTORY && COMMAND')> OUTPUTFILENAME 2> ERRORFILENAME
So, I tried moving the cd command in the above line to be as follows:
cd WORKINGDIRECTORY && (/bin/sh -c 'COMMAND')> OUTPUTFILENAME 2> ERRORFILENAME
Which seems to work OK. For the absolute path example, if you -don't- pass an absolute path, it gets kind of weird (should we add a check to the test to make sure an absolute path is being passed?)
Anyhow, I will play with that now (and close the issue for the time being, I didn't mean to submit it so soon)