Syntax for number of cores in a Sun Grid Engine job file
0
votes
2
answers
1592
views
I want to use the HPC of my university to
qsub
an array job of **3** tasks.
Each task runs a Matlab code which uses a solver (MOSEK) that exploits multiple **threads** to solve an optimization problem. A parameter can control the number of threads we want the solver to use. The maximum number of threads allowed should never exceed the number of cores.
Suppose I want the solver to use **4 threads**. Hence, I should ensure that each task is assigned to a machine with at least 4 cores free. How can I request that in the bash file? How should I count, in turn, the memory usage (i.e., should I declare the memory per core or the total memory)?
At the moment this is my bash file
#$ -S /bin/bash
#$ -l h_vmem=18G
#$ -l tmem=18G
#$ -l h_rt=480:0:0
#$ -cwd
#$ -j y
#Run 3 tasks
#$ -t 1-3
#$ -N try
date
hostname
#Output the Task ID
echo "Task ID is $SGE_TASK_ID"
matlab -nodisplay -nodesktop -nojvm -nosplash -r "main_1; ID = $SGE_TASK_ID; f_1; exit"
Asked by Star
(125 rep)
Sep 9, 2020, 01:50 PM
Last activity: Jun 26, 2021, 04:21 PM
Last activity: Jun 26, 2021, 04:21 PM