Question About MKL on Slurm Cluster

TI36XPro
Sun, 29 Oct 2023 04:35:20 +0000
Specific Domains

Hello,

I am using Julia on an HPC that uses Lmod and Slurm.

I wanted to try using MKL for some calculations since I have access to nodes with intel CPUs. I followed the instructions here. At the top of my script the first package I bring in is MKL.jl.

But I noticed that under modules on the cluster (I did module avail mkl) that there are several versions of MKL listed. Do I need to be explicitly using these in my batch script? Or do they get loaded automatically since I submitted the job to a node with an intel CPU? Hopefully that makes sense.

What I mean is, in my batch script should I have

#SBATCH directives...

module purge
module load mkl

MKL_NUM_THREADS=$SLURM_NTASKS julia main.jl

Then in my Julia script I have

# main.jl
using MKL, other packages...

# calculations....

Or is the module load mkl unnecessary?

2 posts - 2 participants