On Wed, Jul 28, 2010 at 01:05:52PM -0700, Martin Siegert wrote: > On Wed, Jul 28, 2010 at 11:19:43AM -0400, Gus Correa wrote: > > Hugo Gagnon wrote: > >> Hi Gus, > >> Ompi_info --all lists its info regarding fortran right after C. In my > >> case: > >> Fort real size: 4 > >> Fort real4 size: 4 > >> Fort real8 size: 8 > >> Fort real16 size: 16 > >> Fort dbl prec size: 4 > >> Does it make any sense to you? > > > > Hi Hugo > > > > No, dbl prec size 4 sounds weird, should be 8, I suppose, > > same as real8, right? > > > > It doesn't make sense, but that's what I have (now that you told me > > that "dbl" , not "double", is the string to search for): > > > > $ Fort dbl prec size: 4 > > Fort dbl cplx size: 4 > > Fort dbl prec align: 4 > > Fort dbl cplx align: 4 > > > > Is this a bug in OpenMPI perhaps? > > > > I didn't come across to this problem, most likely because > > the codes here don't use "double precision" but real*8 or similar. > > > > Also make sure you are picking the right ompi_info, mpif90/f77, mpiexec. > > Often times old versions and tangled PATH make things very confusing. > > This is indeed worrisome as I confirm the findings on our clusters both > with ompi 1.3.3 and 1.4.1: > > ompi_info --all | grep -i fort > ... > Fort real size: 4 > Fort real4 size: 4 > Fort real8 size: 8 > Fort real16 size: -1 > Fort dbl prec size: 4 > Fort cplx size: 4 > Fort dbl cplx size: 4 > Fort cplx8 size: 8 > Fort cplx16 size: 16 > Fort cplx32 size: -1 > Fort integer align: 4 > Fort integer1 align: 1 > Fort integer2 align: 2 > Fort integer4 align: 4 > Fort integer8 align: 8 > Fort integer16 align: -1 > Fort real align: 4 > Fort real4 align: 4 > Fort real8 align: 8 > Fort real16 align: -1 > Fort dbl prec align: 4 > Fort cplx align: 4 > Fort dbl cplx align: 4 > Fort cplx8 align: 4 > Fort cplx16 align: 8 > ... > > And this is the configure output: > checking if Fortran 77 compiler supports REAL*8... yes > checking size of Fortran 77 REAL*8... 8 > checking for C type corresponding to REAL*8... double > checking alignment of Fortran REAL*8... 1 > ... > checking if Fortran 77 compiler supports DOUBLE PRECISION... yes > checking size of Fortran 77 DOUBLE PRECISION... 8 > checking for C type corresponding to DOUBLE PRECISION... double > checking alignment of Fortran DOUBLE PRECISION... 1 > > But the following code actually appears to give the correct results: > > program types > use mpi > implicit none > integer :: mpierr, size > > call MPI_Init(mpierr) > call MPI_Type_size(MPI_DOUBLE_PRECISION, size, mpierr) > print*, 'double precision size: ', size > call MPI_Finalize(mpierr) > end > > mpif90 -g types.f90 > mpiexec -n 1 ./a.out > double precision size: 8 > > Thus is this a bug in ompi_info only?
answering my own question: This does not look right: ompi/tools/ompi_info/param.cc: out("Fort dbl prec size", "compiler:fortran:sizeof:double_precision", OMPI_SIZEOF_FORTRAN_REAL); that should be OMPI_SIZEOF_FORTRAN_DOUBLE_PRECISION. - Martin