For_each and parallel processing in array job

Hi everyone,

I’m trying to run fixel-based analysis following these instructions Fibre density and cross-section - Multi-tissue CSD — MRtrix3 3.0 documentation and trying to speed the process up on an HPC cluster. I was wondering if there was a way to run commands that have to be run for each subject as a slurm array job so that they could run in parallel, but I’m not sure if that means I can’t use for_each and would have to change the commands for that so that each job in the array does one subject. Is there a way to keep the commands as they are and have an array job? Or would you rather advise to use for_each -nthreads instead? (In that case I would need to split up the subject directory because I don’t have as many cores available as there are subjects).

Thank you in advance!

Hi

Maybe have a look at Meisler_Reading_FBA/fba/bash_scripts at main · smeisler/Meisler_Reading_FBA · GitHub

Cheers
Wiliam