#227 closed defect (fixed)
OpenMPI and Sherpa
Reported by: | Generic User (don't modify these fields) | Owned by: | support@sherpa-mc.de |
---|---|---|---|
Priority: | major | Milestone: | rel-2.0.0 |
Component: | Unknown | Version: | 1.4.0 |
Keywords: | OpenMPI | Cc: | Wojciech.Kotlarski@fuw.edu.pl |
Description
I have encountered a strange behaviour in Sherpa running with the OpenMPI. I'm running a computer with a single processor having in total 4 cores (one thread per core). In principle it is possible to oversubscribe a slot in OpenMPI. But if you try to run Sherpa with the command
mpirun --np 4 --npersocket 4 --bind-to-core --cpus-per-proc 1 Sherpa
than Sherpa runs 4 ranks, where every rank has 4 threads. Than it suspends ranks 1,2 & 3 and runs only rank 0 on one core. Is oversubscribing somehow disabled in Sherpa? What's even stranger, is that you can run Sherpa with '-np 25'. This creates 25 ranks, each with 8 threads. All ranks get suspended except for ranks 0,8,16,24
Rank 0 runs 8 threads. Rank 8 runs 8 threads. Rank 16 runs 8 threads. Rank 24 runs 1 threads. Suspending ranks 1 2 3 4 5 6 7 9 10 11 12 13 14 15 17 18 19 20 21 22 23.
and than everything works fine on all 4 cores producing result without further errors. Can you comment on this? Is this behaviour normal or not?
best regards,
Wojciech Kotlarski
Attachments (0)
Change History (4)
comment:1 follow-up: 2 Changed 13 years ago by
comment:2 Changed 13 years ago by
Thank you for your help. The simplest solution is just to disable multithreading.
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Milestone: | → rel-2.0.0 |
---|
This behavior is intended. You can limit the number of threads per core using MPI_COMBINE_PROCS=<number> . Setting this value to one should produce the desired result. When Sherpa is compiled with MPI and thread support we limit the number of processes per node in order to save memory.