Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-12 Thread Gilles Gouaillardet
Jeff,

thanks for all the good catches.

MPI_Type_create_resized is not required in this example because
send/recv are called
with count=1.

Generally speaking, if count > 1, MPI_Type_create_resized is required
because
the compiler might add some padding at the end of the type.

Cheers,

Gilles

On 2015/01/08 20:08, Jeff Squyres (jsquyres) wrote:
> There were still some minor errors left over in the attached program.
>
> I strongly encourage you to use "use mpi" instead of "include 'mpif.h'" 
> because you will get compile time errors when you pass incorrect / forget to 
> pass parameters to MPI subroutines.  When I switched your program to "use 
> mpi", here's what the compiler showed me:
>
> 1. the name "MPI" is reserved
> 2. need to pass displacements(1:nstruct+1) to mpi_type_create_struct
> 3. need to pass request(1) to mpi_isend
> 4. need to pass request(1) to mpi_wait
> 5. need to pass ierr argument to mpi_wait
>
> 1-4 are technically not correct, but the program would likely (usually) 
> compile/run "correctly" anyway.  5 is probably what caused your segv.
>
> Attached is my copy of your program with fixes for the above-mentioned issues.
>
> BTW, I missed the beginning of this thread -- I assume that this is an 
> artificial use of mpi_type_create_resized for the purposes of a small 
> example.  The specific use of it in this program appears to be superfluous.
>
>
>
>
>
> On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet 
>  wrote:
>
>> Diego,
>>
>> yes, it works for me (at least with the v1.8 head and gnu compilers)
>>
>> Cheers,
>>
>> Gilles
>>
>> On 2015/01/08 17:51, Diego Avesani wrote:
>>> Dear Gilles,
>>> thanks again, however it does not work.
>>>
>>> the program says:  "SIGSEGV, segmentation fault occurred"
>>>
>>> Does the program run in your case?
>>>
>>> Thanks again
>>>
>>>
>>>
>>> Diego
>>>
>>>
>>> On 8 January 2015 at 03:02, Gilles Gouaillardet <
>>>
>>> gilles.gouaillar...@iferc.org
 wrote:
>>>
  Diego,

 my bad, i should have passed displacements(1) to MPI_Type_create_struct

 here is an updated version

 (note you have to use a REQUEST integer for MPI_Isend and MPI_Irecv,
 and you also have to call MPI_Wait to ensure the requests complete)

 Cheers,

 Gilles


 On 2015/01/08 8:23, Diego Avesani wrote:

 Dear Gilles, Dear all,

 I'm sorry to bother you again, but I have some problem with send and
 receive the struct_data.

 I tried to send a MPI_Type_Create_Struct but I get a segmentation fault
 occurred and I do not know why. The program is very simple, it is the old
 one with the isend and irecv subroutines

 (you can find it in the attachment)

 Thanks again


 Diego


 On 5 January 2015 at 15:54, Diego Avesani
  
  wrote:


  Dear Gilles,

 Thanks, Thanks a lot.
 Now is more clear.

 Again, thanks a lot

 Diego





 ___
 users mailing
 listus...@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/26116.php




 ___
 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/26118.php



>>>
>>> ___
>>> 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/26124.php
>> ___
>> 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/26126.php
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to: 
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
>
>
> ___
> 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/26127.php



Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread George Bosilca
Or use MPI_Type_match_size to find the right type.

  George.

> On Jan 8, 2015, at 19:05 , Gus Correa  wrote:
> 
> Hi Diego
> 
> *EITHER*
> declare your QQ and PR (?) structure components as DOUBLE PRECISION
> *OR*
> keep them REAL(dp) but *fix* your "dp" definition, as George Bosilca 
> suggested.
> 
> Gus Correa
> 
> On 01/08/2015 06:36 PM, Diego Avesani wrote:
>> Dear Gus, Dear All,
>> so are you suggesting to use DOUBLE PRECISION and not REAL(dp)?
>> Thanks again
>> 
>> Diego
>> 
>> 
>> On 9 January 2015 at 00:02, Gus Correa > > wrote:
>> 
>>On 01/08/2015 05:50 PM, Diego Avesani wrote:
>> 
>>Dear George, Dear all,
>>what are the other issues?
>> 
>>Why did you put in selected_real_kind(15, 307) the number 307
>> 
>> 
>>Hi Diego
>> 
>>That is the Fortran 90 (and later) syntax for selected_real_kind.
>>The first number is the number of digits in the mantissa,
>>the second is the exponent range.
>>For (simpler) alternatives, see here:
>> 
>>http://fortranwiki.org/__fortran/show/Real+precision
>>
>> 
>>A lot of grief (and probably the segfault)
>>could have been saved if you just used
>>"DOUBLE PRECISION", instead of REAL in your
>>structure components declaration, as I suggested a while back.
>> 
>>I hope this helps,
>>Gus Correa
>> 
>> 
>>Thanks again
>> 
>>Diego
>> 
>> 
>>On 8 January 2015 at 23:24, George Bosilca >
>>>> wrote:
>> 
>> Diego,
>> 
>> Please find below the corrected example. There were several
>>issues
>> but the most important one, which is certainly the cause of the
>> segfault, is that "real(dp)" (with dp =
>>selected_real_kind(p=16)) is
>> NOT equal to MPI_DOUBLE_RECISION. For double precision you
>>should
>> use 15 (and not 16).
>> 
>>George.
>> 
>> 
>> On Thu, Jan 8, 2015 at 6:08 AM, Jeff Squyres (jsquyres)
>> mailto:jsquy...@cisco.com>
>>>> wrote:
>> 
>> There were still some minor errors left over in the
>>attached
>> program.
>> 
>> I strongly encourage you to use "use mpi" instead of
>>"include
>> 'mpif.h'" because you will get compile time errors when
>>you pass
>> incorrect / forget to pass parameters to MPI
>>subroutines.  When
>> I switched your program to "use mpi", here's what the
>>compiler
>> showed me:
>> 
>> 1. the name "MPI" is reserved
>> 2. need to pass displacements(1:nstruct+1) to
>>mpi_type_create_struct
>> 3. need to pass request(1) to mpi_isend
>> 4. need to pass request(1) to mpi_wait
>> 5. need to pass ierr argument to mpi_wait
>> 
>> 1-4 are technically not correct, but the program would
>>likely
>> (usually) compile/run "correctly" anyway.  5 is
>>probably what
>> caused your segv.
>> 
>> Attached is my copy of your program with fixes for the
>> above-mentioned issues.
>> 
>> BTW, I missed the beginning of this thread -- I assume
>>that this
>> is an artificial use of mpi_type_create_resized for the
>>purposes
>> of a small example.  The specific use of it in this program
>> appears to be superfluous.
>> 
>> 
>> 
>> 
>> 
>> On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet
>> >
>> >>> wrote:
>> 
>> > Diego,
>> >
>> > yes, it works for me (at least with the v1.8 head and
>>gnu compilers)
>> >
>> > Cheers,
>> >
>> > Gilles
>> >
>> > On 2015/01/08 17:51, Diego Avesani wrote:
>> >> Dear Gilles,
>> >> thanks again, however it does not work.
>> >>
>> >> the program says:  "SIGSEGV, segmentation fault
>>occurred"
>> >>
>> >> Does the program run in your case?
>> >>
>> >> Thanks again
>> >>
>> >>
>> >>
>> >> Diego
>> >>
>> >>
>> >> On 8 January 2015 at 03:02, Gilles Gouaillardet <
>> >>
>> 

Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread Gus Correa

Hi Diego

*EITHER*
declare your QQ and PR (?) structure components as DOUBLE PRECISION
*OR*
keep them REAL(dp) but *fix* your "dp" definition, as George Bosilca 
suggested.


Gus Correa

On 01/08/2015 06:36 PM, Diego Avesani wrote:

Dear Gus, Dear All,
so are you suggesting to use DOUBLE PRECISION and not REAL(dp)?
Thanks again

Diego


On 9 January 2015 at 00:02, Gus Correa mailto:g...@ldeo.columbia.edu>> wrote:

On 01/08/2015 05:50 PM, Diego Avesani wrote:

Dear George, Dear all,
what are the other issues?

Why did you put in selected_real_kind(15, 307) the number 307


Hi Diego

That is the Fortran 90 (and later) syntax for selected_real_kind.
The first number is the number of digits in the mantissa,
the second is the exponent range.
For (simpler) alternatives, see here:

http://fortranwiki.org/__fortran/show/Real+precision


A lot of grief (and probably the segfault)
could have been saved if you just used
"DOUBLE PRECISION", instead of REAL in your
structure components declaration, as I suggested a while back.

I hope this helps,
Gus Correa


Thanks again

Diego


On 8 January 2015 at 23:24, George Bosilca mailto:bosi...@icl.utk.edu>
>> wrote:

 Diego,

 Please find below the corrected example. There were several
issues
 but the most important one, which is certainly the cause of the
 segfault, is that "real(dp)" (with dp =
selected_real_kind(p=16)) is
 NOT equal to MPI_DOUBLE_RECISION. For double precision you
should
 use 15 (and not 16).

George.


 On Thu, Jan 8, 2015 at 6:08 AM, Jeff Squyres (jsquyres)
 mailto:jsquy...@cisco.com>
>> wrote:

 There were still some minor errors left over in the
attached
 program.

 I strongly encourage you to use "use mpi" instead of
"include
 'mpif.h'" because you will get compile time errors when
you pass
 incorrect / forget to pass parameters to MPI
subroutines.  When
 I switched your program to "use mpi", here's what the
compiler
 showed me:

 1. the name "MPI" is reserved
 2. need to pass displacements(1:nstruct+1) to
mpi_type_create_struct
 3. need to pass request(1) to mpi_isend
 4. need to pass request(1) to mpi_wait
 5. need to pass ierr argument to mpi_wait

 1-4 are technically not correct, but the program would
likely
 (usually) compile/run "correctly" anyway.  5 is
probably what
 caused your segv.

 Attached is my copy of your program with fixes for the
 above-mentioned issues.

 BTW, I missed the beginning of this thread -- I assume
that this
 is an artificial use of mpi_type_create_resized for the
purposes
 of a small example.  The specific use of it in this program
 appears to be superfluous.





 On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet
 mailto:gilles.gouaillar...@iferc.org>
 >> wrote:

 > Diego,
 >
 > yes, it works for me (at least with the v1.8 head and
gnu compilers)
 >
 > Cheers,
 >
 > Gilles
 >
 > On 2015/01/08 17:51, Diego Avesani wrote:
 >> Dear Gilles,
 >> thanks again, however it does not work.
 >>
 >> the program says:  "SIGSEGV, segmentation fault
occurred"
 >>
 >> Does the program run in your case?
 >>
 >> Thanks again
 >>
 >>
 >>
 >> Diego
 >>
 >>
 >> On 8 January 2015 at 03:02, Gilles Gouaillardet <
 >>
 >>gilles.gouaillardet@iferc.__org

>
 >> > wrote:
 >>
 >>
 >>>  Diego,
 >>>
 >>> my bad, i should have passed displacements(1) to
MPI_Type_create_struct
 >>>
 >>> here is an updated v

Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread Diego Avesani
Dear Gus, Dear All,
so are you suggesting to use DOUBLE PRECISION and not REAL(dp)?
Thanks again

Diego


On 9 January 2015 at 00:02, Gus Correa  wrote:

> On 01/08/2015 05:50 PM, Diego Avesani wrote:
>
>> Dear George, Dear all,
>> what are the other issues?
>>
>> Why did you put in selected_real_kind(15, 307) the number 307
>>
>>
> Hi Diego
>
> That is the Fortran 90 (and later) syntax for selected_real_kind.
> The first number is the number of digits in the mantissa,
> the second is the exponent range.
> For (simpler) alternatives, see here:
>
> http://fortranwiki.org/fortran/show/Real+precision
>
> A lot of grief (and probably the segfault)
> could have been saved if you just used
> "DOUBLE PRECISION", instead of REAL in your
> structure components declaration, as I suggested a while back.
>
> I hope this helps,
> Gus Correa
>
>
>  Thanks again
>>
>> Diego
>>
>>
>> On 8 January 2015 at 23:24, George Bosilca > > wrote:
>>
>> Diego,
>>
>> Please find below the corrected example. There were several issues
>> but the most important one, which is certainly the cause of the
>> segfault, is that "real(dp)" (with dp = selected_real_kind(p=16)) is
>> NOT equal to MPI_DOUBLE_RECISION. For double precision you should
>> use 15 (and not 16).
>>
>>George.
>>
>>
>> On Thu, Jan 8, 2015 at 6:08 AM, Jeff Squyres (jsquyres)
>> mailto:jsquy...@cisco.com>> wrote:
>>
>> There were still some minor errors left over in the attached
>> program.
>>
>> I strongly encourage you to use "use mpi" instead of "include
>> 'mpif.h'" because you will get compile time errors when you pass
>> incorrect / forget to pass parameters to MPI subroutines.  When
>> I switched your program to "use mpi", here's what the compiler
>> showed me:
>>
>> 1. the name "MPI" is reserved
>> 2. need to pass displacements(1:nstruct+1) to
>> mpi_type_create_struct
>> 3. need to pass request(1) to mpi_isend
>> 4. need to pass request(1) to mpi_wait
>> 5. need to pass ierr argument to mpi_wait
>>
>> 1-4 are technically not correct, but the program would likely
>> (usually) compile/run "correctly" anyway.  5 is probably what
>> caused your segv.
>>
>> Attached is my copy of your program with fixes for the
>> above-mentioned issues.
>>
>> BTW, I missed the beginning of this thread -- I assume that this
>> is an artificial use of mpi_type_create_resized for the purposes
>> of a small example.  The specific use of it in this program
>> appears to be superfluous.
>>
>>
>>
>>
>>
>> On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet
>> > > wrote:
>>
>> > Diego,
>> >
>> > yes, it works for me (at least with the v1.8 head and gnu
>> compilers)
>> >
>> > Cheers,
>> >
>> > Gilles
>> >
>> > On 2015/01/08 17:51, Diego Avesani wrote:
>> >> Dear Gilles,
>> >> thanks again, however it does not work.
>> >>
>> >> the program says:  "SIGSEGV, segmentation fault occurred"
>> >>
>> >> Does the program run in your case?
>> >>
>> >> Thanks again
>> >>
>> >>
>> >>
>> >> Diego
>> >>
>> >>
>> >> On 8 January 2015 at 03:02, Gilles Gouaillardet <
>> >>
>> >>gilles.gouaillar...@iferc.org > iferc.org>
>> >> > wrote:
>> >>
>> >>
>> >>>  Diego,
>> >>>
>> >>> my bad, i should have passed displacements(1) to
>> MPI_Type_create_struct
>> >>>
>> >>> here is an updated version
>> >>>
>> >>> (note you have to use a REQUEST integer for MPI_Isend and
>> MPI_Irecv,
>> >>> and you also have to call MPI_Wait to ensure the requests
>> complete)
>> >>>
>> >>> Cheers,
>> >>>
>> >>> Gilles
>> >>>
>> >>>
>> >>> On 2015/01/08 8:23, Diego Avesani wrote:
>> >>>
>> >>> Dear Gilles, Dear all,
>> >>>
>> >>> I'm sorry to bother you again, but I have some problem with
>> send and
>> >>> receive the struct_data.
>> >>>
>> >>> I tried to send a MPI_Type_Create_Struct but I get a
>> segmentation fault
>> >>> occurred and I do not know why. The program is very simple,
>> it is the old
>> >>> one with the isend and irecv subroutines
>> >>>
>> >>> (you can find it in the attachment)
>> >>>
>> >>> Thanks again
>> >>>
>> >>>
>> >>> Diego
>> >>>
>> >>>
>> >>> On 5 January 2015 at 15:54, Diego Avesani
>> >>> mailto:diego.aves...@gmail.com>>
>> mailto:diego.aves...@gmail.com>>
>> >>>  wrote:

Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread Gus Correa

On 01/08/2015 05:50 PM, Diego Avesani wrote:

Dear George, Dear all,
what are the other issues?

Why did you put in selected_real_kind(15, 307) the number 307



Hi Diego

That is the Fortran 90 (and later) syntax for selected_real_kind.
The first number is the number of digits in the mantissa,
the second is the exponent range.
For (simpler) alternatives, see here:

http://fortranwiki.org/fortran/show/Real+precision

A lot of grief (and probably the segfault)
could have been saved if you just used
"DOUBLE PRECISION", instead of REAL in your
structure components declaration, as I suggested a while back.

I hope this helps,
Gus Correa



Thanks again

Diego


On 8 January 2015 at 23:24, George Bosilca mailto:bosi...@icl.utk.edu>> wrote:

Diego,

Please find below the corrected example. There were several issues
but the most important one, which is certainly the cause of the
segfault, is that "real(dp)" (with dp = selected_real_kind(p=16)) is
NOT equal to MPI_DOUBLE_RECISION. For double precision you should
use 15 (and not 16).

   George.


On Thu, Jan 8, 2015 at 6:08 AM, Jeff Squyres (jsquyres)
mailto:jsquy...@cisco.com>> wrote:

There were still some minor errors left over in the attached
program.

I strongly encourage you to use "use mpi" instead of "include
'mpif.h'" because you will get compile time errors when you pass
incorrect / forget to pass parameters to MPI subroutines.  When
I switched your program to "use mpi", here's what the compiler
showed me:

1. the name "MPI" is reserved
2. need to pass displacements(1:nstruct+1) to mpi_type_create_struct
3. need to pass request(1) to mpi_isend
4. need to pass request(1) to mpi_wait
5. need to pass ierr argument to mpi_wait

1-4 are technically not correct, but the program would likely
(usually) compile/run "correctly" anyway.  5 is probably what
caused your segv.

Attached is my copy of your program with fixes for the
above-mentioned issues.

BTW, I missed the beginning of this thread -- I assume that this
is an artificial use of mpi_type_create_resized for the purposes
of a small example.  The specific use of it in this program
appears to be superfluous.





On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet
mailto:gilles.gouaillar...@iferc.org>> wrote:

> Diego,
>
> yes, it works for me (at least with the v1.8 head and gnu compilers)
>
> Cheers,
>
> Gilles
>
> On 2015/01/08 17:51, Diego Avesani wrote:
>> Dear Gilles,
>> thanks again, however it does not work.
>>
>> the program says:  "SIGSEGV, segmentation fault occurred"
>>
>> Does the program run in your case?
>>
>> Thanks again
>>
>>
>>
>> Diego
>>
>>
>> On 8 January 2015 at 03:02, Gilles Gouaillardet <
>>
>>gilles.gouaillar...@iferc.org 
>> > wrote:
>>
>>
>>>  Diego,
>>>
>>> my bad, i should have passed displacements(1) to 
MPI_Type_create_struct
>>>
>>> here is an updated version
>>>
>>> (note you have to use a REQUEST integer for MPI_Isend and MPI_Irecv,
>>> and you also have to call MPI_Wait to ensure the requests complete)
>>>
>>> Cheers,
>>>
>>> Gilles
>>>
>>>
>>> On 2015/01/08 8:23, Diego Avesani wrote:
>>>
>>> Dear Gilles, Dear all,
>>>
>>> I'm sorry to bother you again, but I have some problem with send and
>>> receive the struct_data.
>>>
>>> I tried to send a MPI_Type_Create_Struct but I get a segmentation 
fault
>>> occurred and I do not know why. The program is very simple, it is 
the old
>>> one with the isend and irecv subroutines
>>>
>>> (you can find it in the attachment)
>>>
>>> Thanks again
>>>
>>>
>>> Diego
>>>
>>>
>>> On 5 January 2015 at 15:54, Diego Avesani
>>> mailto:diego.aves...@gmail.com>>
mailto:diego.aves...@gmail.com>>
>>>  wrote:
>>>
>>>
>>>  Dear Gilles,
>>>
>>> Thanks, Thanks a lot.
>>> Now is more clear.
>>>
>>> Again, thanks a lot
>>>
>>> Diego
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> users mailing
>>>listus...@open-mpi.org 
>>>
>>> Subscription:
>>>http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>
>>> Link to this post:
>>>http://www.op

Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread Diego Avesani
Dear George, Dear all,
what are the other issues?

Why did you put in selected_real_kind(15, 307) the number 307

Thanks again

Diego


On 8 January 2015 at 23:24, George Bosilca  wrote:

> Diego,
>
> Please find below the corrected example. There were several issues but the
> most important one, which is certainly the cause of the segfault, is that
> "real(dp)" (with dp = selected_real_kind(p=16)) is NOT equal to
> MPI_DOUBLE_RECISION. For double precision you should use 15 (and not 16).
>
>   George.
>
>
> On Thu, Jan 8, 2015 at 6:08 AM, Jeff Squyres (jsquyres) <
> jsquy...@cisco.com> wrote:
>
>>  There were still some minor errors left over in the attached program.
>>
>> I strongly encourage you to use "use mpi" instead of "include 'mpif.h'"
>> because you will get compile time errors when you pass incorrect / forget
>> to pass parameters to MPI subroutines.  When I switched your program to
>> "use mpi", here's what the compiler showed me:
>>
>> 1. the name "MPI" is reserved
>> 2. need to pass displacements(1:nstruct+1) to mpi_type_create_struct
>> 3. need to pass request(1) to mpi_isend
>> 4. need to pass request(1) to mpi_wait
>> 5. need to pass ierr argument to mpi_wait
>>
>> 1-4 are technically not correct, but the program would likely (usually)
>> compile/run "correctly" anyway.  5 is probably what caused your segv.
>>
>> Attached is my copy of your program with fixes for the above-mentioned
>> issues.
>>
>> BTW, I missed the beginning of this thread -- I assume that this is an
>> artificial use of mpi_type_create_resized for the purposes of a small
>> example.  The specific use of it in this program appears to be superfluous.
>>
>>
>>
>>
>>
>> On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet <
>> gilles.gouaillar...@iferc.org> wrote:
>>
>> > Diego,
>> >
>> > yes, it works for me (at least with the v1.8 head and gnu compilers)
>> >
>> > Cheers,
>> >
>> > Gilles
>> >
>> > On 2015/01/08 17:51, Diego Avesani wrote:
>> >> Dear Gilles,
>> >> thanks again, however it does not work.
>> >>
>> >> the program says:  "SIGSEGV, segmentation fault occurred"
>> >>
>> >> Does the program run in your case?
>> >>
>> >> Thanks again
>> >>
>> >>
>> >>
>> >> Diego
>> >>
>> >>
>> >> On 8 January 2015 at 03:02, Gilles Gouaillardet <
>> >>
>> >> gilles.gouaillar...@iferc.org
>> >> > wrote:
>> >>
>> >>
>> >>>  Diego,
>> >>>
>> >>> my bad, i should have passed displacements(1) to
>> MPI_Type_create_struct
>> >>>
>> >>> here is an updated version
>> >>>
>> >>> (note you have to use a REQUEST integer for MPI_Isend and MPI_Irecv,
>> >>> and you also have to call MPI_Wait to ensure the requests complete)
>> >>>
>> >>> Cheers,
>> >>>
>> >>> Gilles
>> >>>
>> >>>
>> >>> On 2015/01/08 8:23, Diego Avesani wrote:
>> >>>
>> >>> Dear Gilles, Dear all,
>> >>>
>> >>> I'm sorry to bother you again, but I have some problem with send and
>> >>> receive the struct_data.
>> >>>
>> >>> I tried to send a MPI_Type_Create_Struct but I get a segmentation
>> fault
>> >>> occurred and I do not know why. The program is very simple, it is the
>> old
>> >>> one with the isend and irecv subroutines
>> >>>
>> >>> (you can find it in the attachment)
>> >>>
>> >>> Thanks again
>> >>>
>> >>>
>> >>> Diego
>> >>>
>> >>>
>> >>> On 5 January 2015 at 15:54, Diego Avesani
>> >>>  
>> >>>  wrote:
>> >>>
>> >>>
>> >>>  Dear Gilles,
>> >>>
>> >>> Thanks, Thanks a lot.
>> >>> Now is more clear.
>> >>>
>> >>> Again, thanks a lot
>> >>>
>> >>> Diego
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ___
>> >>> users mailing
>> >>> listus...@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/26116.php
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ___
>> >>> 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/26118.php
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >> ___
>> >> 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/26124.php
>> >
>> > ___
>> > 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/26126.php
>>
>>
>> --
>> Jeff Squyres
>> jsquy...@cisco.com
>> For corporate legal information go to:
>> http://www.cisco.com/web/about/doing_business/legal/cri/
>>
>>
>> ___
>> users mailing list
>> us...@open-mpi.org
>> Subscription: http://www.open

Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread George Bosilca
Diego,

Please find below the corrected example. There were several issues but the
most important one, which is certainly the cause of the segfault, is that
"real(dp)" (with dp = selected_real_kind(p=16)) is NOT equal to
MPI_DOUBLE_RECISION. For double precision you should use 15 (and not 16).

  George.


On Thu, Jan 8, 2015 at 6:08 AM, Jeff Squyres (jsquyres) 
wrote:

>  There were still some minor errors left over in the attached program.
>
> I strongly encourage you to use "use mpi" instead of "include 'mpif.h'"
> because you will get compile time errors when you pass incorrect / forget
> to pass parameters to MPI subroutines.  When I switched your program to
> "use mpi", here's what the compiler showed me:
>
> 1. the name "MPI" is reserved
> 2. need to pass displacements(1:nstruct+1) to mpi_type_create_struct
> 3. need to pass request(1) to mpi_isend
> 4. need to pass request(1) to mpi_wait
> 5. need to pass ierr argument to mpi_wait
>
> 1-4 are technically not correct, but the program would likely (usually)
> compile/run "correctly" anyway.  5 is probably what caused your segv.
>
> Attached is my copy of your program with fixes for the above-mentioned
> issues.
>
> BTW, I missed the beginning of this thread -- I assume that this is an
> artificial use of mpi_type_create_resized for the purposes of a small
> example.  The specific use of it in this program appears to be superfluous.
>
>
>
>
>
> On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet <
> gilles.gouaillar...@iferc.org> wrote:
>
> > Diego,
> >
> > yes, it works for me (at least with the v1.8 head and gnu compilers)
> >
> > Cheers,
> >
> > Gilles
> >
> > On 2015/01/08 17:51, Diego Avesani wrote:
> >> Dear Gilles,
> >> thanks again, however it does not work.
> >>
> >> the program says:  "SIGSEGV, segmentation fault occurred"
> >>
> >> Does the program run in your case?
> >>
> >> Thanks again
> >>
> >>
> >>
> >> Diego
> >>
> >>
> >> On 8 January 2015 at 03:02, Gilles Gouaillardet <
> >>
> >> gilles.gouaillar...@iferc.org
> >> > wrote:
> >>
> >>
> >>>  Diego,
> >>>
> >>> my bad, i should have passed displacements(1) to MPI_Type_create_struct
> >>>
> >>> here is an updated version
> >>>
> >>> (note you have to use a REQUEST integer for MPI_Isend and MPI_Irecv,
> >>> and you also have to call MPI_Wait to ensure the requests complete)
> >>>
> >>> Cheers,
> >>>
> >>> Gilles
> >>>
> >>>
> >>> On 2015/01/08 8:23, Diego Avesani wrote:
> >>>
> >>> Dear Gilles, Dear all,
> >>>
> >>> I'm sorry to bother you again, but I have some problem with send and
> >>> receive the struct_data.
> >>>
> >>> I tried to send a MPI_Type_Create_Struct but I get a segmentation fault
> >>> occurred and I do not know why. The program is very simple, it is the
> old
> >>> one with the isend and irecv subroutines
> >>>
> >>> (you can find it in the attachment)
> >>>
> >>> Thanks again
> >>>
> >>>
> >>> Diego
> >>>
> >>>
> >>> On 5 January 2015 at 15:54, Diego Avesani
> >>>  
> >>>  wrote:
> >>>
> >>>
> >>>  Dear Gilles,
> >>>
> >>> Thanks, Thanks a lot.
> >>> Now is more clear.
> >>>
> >>> Again, thanks a lot
> >>>
> >>> Diego
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ___
> >>> users mailing
> >>> listus...@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/26116.php
> >>>
> >>>
> >>>
> >>>
> >>> ___
> >>> 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/26118.php
> >>>
> >>>
> >>>
> >>
> >>
> >> ___
> >> 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/26124.php
> >
> > ___
> > 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/26126.php
>
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> ___
> 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/26127.php
>


test_struct_test_isend.f90
Description: Binary data


Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-08 Thread Jeff Squyres (jsquyres)
There were still some minor errors left over in the attached program.

I strongly encourage you to use "use mpi" instead of "include 'mpif.h'" because 
you will get compile time errors when you pass incorrect / forget to pass 
parameters to MPI subroutines.  When I switched your program to "use mpi", 
here's what the compiler showed me:

1. the name "MPI" is reserved
2. need to pass displacements(1:nstruct+1) to mpi_type_create_struct
3. need to pass request(1) to mpi_isend
4. need to pass request(1) to mpi_wait
5. need to pass ierr argument to mpi_wait

1-4 are technically not correct, but the program would likely (usually) 
compile/run "correctly" anyway.  5 is probably what caused your segv.

Attached is my copy of your program with fixes for the above-mentioned issues.

BTW, I missed the beginning of this thread -- I assume that this is an 
artificial use of mpi_type_create_resized for the purposes of a small example.  
The specific use of it in this program appears to be superfluous.





On Jan 8, 2015, at 4:26 AM, Gilles Gouaillardet  
wrote:

> Diego,
>
> yes, it works for me (at least with the v1.8 head and gnu compilers)
>
> Cheers,
>
> Gilles
>
> On 2015/01/08 17:51, Diego Avesani wrote:
>> Dear Gilles,
>> thanks again, however it does not work.
>>
>> the program says:  "SIGSEGV, segmentation fault occurred"
>>
>> Does the program run in your case?
>>
>> Thanks again
>>
>>
>>
>> Diego
>>
>>
>> On 8 January 2015 at 03:02, Gilles Gouaillardet <
>>
>> gilles.gouaillar...@iferc.org
>> > wrote:
>>
>>
>>>  Diego,
>>>
>>> my bad, i should have passed displacements(1) to MPI_Type_create_struct
>>>
>>> here is an updated version
>>>
>>> (note you have to use a REQUEST integer for MPI_Isend and MPI_Irecv,
>>> and you also have to call MPI_Wait to ensure the requests complete)
>>>
>>> Cheers,
>>>
>>> Gilles
>>>
>>>
>>> On 2015/01/08 8:23, Diego Avesani wrote:
>>>
>>> Dear Gilles, Dear all,
>>>
>>> I'm sorry to bother you again, but I have some problem with send and
>>> receive the struct_data.
>>>
>>> I tried to send a MPI_Type_Create_Struct but I get a segmentation fault
>>> occurred and I do not know why. The program is very simple, it is the old
>>> one with the isend and irecv subroutines
>>>
>>> (you can find it in the attachment)
>>>
>>> Thanks again
>>>
>>>
>>> Diego
>>>
>>>
>>> On 5 January 2015 at 15:54, Diego Avesani
>>>  
>>>  wrote:
>>>
>>>
>>>  Dear Gilles,
>>>
>>> Thanks, Thanks a lot.
>>> Now is more clear.
>>>
>>> Again, thanks a lot
>>>
>>> Diego
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> users mailing
>>> listus...@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/26116.php
>>>
>>>
>>>
>>>
>>> ___
>>> 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/26118.php
>>>
>>>
>>>
>>
>>
>> ___
>> 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/26124.php
>
> ___
> 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/26126.php


--
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



test_struct_test_isend.f90
Description: test_struct_test_isend.f90


Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-02 Thread Gustavo Correa
Besides Gilles suggestions, wouldn't this:

>   TYPE tParticle
>  INTEGER  :: ip
INTEGER :: dummy
DOUBLE PRECISION :: RP(2)
DOUBLE PRECISION :: QQ(2)
> 
>   ENDTYPE tParticle


(instead of making RP and QQ real) 
match better your declarations of (MPI) TYPES() further down,
and hopefully have a better chance of correct memory alignment and type 
consistency?
Relying on specific compiler or compiler flags (e.g. -r8,  -align) is tricky 
(and not portable).

I hope this helps,
Gus Correa

On Jan 2, 2015, at 6:51 AM, Gilles Gouaillardet wrote:

> Diego,
> 
> First, i recommend you redefine tParticle and add a padding integer so 
> everything is aligned.
> 
> 
> Before invoking MPI_Type_create_struct, you need to 
> call MPI_Get_address(dummy, base, MPI%err)
> displacements = displacements - base
> 
> MPI_Type_create_resized might be unnecessary if tParticle is aligned 
> And the lower bound should be zero.
> 
> BTW, which compiler are you using ?
> Is tParticle object a common ?
> iirc, intel compiler aligns types automatically, but not commons, and that 
> means MPI_Type_create_struct is not aligned as it should most of the time.
> 
> Cheers,
> 
> Gilles 
> 
> Diego Avesani さんのメール:
> dear all,
> 
> I have a problem with MPI_Type_Create_Struct and MPI_TYPE_CREATE_RESIZED.
> 
> I have this variable type:
> 
>   TYPE tParticle
>  INTEGER  :: ip
>  REAL :: RP(2)
>  REAL :: QQ(2)
>   ENDTYPE tParticle
> 
> Then I define:
> 
> Nstruct=3
> ALLOCATE(TYPES(Nstruct))
> ALLOCATE(LENGTHS(Nstruct))
> ALLOCATE(DISPLACEMENTS(Nstruct))
> !set the types
> TYPES(1) = MPI_INTEGER
> TYPES(2) = MPI_DOUBLE_PRECISION
> TYPES(3) = MPI_DOUBLE_PRECISION
> !set the lengths
> LENGTHS(1) = 1
> LENGTHS(2) = 2
> LENGTHS(3) = 2
> 
> As gently suggested by Nick Papior Andersen and George Bosilca some months 
> ago, I checked the variable adress to resize my struct variable to avoid 
> empty space and
> to have a more general definition.
> 
>  !
>  CALL MPI_GET_ADDRESS(dummy%ip,DISPLACEMENTS(1), MPI%iErr)
>  CALL MPI_GET_ADDRESS(dummy%RP(1), DISPLACEMENTS(2), MPI%iErr)
>  CALL MPI_GET_ADDRESS(dummy%QQ(1), DISPLACEMENTS(3), MPI%iErr)
>  !
>  CALL 
> MPI_Type_Create_Struct(Nstruct,LENGTHS,DISPLACEMENTS,TYPES,MPI_PARTICLE_TYPE_OLD,MPI%iErr)
>  CALL MPI_Type_Commit(MPI_PARTICLE_TYPE_OLD,MPI%iErr)
>  !
>  CALL MPI_TYPE_CREATE_RESIZED(MPI_PARTICLE_TYPE_OLD, 
> DISPLACEMENTS(1),DISPLACEMENTS(2) - DISPLACEMENTS(1), MPI_PARTICLE_TYPE)
> 
> 
> This does not work. When my program run, I get an error:
> 
> forrtl: severe (174): SIGSEGV, segmentation fault occurred.
> 
> I have read the manual but probably I am not able to understand  
> MPI_TYPE_CREATE_RESIZED. 
> 
> Someone could help me?
>   
>
> Thanks a lot
> Diego
> 
> 
> 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/26092.php



Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-02 Thread Diego Avesani
Dear Gilles Dear all,

I have done all that to avoid to pedding an integer, as suggested by George.
I define tParticle as a common object.
I am using Intel fortran compiler.

George suggests:

*"" The displacements are relative to the benign of your particle type.
Thus the first one is not 0 but the displacement of “integer :: ip” due to
the fact that the compiler is allowed to introduce gaps in order to better
align.*

*  DISPLACEMENTS(1)=MPI_GET_ADDRESS(dummy%ip)*
*  DISPLACEMENTS(2)=**MPI_GET_ADDRESS(dummy%RP[1])*

*  DISPLACEMENTS(3)=**MPI_GET_ADDRESS(dummy%QQ[1])*

*and then remove the MPI_GET_ADDRESS(dummy) from all of them.*

*3. After creating the structure type you need to resize it in order to
correctly determine the span of the entire structure, and how an array of
such structures lays in memory. Something like:*
*MPI_TYPE_CREATE_RESIZED(old type, DISPLACEMENT(1),*
*   MPI_GET_ADDRESS(dummy[2]) - MPI_GET_ADDRESS(dummy[1]), newt) ""*

What do you think?
George, Did i miss something?

Thanks a lot



Diego


On 2 January 2015 at 12:51, Gilles Gouaillardet <
gilles.gouaillar...@gmail.com> wrote:

> Diego,
>
> First, i recommend you redefine tParticle and add a padding integer so
> everything is aligned.
>
>
> Before invoking MPI_Type_create_struct, you need to
> call MPI_Get_address(dummy, base, MPI%err)
> displacements = displacements - base
>
> MPI_Type_create_resized might be unnecessary if tParticle is aligned
> And the lower bound should be zero.
>
> BTW, which compiler are you using ?
> Is tParticle object a common ?
> iirc, intel compiler aligns types automatically, but not commons, and that
> means MPI_Type_create_struct is not aligned as it should most of the time.
>
> Cheers,
>
> Gilles
>
> Diego Avesani さんのメール:
>
> dear all,
>
> I have a problem with MPI_Type_Create_Struct and MPI_TYPE_CREATE_RESIZED.
>
> I have this variable type:
>
> *  TYPE tParticle*
> * INTEGER  :: ip*
> * REAL :: RP(2)*
> * REAL :: QQ(2)*
> *  ENDTYPE tParticle*
>
> Then I define:
>
> Nstruct=3
> *ALLOCATE(TYPES(Nstruct))*
> *ALLOCATE(LENGTHS(Nstruct))*
> *ALLOCATE(DISPLACEMENTS(Nstruct))*
> *!set the types*
> *TYPES(1) = MPI_INTEGER*
> *TYPES(2) = MPI_DOUBLE_PRECISION*
> *TYPES(3) = MPI_DOUBLE_PRECISION*
> *!set the lengths*
> *LENGTHS(1) = 1*
> *LENGTHS(2) = 2*
> *LENGTHS(3) = 2*
>
> As gently suggested by Nick Papior Andersen and George Bosilca some months
> ago, I checked the variable adress to resize my struct variable to avoid
> empty space and
> to have a more general definition.
>
> * !*
> * CALL MPI_GET_ADDRESS(dummy%ip,DISPLACEMENTS(1), MPI%iErr)*
> * CALL MPI_GET_ADDRESS(dummy%RP(1), DISPLACEMENTS(2), MPI%iErr)*
> * CALL MPI_GET_ADDRESS(dummy%QQ(1), DISPLACEMENTS(3), MPI%iErr)*
> * !*
> * CALL
> MPI_Type_Create_Struct(Nstruct,LENGTHS,DISPLACEMENTS,TYPES,MPI_PARTICLE_TYPE_OLD,MPI%iErr)*
> * CALL MPI_Type_Commit(MPI_PARTICLE_TYPE_OLD,MPI%iErr)*
> * !*
> * CALL MPI_TYPE_CREATE_RESIZED(MPI_PARTICLE_TYPE_OLD,
> DISPLACEMENTS(1),DISPLACEMENTS(2) - DISPLACEMENTS(1), MPI_PARTICLE_TYPE)*
>
>
> This does not work. When my program run, I get an error:
>
> *forrtl: severe (174): SIGSEGV, segmentation fault occurred.*
>
> I have read the manual but probably I am not able to understand
> *MPI_TYPE_CREATE_RESIZED. *
>
> Someone could help me?
>
>
> Thanks a lot
> Diego
>
>
> 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/26092.php
>


Re: [OMPI users] MPI_Type_Create_Struct + MPI_TYPE_CREATE_RESIZED

2015-01-02 Thread Gilles Gouaillardet
Diego,

First, i recommend you redefine tParticle and add a padding integer so 
everything is aligned.


Before invoking MPI_Type_create_struct, you need to 
call MPI_Get_address(dummy, base, MPI%err)
displacements = displacements - base

MPI_Type_create_resized might be unnecessary if tParticle is aligned 
And the lower bound should be zero.

BTW, which compiler are you using ?
Is tParticle object a common ?
iirc, intel compiler aligns types automatically, but not commons, and that 
means MPI_Type_create_struct is not aligned as it should most of the time.

Cheers,

Gilles 

Diego Avesani さんのメール:
>dear all,
>
>
>I have a problem with MPI_Type_Create_Struct and MPI_TYPE_CREATE_RESIZED.
>
>
>I have this variable type:
>
>
>  TYPE tParticle
>
>     INTEGER  :: ip
>
>     REAL     :: RP(2)
>
>     REAL     :: QQ(2)
>
>  ENDTYPE tParticle
>
>
>Then I define:
>
>
>Nstruct=3
>
>ALLOCATE(TYPES(Nstruct))
>
>ALLOCATE(LENGTHS(Nstruct))
>
>ALLOCATE(DISPLACEMENTS(Nstruct))
>
>!set the types
>
>TYPES(1) = MPI_INTEGER
>
>TYPES(2) = MPI_DOUBLE_PRECISION
>
>TYPES(3) = MPI_DOUBLE_PRECISION
>
>!set the lengths
>
>LENGTHS(1) = 1
>
>LENGTHS(2) = 2
>
>LENGTHS(3) = 2
>
>
>As gently suggested by Nick Papior Andersen and George Bosilca some months 
>ago, I checked the variable adress to resize my struct variable to avoid empty 
>space and
>
>to have a more general definition.
>
>
> !
>
> CALL MPI_GET_ADDRESS(dummy%ip,    DISPLACEMENTS(1), MPI%iErr)
>
> CALL MPI_GET_ADDRESS(dummy%RP(1), DISPLACEMENTS(2), MPI%iErr)
>
> CALL MPI_GET_ADDRESS(dummy%QQ(1), DISPLACEMENTS(3), MPI%iErr)
>
> !
>
> CALL 
>MPI_Type_Create_Struct(Nstruct,LENGTHS,DISPLACEMENTS,TYPES,MPI_PARTICLE_TYPE_OLD,MPI%iErr)
>
> CALL MPI_Type_Commit(MPI_PARTICLE_TYPE_OLD,MPI%iErr)
>
> !
>
> CALL MPI_TYPE_CREATE_RESIZED(MPI_PARTICLE_TYPE_OLD, 
>DISPLACEMENTS(1),DISPLACEMENTS(2) - DISPLACEMENTS(1), MPI_PARTICLE_TYPE)
>
>
>
>This does not work. When my program run, I get an error:
>
>
>forrtl: severe (174): SIGSEGV, segmentation fault occurred.
>
>
>I have read the manual but probably I am not able to understand  
>MPI_TYPE_CREATE_RESIZED. 
>
>
>Someone could help me?
>
>                                                                               
>                                                              
>
>Thanks a lot
>
>Diego
>
>
>
>Diego
>