Re: [OMPI users] Multiple threads for an mpi process

2014-09-12 Thread Tim Prince
On 9/12/2014 9:22 AM, JR Cary wrote: On 9/12/14, 7:27 AM, Tim Prince wrote: On 9/12/2014 6:14 AM, JR Cary wrote: This must be a very old topic. I would like to run mpi with one process per node, e.g., using -cpus-per-rank=1. Then I want to use openmp inside of that. But other times I will

Re: [OMPI users] Multiple threads for an mpi process

2014-09-12 Thread Ralph Castain
Hmmm...well, the info is there. There is an envar OMPI_COMM_WORLD_LOCAL_SIZE which tells you how many procs are on this node. If you tell your proc how many cores (or hwthreads) to use, it would be a simple division to get what you want. You could also detect the number of cores or hwthreads via

Re: [OMPI users] Multiple threads for an mpi process

2014-09-12 Thread JR Cary
On 9/12/14, 7:27 AM, Tim Prince wrote: On 9/12/2014 6:14 AM, JR Cary wrote: This must be a very old topic. I would like to run mpi with one process per node, e.g., using -cpus-per-rank=1. Then I want to use openmp inside of that. But other times I will run with a rank on each physical core.

Re: [OMPI users] Multiple threads for an mpi process

2014-09-12 Thread Tim Prince
On 9/12/2014 6:14 AM, JR Cary wrote: This must be a very old topic. I would like to run mpi with one process per node, e.g., using -cpus-per-rank=1. Then I want to use openmp inside of that. But other times I will run with a rank on each physical core. Inside my code I would like to detect wh

[OMPI users] Multiple threads for an mpi process

2014-09-12 Thread JR Cary
This must be a very old topic. I would like to run mpi with one process per node, e.g., using -cpus-per-rank=1. Then I want to use openmp inside of that. But other times I will run with a rank on each physical core. Inside my code I would like to detect which situation I am in. Is there an open