Skip to Content.
Sympa Menu

charm - Re: [charm] MPI namespace sanctity and AMPI extensions

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] MPI namespace sanctity and AMPI extensions


Chronological Thread 
  • From: Sam White <white67 AT illinois.edu>
  • To: Jeff Hammond <jeff.science AT gmail.com>
  • Cc: "charm AT cs.illinois.edu" <charm AT cs.illinois.edu>
  • Subject: Re: [charm] MPI namespace sanctity and AMPI extensions
  • Date: Tue, 12 Jan 2016 17:35:11 -0600

Thanks for drawing our attention to the Fortran argument parsing case. We have discussed switching to use the 'AMPI_' prefix for AMPI's extensions to the MPI standards for some time, and it is time that we go ahead with it. We can also use this as an opportunity to fix our own inconsistent naming conventions to match MPI's when it comes to the rest of the function names (as in MPI_Setmigratable and MPI_MigrateTo).

-Sam

On Tue, Jan 12, 2016 at 4:55 PM, Jeff Hammond <jeff.science AT gmail.com> wrote:
http://charm.cs.illinois.edu/manuals/html/ampi/manual.html lists a number of extensions to MPI that are implemented in AMPI.

MPI_Migrate        MPI_Checkpoint     MPI_MemCheckpoint  MPI_Register
MPI_MigrateTo      MPI_Register_main  MPI_Setmigratable  MPI_Get_userdata
MPI_Start_measure  MPI_Stop_measure   MPI_Just_migrated  MPI_About_to_migrate
MPI_My_pe          MPI_My_node        MPI_Num_pes        MPI_Num_nodes
MPI_Set_load       MPI_Command_argument_count            MPI_Get_command_argument

From MPI 3.1 2.6.3:

"All MPI names have an MPI_ prefix, defined constants are in all capital letters, and defined types and functions have one capital letter after the prefix. Programs must not declare names (identifiers), e.g., for variables, functions, constants, types, or macros, beginning with any prefix of the form MPI_, where any of the letters are either upper or lower case. To support the profiling interface, programs must not declare functions with names beginning with any prefix of the form PMPI_, where any of the letters are either upper or lower case."

This text is slightly stronger in MPI-3 than in older versions, but the intent has always been the same.

Normally, this point is academic.  However, the MPI Forum has debated adding two functions with the same names as AMPI extensions (https://github.com/jeffhammond/miscellaneous-mpi-issues/issues/2 - note that this location is temporary and may falsely suggest it is a pet project of mine; migrating from Trac - e.g. https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/351 - has been a lot of work for some of us).  While the syntax and semantics may end up being the same, since they should match Fortran 2008, if they are not, it's going to be a major headache for users.  While this ticket may not ever pass, it demonstrates the real possibility of problems caused by using the MPI_ namespace.

Currently, MPICH uses MPIX_ for extensions, while Open-MPI uses OMPI_.  I would encourage the AMPI_ namespace to avoid conflicts with those, although the MPI standard is silent on this topic.

This is low priority and I'll submit a patch at some point if it is below the ZBB line for you all, assuming you are amenable to making the change.

Best,




Archive powered by MHonArc 2.6.16.

Top of Page