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

Re: [OMPI users] Multiple threads

2007-10-01 Thread Gleb Natapov
On Mon, Oct 01, 2007 at 10:39:12AM +0200, Olivier DUBUISSON wrote: > Hello, > > I compile openmpi 1.2.3 with options ./configure --with-threads=posix > --enable-mpi-thread --enable-progress-threads --enable-smp-locks. > > My program has 2 threads (main thread and an other). When i run it, i > ca

[OMPI users] Multiple threads

2007-10-01 Thread Olivier DUBUISSON
Hello, I compile openmpi 1.2.3 with options ./configure --with-threads=posix --enable-mpi-thread --enable-progress-threads --enable-smp-locks. My program has 2 threads (main thread and an other). When i run it, i can see 4 threads. I think that two threads are the progress threads, is it right ?

Re: [OMPI users] multiple threads synchronization with Openmpi

2007-08-10 Thread George Bosilca
MPI is process based and not thread based. So there is no way in MPI to synchronize several threads. Moreover, all threads in a process will return the same rank [as you noticed]. Synchronizations internal to a process have to be done outside MPI. Any threading library, such as pthread libr

[OMPI users] multiple threads synchronization with Openmpi

2007-08-10 Thread Yuan, Huapeng
Hi, Can I use openmpi API like MPI_Reduce or MPI_Gather to synchronize multiple theads in a process? In my test in redhat linux, MPI_Comm_rank return 0 for all threads in the same process. If I want to use the MPI functions like MPI_Reduce or MPI_Gather, the rank number shoule be different