-
Notifications
You must be signed in to change notification settings - Fork 0
/
LabelForSlurm.sb
25 lines (24 loc) · 794 Bytes
/
LabelForSlurm.sb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#SBATCH --time=24:00:00
#SBATCH --job-name=YOUR_JOB_NAME
#SBATCH --partition=normal
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=20
#SBATCH --chdir=YOUR_PATH
#SBATCH --array=0-YOUR_FT2_FILE_NUMBER
#SBATCH --output=YOUR_JOB_NAME_array_%A-%a_out.txt
#SBATCH --error=YOUR_JOB_NAME_array_%A-%a_stderr.txt
#SBATCH --mail-user=YOUR_EMAIL
#SBATCH --mail-type=ALL
export OMP_NUM_THREADS=YOUR_CPU_CORE
printf "\n=====Search database=====\n\n"
files=(YOUR_PATH/*.FT2)
configs=(YOUR_PATH/configs/*.cfg)
export file=${files[$SLURM_ARRAY_TASK_ID]}
printf "\n=====Search $file =====\n\n"
echo "${configs[@]}" | xargs -n 1 -P 1 \
bash -c 'YOUR_PATH/SiprosV3omp -f ${file} -c $0 -o YOUR_PATH'
wait
printf "\n=====Search $file finished =====\n\n"