Does my job run on a box with multiple cpus?

Does my job run on a box with multiple cpus?

ddcc's picture

My program generates two threads that are supposed to share a
workload. It works as intended - with fine speedup - on a 2 cpu Mac.
Cannot replicate this yet on MTL.

One possibility is that my job script does not grab a box with multiple
cpus. I tried taskset first and subsequently:

#!/bin/sh
#PBS -N myjob
#PBS -j oe
#PBS -l ncpus=2
export OMP_NUM_THREADS=3
~/q2/a.out

Does this job guarantee to run on a 2 cpu box?

If not, what do I do wrong?

If it does, then there is deeper trouble.

I see distinct different behavior in a single cpu setting between my
Cygwin Unix and MTL's Linux, which I conjecture to be explained as
follows:

A posix signal call in Cygwin executes at a higher priority than the
invoking thread, which wakes up another thread thereby leading to work
load sharing. Not so in Linux. The invoking thread continues at full
speed and starves all other threads.

I do worry now that a posix signal call in Linux also does not get
through in a 2 cpu setting ...

Yes, I am a newbee in this realm, so please set me straight as you see fit.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Mike Pearce (Intel)'s picture

Not knowing your source code, it's a little difficult to diagnose the problem, that being the case let me try and answer some ofyour questions, as best I can.

You don't need the OMP_NUM_THEADS assignment if you're running posix threads.

The batch machines consist of 32-core (CPU system), so any PBS assignments of <= 32 ncpu's will be honored.

Login to leave a comment.