I would never compile a fortran program relying on a specific compiler
option! I would never use r8/i8!
I would highly encourage you to explicitly set the precision of each
variable if you need specific variable precision. There are plenty of
tutorials around for this (selected_real/int_kind).

Secondly, the warning of mis-alignment is due to the data type not being a
multiple of 8. You can pad it with additional bytes to reach a multiple of
8 (in this case add a fake integer, or character(len=4)).
I do not know if sequence is needed for the mpi data type (I guess it is
needed when dealing with arrays of types, but again, I am not fully sure
about this...).

A couple of options:
1) I think sequence should work if you pad it to align with 8 bytes.
2) add code that is directive specified against the compiler to tell the
exact alignment of the data type
3) Your compilation of -r8 -i8 does probably not work due to the integer
being long, and hence your data type of MPI_INTEGER (you did not tell us
whether you corrected this)




2014-10-03 11:07 GMT+00:00 Diego Avesani <diego.aves...@gmail.com>:

> Dears,
> First of all. Really really thanks for you help, I am learning a lot.
> Second:
> I try to study the MPI_TYPE_CREATE_STRUCT and all the things look correct.
>
> I use Intel Fortran compiler and when I compile with -r8 means that I am
> compiling in double precision.
>
> About Nick suggestion:
> Coding
>
>   TYPE tParticle
>     SEQUENCE
>     INTEGER :: ip
>     REAL    :: RP(2)
>     REAL    :: QQ(4)
>   END TYPE tParticle
>
>
> if I compile with
> mpif90 -r8  *.f90
>
> I get the following error:
> warning #6379: The structure contains one or more misaligned fields.
> [TPARTICLE] TYPE tParticle
>
>
> I can only compile as:
> mpif90 -r8 -i8 *.f90
>
> But I get the same error:
>
> An error occurred in MPI_Cart_create
> [diedroLap:12267] *** reported by process [139817172008961,139814070386689]
> [diedroLap:12267] *** on communicator MPI_COMM_WORLD
> [diedroLap:12267] *** MPI_ERR_OTHER: known error not in list
> [diedroLap:12267] *** MPI_ERRORS_ARE_FATAL (processes in this communicator
> will now abort,
> [diedroLap:12267] ***    and potentially your MPI job)
>
>
>
> What I can do?
> Thanks a lot
>
>
>
> On 3 October 2014 08:15, Nick Papior Andersen <nickpap...@gmail.com>
> wrote:
>
>> sequence
>
>
>
>
> 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/2014/10/25434.php
>



-- 
Kind regards Nick

Reply via email to