Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

template_SLURM.sh 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #!/bin/bash
  2. #SBATCH -N 1 --ntasks-per-node=16
  3. #SBATCH -t 24:00:00
  4. #SBATCH --mail-type=END
  5. #SBATCH --mail-user=p.c.klink@gmail.com
  6. echo job id $SLURM_JOBID
  7. echo job name $SLURM_JOB_NAME
  8. echo submitted by $SLURM_JOB_ACCOUNT
  9. echo from $SLURM_SUBMIT_DIR
  10. echo the allocated nodes are: $SLURM_JOB_NODELIST
  11. # ==== the module environment on LISA changes on 1 October 2019 ====
  12. # more info: https://userinfo.surfsara.nl/documentation/new-module-environment-lisa-cartesius
  13. # module load 2019 # use the new environment and modules (default, so not explicitly necessary)
  14. # module load pre2019 # use old environment
  15. # >> only use pre2019 if you need software modules that aren't present in 2019
  16. # >> [2019] currently, none of the neuroimaging modules have been ported
  17. # >> stick with pre2019 for now
  18. # >> [20200715] The 2019 environment now has FSL and FreeSurfer
  19. # >> I applied for afni and ANTS to get installed as well.
  20. # >> We can run 2019 but need to run afni from home folder for now
  21. # ============================================================================
  22. ## This is the pre2019 setup
  23. # module load surf-devel
  24. # module load pre2019
  25. # module load eb
  26. # module load freesurfer
  27. # module load fsl/5.08
  28. # module load afni
  29. ## This is the 2019/default setup
  30. module load 2019
  31. module load FreeSurfer
  32. module load FSL
  33. module load AFNI
  34. # recent afni binaries need to be manually installed in home folder for now
  35. source ~/.bash_profile
  36. source ~/.bashrc
  37. umask u+rwx,g+rwx
  38. export FSLOUTPUTTYPE=NIFTI_GZ
  39. SUB=MONKEY
  40. DATE=YYYYMMDD
  41. echo ${SUB}-${DATE}
  42. cd ~/NHP-BIDS
  43. # tasks to be executed 1
  44. wait
  45. # tasks to be executed 2
  46. wait
  47. # tasks to be executed 3
  48. wait
  49. ## EXAMPLE ==================================================================
  50. # minimal processing
  51. ./code/bids_minimal_processing.py \
  52. --csv ./csv/multi/sub-${SUB,}/${SUB,}_${DATE}.csv |& \
  53. tee ./logs/minproc/sub-${SUB,}/log-minproc-${SUB,}-${DATE}.txt
  54. wait
  55. # resample iso
  56. ./code/bids_resample_isotropic_workflow.py \
  57. --csv ./csv/multi/sub-${SUB,}/${SUB,}_${DATE}.csv |& \
  58. tee ./logs/resample/sub-${SUB}/log-resample_iso-${SUB}-${DATE}.txt
  59. ./code/bids_resample_hires_isotropic_workflow.py \
  60. --csv ./csv/multi/sub-${SUB,}/${SUB,}_${DATE}.csv |& \
  61. tee ./logs/resample/sub-${SUB,}/log-resample_iso-hires-${SUB,}-${DATE}.txt
  62. wait
  63. # There are 2 ways of doing preprocessing & warping:
  64. # 1) semi parallel (parallel slices, serial runs)
  65. # 2) fully parallel (parallel slices and parallel runs)
  66. # The second method is faster but requires extra nodes on the cluster
  67. # METHOD 1 =====
  68. # preprocessing
  69. ./code/bids_preprocessing_workflow.py \
  70. --csv ./csv/multi/sub-${SUB,}/${SUB,}_${DATE}.csv |& \
  71. tee ./logs/preproc/sub-${SUB,}/log-preproc-${SUB,}-${DATE}.txt
  72. # warp to NMT
  73. ./code/bids_warp2nmt_workflow.py --csv ./csv/multi/${SUB}_${DATE}.csv |& \
  74. tee ./logs/warp2nmt/log-warp2nmt-${SUB}-${DATE}.txt
  75. # METHOD 2
  76. ./code/subcode/bids_preproc_parallel_runs \
  77. --csv ./csv/multi/sub-${SUB,}/${SUB,}_${DATE}.csv \
  78. --subses ${SUB}${DATE} \
  79. # --no-warp
  80. # modelfit
  81. # etc
  82. ## EXAMPLE ==================================================================
  83. echo 'Reached the end of the job-file'