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

Re: [HTCondor-users] DAGMan and remote_initialdir

Philipp Mahlberg wrote:

> I am using condor 8.0.3 together with a shared file system (i.e. I do not have to transfer any files).

> In order to get the output files to the right place, I had to set the the remote_initialdir in my command file as follows:

> universe = vanilla

> getenv = true

> nice_user = true

> remote_initialdir = $ENV(PWD)

> Now I would like to make use of condor's DAGMan and specify the working directory in the corresponding dag file:

> JOB <jobname> <path/to/cmd_file.cmd> DIR <!!WORKING DIR!!>

> This way, the directory I am submitting from is not necessarily the desired output dir.

> But how can I make condor aware of the the remote_initialdir that is defined in the corresponding DAG file?

I'm not 100% understanding your use case, but I'll answer what I can, and maybe we can eventually work things out.

First, of all, DIR specified in the DAG file, and remote_initialdir are completely separate. DIR in the DAG file applies purely to the submit side. DAGMan actually changes to the directory specified by DIR before doing anything relating to that node (submitting the HTCondor job, forking a PRE or POST script, etc.).

If you want to specify everything in the DAG file, you can do something like this:

== file my.dag:

JOB nodeA A.cmd DIR /foo/bar

VARS nodeA remdir= "/foo/bar"

== file A.cmd:

remote_initialdir = $(remdir)

In this example, if you don't want your output files to end up in /foo/bar, you'd have to specify that in the paths, for example:

output = ../out/A.out

in your submit file.

Let me know if that doesn't answer your question, and we'll take another shot at it...

Kent Wenger