We do not recommend submitting job arrays on Raijin due to a number of limitations in their scheduling. Job arrays are limited in size.
If you have many small jobs that all use similar resources and will finish around the same time, instead of submitting them individually, look into aggregating them into jobs with a combined resource requirement.
Since each job will spend reasonably significant overhead in setting up the environment, and the scheduler will have to consider each of them individually to optimise the cluster usage, having many small jobs is going to increase the total waiting time for your jobs in the queue. In addition submitting many small jobs to the queue will cause all other users within the project to have to wait until your jobs are processed before their jobs can make it to the execution queues as only 300 queued jobs are allowed in the execution queue per project.
If you have dozens to a few hundred identical multi-CPU jobs, we recommend using loops like this:
Please DO NOT submit THOUSANDS of single-CPU jobs using the example above!
You could run multiple single-CPU jobs in parallel if they all use similar resources and will finish around the same time by using Example 2 or 3:
Example 2 allows you to run 16 single-CPU jobs within one node.
Example 3 allows you to run 32 single-CPU jobs across two nodes:
Please note the ‘&’ at the end of the command line, and the ‘wait’ for all background tasks to finish.