Replies: 3 comments
-
I agree it might be worthwhile to add a blurb about this to the docs. AFAIK, you were told correctly. You can't really have two concurrent Nextflow sessions in the same directory because they will clobber the |
Beta Was this translation helpful? Give feedback.
-
I don’t think this issue has been mentioned in the documentation yet so I just want to keep this from going stale. Would it be possible to check for a concurrent session at startup? There is obviously a race condition so it wouldn’t catch every single instance, but it would probably help a lot. Our users on an HPC cluster get burned by this frequently. |
Beta Was this translation helpful? Give feedback.
-
I have converted this issue into a discussion so that it doesn't go stale and can be found more easily by other users. Multiple Nextflow runs can share the same work directory but not the same launch directory. Tasks are guaranteed to be unique even across multiple concurrent Nextflow runs because the session ID is included in the task hash. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When Nextflow starts a task, it locks the task execution directory under the workDir:
https://github.com/nextflow-io/nextflow/blob/master/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy#L777
But this lock (if I understand correctly) only works within the current top-level Nextflow invocation.
If another top-level Nextflow instance is started concurrently with the same workDir, and has a task with the same hash, could this result in two tasks writing to the same task dir, potentially clobbering the output?
More generally, it would help if Nextflow's official documentation could clarify whether such concurrent execution is supported. I was informally told that the workDir can be shared but not the launchDir, but what is the official spec? Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions