Closed nsheff closed 1 year ago
Ok, I got it. I think we should in fact do as I said before:
One idea is to make the submission scripts executable and then actually execute them, instead of shell sourcing them. That way the piface command can be anything exectuable, and looper doesn't have to spawn a subshell for this.
Background:
subprocess.check_call(submission_command, shell=True)
sbatch
for the default slurm
divvy package.shell=True
, is actually not directly running sbatch
; instead, it's creating a shell, and then uses that shell to execute sbatch
(or whatever) inside that shell.Solution:
Can we just remove shell=True
from this? or make it customizable?
I've implemented this now; it relies on an update to divvy that will make written submit scripts executable. but I think this is the way to go.
Came across an issue here: https://github.com/refgenie/refgenomes.databio.org/issues/4
Here's how I solved the problem: https://github.com/pepkit/looper/commit/9eeecfbdc06143d5c9f37fc1894ee22db51b7a18
since running things locally is actually executing these interfaces...
we need a better solution to this. One idea is to make the submission scripts executable and then actually execute them, instead of shell sourcing them. That way the piface command can be anything exectuable, and looper doesn't have to spawn a subshell for this.