process.sub 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. subject=$1
  3. executable=$(pwd)/code/participant_job
  4. # the job expects these environment variables for labeling and synchronization
  5. # - JOBID: subject AND process specific ID to make a branch name from
  6. # (must be unique across all (even multiple) submissions)
  7. # including the cluster ID will enable sorting multiple computing attempts
  8. # - DSLOCKFILE: lock (must be accessible from all compute jobs) to synchronize
  9. # write access to the output dataset
  10. # - DATALAD_GET_SUBDATASET__SOURCE__CANDIDATE__...:
  11. # (additional) locations for datalad to locate relevant subdatasets, in case
  12. # a configured URL is outdated
  13. # - GIT_AUTHOR_...: Identity information used to save dataset changes in compute
  14. # jobs
  15. export JOBID=${subject} \
  16. DSLOCKFILE=$(pwd)/.condor_datalad_lock \
  17. GIT_AUTHOR_NAME='Felix Hoffstaedter' \
  18. GIT_AUTHOR_EMAIL='f.hoffstaedter@fz-juelich.de'
  19. # essential args for "participant_job"
  20. # 1: where to clone the analysis dataset
  21. # 2: location to push the result git branch to. The "ria+" prefix is stripped.
  22. # 3: ID of the subject to process
  23. arguments="ria+file:///data/project/cat_preprocessed/inputstore#37bffb24-5e86-4bee-80f3-835e5ae27a87 \
  24. /data/project/infrasound/dataladstore/37b/ffb24-5e86-4bee-80f3-835e5ae27a87 \
  25. ${subject} \
  26. "
  27. mkdir -p /tmp/tmp_${subject:4}
  28. cd /tmp/tmp_${subject:4}
  29. ${executable} ${arguments} \
  30. > /data/project/infrasound/ReproVBM/ds003151_ReproVBM/logs/${subject}.out \
  31. 2> /data/project/infrasound/ReproVBM/ds003151_ReproVBM/logs/${subject}.err
  32. chmod 777 -R /tmp/tmp_${subject:4} && rm -rf /tmp/tmp_${subject:4}