Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Mixing the FORTRAN and C APIs.
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-05-07 17:04:34

On May 7, 2011, at 5:01 PM, Jeff Squyres wrote:

> example, if you have to pass an MPI datatype down to PARPACK, you'd actually need to pass MPI_Type_f2c(MPI_INTEGER), or MPI_Type_f2c(MPI_DOUBLE_PRECISION).

Blarg -- I got these backwards. I should have said:


Because the MPI_INTEGER and MPI_DOUBLE_PRECISION handles you're using are C handles, and you need to translate them to the equivalent Fortran handles (i.e., the integer handle values you see in mpif.h.). Try it -- cout the return value from MPI_Type_c2f(MPI_INTEGER) and it should match the value you see in mpif.h.

Jeff Squyres
For corporate legal information go to: