Running singularity in parallel

Hi,

I was wondering if it is possible to run different singularity containers in parallel. I’m calling singularity like this: SINGULARITY_TMPDIR=$PWD SINGULARITY_CACHEDIR=$PWD singularity run --nv -C -B /EBC:/EBC,$PWD:/opt/templateflow /EBC/home/mblesa/qsiprep-0.18.0.sif $PWD $PWD/sub-${BASENAME}_qsiprep participant --participant-label ${BASENAME} -w $PWD ...
Will it be ok to run it in different cores in parallel? Thanks in advance.

Best regards,

Manuel

Hi @mblesac,

Without knowing your computational resources it is hard to say. For the SLURM job scheduler, for example, I have had no problem running an SBATCH job array where each job was a Singularity app for a different subject. You can do a similar thing with the SGE scheduler as well.

Best,
Steven

Hi,

Thanks for the reply. I’ll look into these packages as I never used them before.

Best regards,

Manuel

Hi @mblesac,

They are not packages really, but computational cluster infrastructures. Can you say more about your computational set up?

Best,
Steven

Hi,

Is a server with 128GB Ram, 64 CPUs and and NVIDIA Tesla K80.

My objective is to run the processing of 300+ subjects, each one calling a singularity container a couple of times, and some gpu processes.

Best regards,

Manuel

At that point, you have fewer CPUs than subjects. So trying to run 300+ subjects at once would not be a great idea. Why not just do one singularity command with all participants? fMRIPrep and QSIPrep already parallelize processes.