<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Diego,<div class=""><br class=""></div><div class="">This mailing list isn’t for questions about using MPI so you won’t get answers to your questions here. It’s for the group working on writing the MPI Standard. I would encourage you to post your question on the mailing list for whichever MPI implementation you are using:</div><div class=""><br class=""></div><div class="">MPICH: <a href="mailto:discuss@mpich.org" class="">discuss@mpich.org</a></div><div class="">Open MPI: <a href="mailto:users@open-mpi.org" class="">users@open-mpi.org</a></div><div class=""><br class=""></div><div class="">Others have their own support system available through their websites.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Wesley</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 2, 2014, at 10:20 AM, Diego Avesani <<a href="mailto:diego.avesani@gmail.com" class="">diego.avesani@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">Dear all.<div class="">I have some problem with MPI_TYPE_CREATE_STRUCT and as a consequence with SENDRECV.</div><div class=""><br class=""></div><div class="">I have this variable type</div><div class=""><i style="" class=""><br class=""></i></div><div class=""><i style="" class="">type particle</i></div><div class=""><i style="" class="">integer :: ip</i></div><div class=""><i style="" class=""> real :: RP(2)</i></div><div class=""><i style="" class=""> real :: QQ(4)</i></div><div class=""><i style="" class="">end type particle</i></div><div class=""><i style="" class=""><br class=""></i></div><div class="">When I compile in double precision with:</div><div class=""><br class=""></div><div class=""><div class=""><i class="">mpif90 -r8 -fpp -DPARALLEL *.f90 </i></div></div><div class=""><br class=""></div><div class="">So when I create my own variable type for MPI, I have</div><div class=""><br class=""></div><div class=""><div class=""><i class="">TYPES(1)=MPI_INTEGER !We have three variables type in the new varible<br class=""></i></div><div class=""><i class="">TYPES(2)=MPI_DOUBLE_PRECISION !Integer and Real and Real</i></div><div class=""><i class=""> TYPES(3)=MPI_DOUBLE_PRECISION !Integer and Real and Real</i></div><div class=""><i class=""> nBLOCKS(1)=1 !number of element in each block </i></div><div class=""><i class=""> nBLOCKS(2)=2</i></div><div class=""><i class=""> nBLOCKS(3)=4</i></div><div class=""><i class=""> !</i></div><div class=""><i class=""> DISPLACEMENTS(1)=0</i></div><div class=""><i class=""> DISPLACEMENTS(2)=sizeof(dummy%ip)</i></div><div class=""><i class=""> DISPLACEMENTS(3)=sizeof(dummy%ip)+sizeof(dummy%RP(1))+sizeof(dummy%RP(2))</i></div><div class=""><i class=""> ! </i></div><div class=""><i class=""> CALL MPI_TYPE_CREATE_STRUCT(3,nBLOCKS,DISPLACEMENTS,TYPES,MPI_PARTICLE_TYPE, PI%ierr)</i></div><div class=""><i class=""> CALL MPI_TYPE_COMMIT(MPI_PARTICLE_TYPE,MPI%ierr)</i></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Am I right?</div><div class="">Thanks, in advance, for any kind of help</div><div class=""><br class=""></div><div class=""><br clear="all" class=""><div class="">Diego<br class=""><br class=""></div>
</div></div>
_______________________________________________<br class="">mpi-forum mailing list<br class=""><a href="mailto:mpi-forum@lists.mpi-forum.org" class="">mpi-forum@lists.mpi-forum.org</a><br class="">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum</div></blockquote></div><br class=""></div></body></html>