Re: [OMPI users] MPI_type_create_struct + MPI_Type_vector + MPI_Type_contiguous

2015-01-13 Thread Gus Correa

Hi Diego
I guess MPI_Type_Vector is the natural way to send and receive Fortran90 
array sections (e.g. your QQMLS(:,50:100,:)).

I used that before and it works just fine.
I think that is pretty standard MPI programming style.
I guess MPI_Type_Struct tries to emulate Fortran90 and C structures
(as you did in your previous code, with all the surprises regarding 
alignment, etc), not array sections.
Also, MPI type vector should be more easy going (and probably more 
efficient) than MPI type struct, with less memory alignment problems.

I hope this helps,
Gus Correa

PS - These books have a quite complete description and several examples
of all MPI objects and functions, including MPI types (native and user 
defined):

http://mitpress.mit.edu/books/mpi-complete-reference-0
http://mitpress.mit.edu/books/mpi-complete-reference-1

[They cover MPI 1 and 2. I guess there is a new/upcoming book
with MPI 3, but for what you're doing 1 and 2 are more than enough.]


On 01/13/2015 09:22 AM, Diego Avesani wrote:

Dear all,

I had some wonderful talking about MPI_type_create_struct adn
isend\irecv with
Gilles, Gustavo, George, Gus, Tom and Jeff. Now all is more clear and my
program works.

Now I have another question. In may program I have matrix:

/QQMLS(:,:,:) /that is allocate as

/ALLOCATE(QQMLS(9,npt,18)/), where npt is the number of particles

QQMLS is double precision.

I would like to sent form a CPU to another part of it, for example,
sending QQMLS(:,50:100,:). I mean sending the QQMLS of the particles
between 50 to 100.
I suppose that i could use MPI_Type_vector but I am not sure. The
particle that I want to sent could be from 25 to 50 ecc.. ecc..so
  blocklength changes everytime.

Do I have to use MPI_type_create_struct?
Do I have correctly understood MPI_Type_vector?

Thanks a lot


Diego



___
users mailing list
us...@open-mpi.org
Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
Link to this post: 
http://www.open-mpi.org/community/lists/users/2015/01/26171.php





[OMPI users] MPI_type_create_struct + MPI_Type_vector + MPI_Type_contiguous

2015-01-13 Thread Diego Avesani
Dear all,

I had some wonderful talking about MPI_type_create_struct adn isend\irecv
with
Gilles, Gustavo, George, Gus, Tom and Jeff. Now all is more clear and my
program works.

Now I have another question. In may program I have matrix:

*QQMLS(:,:,:) *that is allocate as

*ALLOCATE(QQMLS(9,npt,18)*), where npt is the number of particles

QQMLS is double precision.

I would like to sent form a CPU to another part of it, for example, sending
QQMLS(:,50:100,:). I mean sending the QQMLS of the particles between 50 to
100.
I suppose that i could use MPI_Type_vector but I am not sure. The particle
that I want to sent could be from 25 to 50 ecc.. ecc..so  blocklength
changes everytime.

Do I have to use MPI_type_create_struct?
Do I have correctly understood MPI_Type_vector?

Thanks a lot


Diego


Re: [OMPI users] error building openmpi-dev-685-g881b1dc on Soalris 10

2015-01-13 Thread Gilles Gouaillardet
Hi Siegmar,

could you please try again with adding '-D_STDC_C99' to your CFLAGS ?

Thanks and regards,

Gilles

On 2015/01/12 20:54, Siegmar Gross wrote:
> Hi,
>
> today I tried to build openmpi-dev-685-g881b1dc on my machines
> (Solaris 10 Sparc, Solaris 10 x86_64, and openSUSE Linux 12.1
> x86_64) with gcc-4.9.2 and the new Solaris Studio 12.4 compilers.
> I succedded on Linux but failed on both Solaris systems for both
> compilers with the same error.
>
> ...
>   CC   adio/common/ad_prealloc.lo
>   CC   adio/common/ad_read.lo
> "/usr/include/sys/feature_tests.h", line 337: #error: "Compiler or options 
> invalid for pre-UNIX 03 
> X/Open applications and pre-2001 POSIX applications"
> cc: acomp failed for 
> ../../../../../../openmpi-dev-685-g881b1dc/ompi/mca/io/romio/romio/adio/common/ad_read.c
> make[4]: *** [adio/common/ad_read.lo] Error 1
>
>
>
> ...
>   CC   adio/common/ad_read.lo
> In file included from /usr/include/unistd.h:18:0,
>  from 
> ../../../../../../openmpi-dev-685-g881b1dc/ompi/mca/io/romio/romio/adio/common/ad_read.c:16:
> /export2/prog/SunOS_sparc/gcc-4.9.2/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/sys/feature_
> tests.h:346:2: error: #error "Compiler or options invalid for pre-UNIX 03 
> X/Open applications 
> and pre-2001 POSIX applications"
>  #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
>   ^
> make[4]: *** [adio/common/ad_read.lo] Error 1
>
>
> I would be grateful if somebody can fix the problem. Thank you
> very much in advance
>
>
> Kind regards
>
> Siegmar
>
> ___
> users mailing list
> us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post: 
> http://www.open-mpi.org/community/lists/users/2015/01/26165.php