Hi,
I'm trying to run OMA on a cluster that is managed with SLURM. I've used this cluster before for a lot of other things, but I'm not so familiar with job arrays. Although it seems I'm doing things right as far as I can tell, OMA keeps giving only:
"ERROR: Cannot determine total number of jobs in jobarray. requires a range from 1-x"
An example of one of the SLURM scripts I've tried:
#!/bin/sh
#SBATCH --partition=standard
#SBATCH --time=12:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=5
#SBATCH --mem-per-cpu=2gb
#SBATCH --job-name="OMA_test"
#SBATCH --output=output_%A_%a.txt
#SBATCH --error=error_%A_%a.txt
#SBATCH --array=1-5
~/OMA/bin/OMA -s
It initializes fine if I don't use SLURM, but I'm working with multiple genomes, so parallelization would be helpful. Additionally, I encountered an edge case when I was trying to run in our debug queue when I specified 10 jobs in the array, but the max simultaneous in debug is 5- so it seemed to group them hierarchically and started executing five tasks properly. Does this mean that perhaps I need to spawn a "parent" job that then submits the array jobs? I couldn't keep it running in debug because it would timeout after an hour, and so I'd probably have to restart it a bunch of times to get the whole job to complete.
The SLURM example in the doc page (http://omabrowser.org/standalone/) does seem to imply that any "parent" task would be necessary, and I didn't come across any way of manually specifying the number of array jobs to OMA manually.
Anyone with some insight on this? Thanks.
Have you tried instead running with
sbatch --array=1-5 ...
? Just don't put the array size in the script.I didn't think there would be a functional difference- just a different format of specifying parameters (script vs single-line). I guess I'll give it a shot though.
EDIT: I just tried exactly the same lines as are in the example for SLURM on the OMA site, except with 1-5 for the array and with partition specification, and still got an error about not being able to determine the number of jobs in the array.
EDIT 2: I just noticed that there are indeed command line args for OMA (not just the options specified in the parameter file), and one of those allows specifying a number of threads on a single node. While it would be nice to have job arrays working since those are more flexible to schedule, at least I can try to grab a few individual nodes to run this on in parallel using -n. When I get the jobarrays figured out I'll come back here and add an answer (unless someone else posts one first :) )