Skip to content

Commit 5d2f273

Browse files
committed
BF: Use unique filenames for DAGMan workflows
Allows for multiple concurrently running DAGs, and is necessary due to the use of -update-submit in the DAGMan call.
1 parent b09be36 commit 5d2f273

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/pipeline/plugins/dagman.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import os
55
import sys
6+
import uuid
67

78
from .base import (GraphPluginBase, logger)
89

@@ -53,7 +54,7 @@ def _submit_graph(self, pyfiles, dependencies, nodes):
5354
# location of all scripts, place dagman output in here too
5455
batch_dir, _ = os.path.split(pyfiles[0])
5556
# DAG description filename
56-
dagfilename = os.path.join(batch_dir, 'workflow.dag')
57+
dagfilename = os.path.join(batch_dir, 'workflow-%s.dag' % uuid.uuid4())
5758
with open(dagfilename, 'wt') as dagfileptr:
5859
# loop over all scripts, create submit files, and define them
5960
# as jobs in the DAG

0 commit comments

Comments
 (0)