ENH: New fsl_sub_wait command
Hi @duncan, I thought it would be nice to have a self-contained command which simply blocks while waiting for other jobs. This would make certain operations in scripts nicer, e.g.:
job_id=$(eddy ...)
fsl_sub_wait ${job_id}
The way that the fsl_sub_wait
command works is:
- Creates a temporary file
temp
- Calls
fsl_sub --jobhold <jobs> rm temp
- Spins until
temp
has been removed
Note that the semaphore/hold file is being stored in the user home directory, as /tmp/
is not necessarily shared across nodes.
What do you think?
Edited by Paul McCarthy