Running Julia with multi-threading with `qsub`

Hi everyone!!

I have a question on what is the correct way to run Julia with multithreads with qsub. I am trying to submit a job to the cluster to run Julia with multiple threads. I did the followings:

julia "test.jl" --threads 16

But it ended up running with 1 thread instead. I think it used 1 thread only because I call nthreads() inside the test.jl script and asks the code to export it.

Should I call Julia differently inside the .qsub script?

If I intend to use 16 threads, would it also be the best to use the followings to assign CPU as well (suppose I want 64 gb memory)?

#PBS -l nodes=1:ppn=16,mem=64gb


The right syntax is

julia --threads 16 "test.jl"

You were passing arguments to the script test.jl in the form of Base.ARGS, not to the Julia process itself. In general, the syntax is

julia [arguments to julia process] [script name] [arguments to the script]

I see, thanks @giordano :slight_smile: