Re: [OMPI users] Help on Mpi derived datatype for class with static members

2010-12-09 Thread George Bosilca
You will have to use the MPI_Type_create_struct (http://www.open-mpi.org/doc/v1.5/man3/MPI_Type_create_struct.3.php). george. On Dec 8, 2010, at 16:04 , Santosh Ansumali wrote: > Dear all, > I am confused with the use of MPI derived datatype for classes with > static member. How to create d

[OMPI users] Open MPI on Cygwin

2010-12-09 Thread Siegmar Gross
Hi, I know that you don't try to port Open Mpi to Cygwin at the moment but perhaps you can give me a hint how to proceed. I tried to build openmpi-1.5.1rc1 on Cygwin 1.5.25 with gcc-4 with the following options. ../openmpi-1.5.1rc1r24104/configure --prefix=/usr/local/openmpi-1.5.1-gcc-4 CC=gcc-4

Re: [OMPI users] Help on Mpi derived datatype for class with static members

2010-12-09 Thread Santosh Ansumali
On Thu, Dec 9, 2010 at 8:53 PM, George Bosilca wrote: > You will have to use the MPI_Type_create_struct > (http://www.open-mpi.org/doc/v1.5/man3/MPI_Type_create_struct.3.php). My doubt is what it means to compute blocklength and displacement for static variable. For example, if I have a class

Re: [OMPI users] Help on Mpi derived datatype for class with static members

2010-12-09 Thread David Zhang
I would imagine block length be sizeof(int) + sizeof(double), with displacement [0, sizeof(int)+1] ? On Thu, Dec 9, 2010 at 7:46 AM, Santosh Ansumali wrote: > On Thu, Dec 9, 2010 at 8:53 PM, George Bosilca > wrote: > > You will have to use the MPI_Type_create_struct ( > http://www.open-mpi.org/

Re: [OMPI users] Help on Mpi derived datatype for class with static members

2010-12-09 Thread George Bosilca
Btw why do you want to send he size around if it is a constant? george. On Dec 9, 2010, at 12:30 , David Zhang wrote: > I would imagine block length be sizeof(int) + sizeof(double), with > displacement [0, sizeof(int)+1] ? > > On Thu, Dec 9, 2010 at 7:46 AM, Santosh Ansumali wrote: > On Thu

Re: [OMPI users] curious behavior during wait for broadcast: 100% cpu

2010-12-09 Thread Hicham Mouline
> -Original Message- > From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On > Behalf Of Eugene Loh > Sent: 08 December 2010 16:19 > To: Open MPI Users > Subject: Re: [OMPI users] curious behavior during wait for broadcast: > 100% cpu > > I wouldn't mind some clarificatio

Re: [OMPI users] curious behavior during wait for broadcast: 100% cpu

2010-12-09 Thread Ralph Castain
Sorry for delay - am occupied with my day job. Yes, that is correct to an extent. When you yield the processor, all that happens is that you surrender the rest of your scheduled time slice back to the OS. The OS then cycles thru its scheduler and sequentially assigns the processor to the line o

Re: [OMPI users] Help on Mpi derived datatype for class with static members

2010-12-09 Thread Riccardo Murri
On Wed, Dec 8, 2010 at 10:04 PM, Santosh Ansumali wrote: >   I am confused with the use of MPI derived datatype for classes with > static member. How to create derived datatype for something like > class test{ > static const int i=5; > double data[5]; > } > This looks like C++ code, and I think t

[OMPI users] Method for worker to determine its "rank" on a single machine?

2010-12-09 Thread David Mathog
Is it possible through MPI for a worker to determine: 1. how many MPI processes are running on the local machine 2. within that set its own "local rank" ? For instance, a quad core with 4 processes might be hosting ranks 10, 14, 15, 20, in which case the "local ranks" would be 1,2,3,4. Th

Re: [OMPI users] Method for worker to determine its "rank" on a single machine?

2010-12-09 Thread Ralph Castain
The answer is yes - sort of... In OpenMPI, every process has information about not only its own local rank, but the local rank of all its peers regardless of what node they are on. We use that info internally for a variety of things. Now the "sort of". That info isn't exposed via an MPI API at

Re: [OMPI users] Help on Mpi derived datatype for class with static members

2010-12-09 Thread Santosh Ansumali
Thanks every one. > - the "static" data member is shared between all instances of the >  class, so it cannot be part of the MPI datatype (it will likely be >  at a fixed memory location); Yes! I agree that i is global as far as different instances of class is concern. I don't even want it to be