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
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
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
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
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,
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
>
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).
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?
>
>
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
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
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
Dear Gilles,
Thanks, Thanks a lot.
Now is more clear.
Again, thanks a lot
Diego
Diego,
The compiler likely added some padding after %ip to have data aligned on 128
bits.
You need two dummies in case the compiler adds some padding at the end of the
type.
Cheers,
Gilles
Diego Avesani さんのメール:
>Dear Gilles, Dear all,
>
>thanks, thanks a lot.
>
>
Dear Gilles, Dear all,
thanks, thanks a lot.
Could you explain it to me, please?
I mean, when I print displacements I get:
displacements(0)= 6922656
displacements(1)= 0
displacements(2)= 16
displacements(3)= 48
displacements(4)= 112
Why do I have 16 spaces in displacements(2), I have only an
Diego,
MPI_Get_address was invoked with parameters in the wrong order
here is attached a fixed version
Cheers,
Gilles
On 2015/01/05 2:32, Diego Avesani wrote:
> Dear Gilles, Dear all,
>
> It works. The only thing that is missed is:
>
> *CALL MPI_Finalize(MPI%iErr)*
>
> at the end of the
Dear Gilles, Dear all,
It works. The only thing that is missed is:
*CALL MPI_Finalize(MPI%iErr)*
at the end of the program.
Now, I have to test it sending some data from a processor to another.
I would like to ask you if you could explain me what you have done.
I wrote in the program:
*
Diego,
here is an updated revision i will double check tomorrow
/* i dit not test it yet, so forgive me it it does not compile/work */
Cheers,
Gilles
On Sun, Jan 4, 2015 at 6:48 PM, Diego Avesani
wrote:
> Dear Gilles, Dear all,
>
> in the attachment you can find the
Dear Gilles, Dear all,
in the attachment you can find the program.
What do you meam "remove mpi_get_address(dummy) from all displacements".
Thanks for all your help
Diego
Diego
On 3 January 2015 at 00:45, Gilles Gouaillardet <
gilles.gouaillar...@gmail.com> wrote:
> Diego,
>
> George
Diego,
George gave you the solution,
The snippet you posted has two mistakes
You did not remove mpi_get_address(dummy) from all displacements
(See my previous reply)
You pass incorrect values to mpi_type_create_resized
Can you post a trimmed version of your program instead of a snippet ?
Gus
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()
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
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
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))*
23 matches
Mail list logo