note this is still suboptimal.
for example, if you run a job with two MPI tasks with two OpenMP threads
each on the same node,
then it is likely the OpenMP runtime will bind both thread 0 on core 0,
and both thread 1 on core 1, which one more time means time sharing.
Cheers,
Gilles
On 6/
thank you!
mpirun --bind-to none ...
gives what I need:
echo " run 1 " ; export OMP_NUM_THREADS=1 ; time mpirun -np 1 --bind-to
none a.out ; echo " run 2 " ; export OMP_NUM_THREADS=2 ; time
mpirun -np 1 --bind-to none a.out
run 1
0 0
0 0
real0m43.593s
user0m43.282s
sys0m0
mpirun binds a.out on a single core, so when you
OMP_NUM_THREADS=2 mpirun -np 1 a.out
the two OpenMP threads ends up doing time sharing.
you can confirm that by running
grep Cpus_allowed_list /proc/self/status
mpirun -np 1 grep Cpus_allowed_list /proc/self/status
here is what i get :
[gil
Hello!
I have a problem with the hybrid MPI/OpenMP C++ code, which does not
produce acceleration in OpenMP mode at the local, 4th-core home computer.
Open MPI loaded from www.open-mpi.org/
mpirun -V
mpirun (Open MPI) 1.8.1.
Compiled from the source.
Ubuntu 14.04
// ===
//main.c
#include