Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Access to renamed DAG node names
- Date: Mon, 12 Jan 2015 12:24:09 +0000
- From: Brian Candler <b.candler@xxxxxxxxx>
- Subject: Re: [HTCondor-users] Access to renamed DAG node names
On 12/01/2015 11:50, Brian Candler wrote:
Now, I tried doing this using a separate subdirectory for each dag,
and using "SPLICE .... DIR=<directory>". However it doesn't do what I
expected. Every submit file, every job output/error file still has to
be explictly given relative to the top-level directory.
Bleurgh... I put a spurious "=" sign in there, and it was silently ignored.
The corrected code is as follows and it works just fine. I believe this
will achieve what I need. Sorry for the noise on the mailing list :-(
Regards,
Brian.
---- 8< ----
#!/bin/bash
write_dag() {
cat <<EOS >"foo.dag"
JOB A foo.sub
VARS A job="A" input="$1" arg1="aaa" arg2="AAA"
JOB B foo.sub
VARS B job="B" input="A.out" arg1="bbb" arg2="BBB"
SCRIPT POST B deliver.sh B.out
EOS
cat <<'EOS' >"foo.sub"
universe = vanilla
executable = foo.sh
arguments = "'$(arg1)' '$(arg2)'"
output = $(job).out
error = $(job).err
queue
EOS
cat <<'EOS' >"foo.sh"
#!/bin/sh
echo $1
cat
echo $2
EOS
chmod +x foo.sh
cat <<'EOS' >"deliver.sh"
#!/bin/sh
cat "$1" >>/tmp/deliver.out 2>>/tmp/deliver.err
EOS
chmod +x deliver.sh
}
echo "hello world" >data.in
mkdir dag1
( cd dag1; write_dag ../data.in )
mkdir dag2
( cd dag2; write_dag ../dag1/B.out )
cat <<EOS >dag.dag
SPLICE dag1 foo.dag DIR dag1
SPLICE dag2 foo.dag DIR dag2
PARENT dag1 CHILD dag2
NODE_STATUS_FILE node.status
JOBSTATE_LOG jobstate.log
EOS
# condor_submit_dag dag.dag
# Final output is in dag2/B.out
---- 8< ----