Good question. I was initializing them directly in the script file. I set all three of JULIA_NUM_THREADS, MKL_NUM_THREADS, and BLAS_NUM_THREADS to be the number of cores that I want (2, 4, 8, etc.). I’ll post the slurm submission script here:
#!/bin/bash
#SBATCH --time=01:00:00
#SBATCH --job-name=test
#SBATCH --output=%x-%j.out
#SBATCH --mem=1G
#SBATCH --nodes=1
#SBATCH --ntasks=4
module load Julia/1.5.4-linux-x86_64
export JULIA_NUM_THREADS=4
export MKL_NUM_THREADS=4
export BLAS_NUM_THREADS=4
julia --check-bounds=no ./program.jl
This is completely consistent between the two computer clusters I’ve run this on.
PS The operating system appears to be CentOS, not Redcent…