Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Prototypes for Fortran MPI_ commands using 64-bit indexing
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-10-30 17:49:20

On Oct 30, 2013, at 4:35 PM, Jim Parker <jimparker96313_at_[hidden]> wrote:

> I have recently built a cluster that uses the 64-bit indexing feature of OpenMPI following the directions at

That should be correct (i.e., passing -i8 in FFLAGS and FCFLAGS for OMPI 1.6.x).

> My question is what are the new prototypes for the MPI calls ?
> specifically
> MPI_Allgathterv

They're the same as they've always been.

The magic is that the -i8 flag tells the compiler "make all Fortran INTEGERs be 8 bytes, not (the default) 4." So Ralph's answer was correct in that all the MPI parameters are INTEGERs -- but you can tell the compiler that all INTEGERs are 8 bytes, not 4, and therefore get "large" integers.

Note that this means that you need to compile your application with -i8, too. That will make *your* INTEGERs also be 8 bytes, and then you'll match what Open MPI is doing.

> I'm curious because some off my local variables get killed (set to null) upon my first call to MPI_RECV. Typically, this is due (in Fortran) to someone not setting the 'status' variable to an appropriate array size.

If you didn't compile your application with -i8, this could well be because your application is treating INTEGERs as 4 bytes, but OMPI is treating INTEGERs as 8 bytes. Nothing good can come from that.

If you *did* compile your application with -i8 and you're seeing this kind of wonkyness, we should dig deeper and see what's going on.

> My review of mpif.h and mpi.h seem to indicate that the functions are defined as C int types and therefore , I assume, the coercion during the compile makes the library support 64-bit indexing. ie. int -> long int

FWIW: We actually define a type MPI_Fint; its actual type is determined by configure (int or long int, IIRC). When your Fortran code calls C, we use the MPI_Fint type for parameters, and so it will be either a 4 or 8 byte integer type.

Jeff Squyres
For corporate legal information go to: