On Jul 27, 2010, at 4:19 PM, Gus Correa wrote:

> Is there a simple way to check the number of bytes associated to each
> MPI basic type of OpenMPI on a specific machine (or machine+compiler)?
> 
> Something that would come out easily, say, from ompi_info?

Not via ompi_info, but the MPI function MPI_GET_EXTENT will tell you the 
datatype's size.

-----
[4:54] svbu-mpi:~/mpi % cat extent.f90
      program main
      use mpi
      implicit none
      integer ierr, ext

      call MPI_INIT(ierr)
      call MPI_TYPE_EXTENT(MPI_DOUBLE_PRECISION, ext, ierr)
      print *, 'Type extent of DOUBLE_PREC is', ext
      call MPI_FINALIZE(ierr)

      end
[4:54] svbu-mpi:~/mpi % mpif90 extent.f90 -o extent -g
[4:54] svbu-mpi:~/mpi % ./extent
 Type extent of DOUBLE_PREC is           8
[4:54] svbu-mpi:~/mpi % 
-----

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


Reply via email to