On Jul 28, 2010, at 5:07 PM, Gus Correa wrote:
> Still, the alignment under Intel may or may not be right.
> And this may or may not explain the errors that Hugo has got.
> FYI, the ompi_info from my OpenMPI 1.3.2 and 1.2.8
> report exactly the same as OpenMPI 1.4.2, namely
> Fort dbl prec size: 4 and
> Fort dbl prec align: 4,
> except that *if the Intel Fortran compiler (ifort) was used*
> I get 1 byte alignment:
> Fort dbl prec align: 1
> So, this issue has been around for a while,
> and involves both the size and the alignment (in Intel)
> of double precision.
Yes, it's quite problematic to try to determine the alignment of Fortran types -- compilers can do different things and there's no reliable way (that I know of, at least) to absolutely get the "native" alignment.
That being said, we didn't previously find any correctness issues with using an alignment of 1.
> We have a number of pieces of code here where grep shows
> Not sure how much of it has actually been active, as there are always
> lots of cpp directives to select active code.
> In particular I found this interesting snippet:
> if (MPI_DOUBLE_PRECISION==20 .and. MPI_REAL8==18) then
> ! LAM MPI defined MPI_REAL8 differently from MPI_DOUBLE_PRECISION
> ! and LAM MPI's allreduce does not accept on MPI_REAL8
> MPIreal_t = MPI_DOUBLE_PRECISION
> MPIreal_t = MPI_REAL8
This kind of thing shouldn't be an issue with Open MPI, right?
FWIW, OMPI uses different numbers for MPI_DOUBLE_PRECISION and MPI_REAL8 than LAM. They're distinct MPI datatypes because they *could* be different.
For corporate legal information go to: