Skip to content

v4.1.x: Add Missing MPI_F_XXX C constants #10530 #10534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions ompi/include/mpi.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2020 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2007-2022 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009-2012 Oak Rigde National Laboratory. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
Expand Down Expand Up @@ -493,6 +493,11 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn

/*
* Miscellaneous constants
*
* NOTE: Many of the integer constants below *also* appear in
* ompi/include/mpif-values.pl. If you change any of these integer
* values below, make sure to also change the corresponding values in
* mpif-values.pl.
*/
#define MPI_ANY_SOURCE -1 /* match any source rank */
#define MPI_PROC_NULL -2 /* rank of null process */
Expand Down Expand Up @@ -529,6 +534,18 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
#define MPI_DISTRIBUTE_NONE 2 /* not distributed */
#define MPI_DISTRIBUTE_DFLT_DARG (-1) /* default distribution arg */

/*
* Constants for C code to access elements in Fortran MPI status array.
*
* NOTE: The MPI_F_SOURCE, MPI_F_TAG, MPI_F_ERROR are intentionally 1
* smaller than their Fortran equivalents in mpif-values.pl (because C
* is 0-indexed and Fortran is 1-indexed).
*/
#define MPI_F_STATUS_SIZE OMPI_FORTRAN_STATUS_SIZE /* Size of Fortran MPI status array */
#define MPI_F_SOURCE 0 /* Index for MPI_SOURCE */
#define MPI_F_TAG 1 /* Index for MPI_TAG */
#define MPI_F_ERROR 2 /* Index for MPI_ERROR */

/*
* Since these values are arbitrary to Open MPI, we might as well make
* them the same as ROMIO for ease of mapping. These values taken
Expand Down Expand Up @@ -577,7 +594,8 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
* Predefined attribute keyvals
*
* DO NOT CHANGE THE ORDER WITHOUT ALSO CHANGING THE ORDER IN
* src/attribute/attribute_predefined.c and mpif.h.in.
* ompi/attribute/attribute_predefined.c and mpif-constants.h (which
* is included by mpif.h.in).
*/
enum {
/* MPI-1 */
Expand Down Expand Up @@ -691,7 +709,8 @@ enum {
/*
* Comparison results. Don't change the order of these, the group
* comparison functions rely on it.
* Do not change the order of these without also modifying mpif.h.in.
* Do not change the order of these without also modifying
* mpif-values.pl.
*/
enum {
MPI_IDENT,
Expand All @@ -702,7 +721,8 @@ enum {

/*
* MPI_Init_thread constants
* Do not change the order of these without also modifying mpif.h.in.
* Do not change the order of these without also modifying
* mpif-values.pl.
*/
enum {
MPI_THREAD_SINGLE,
Expand All @@ -713,8 +733,8 @@ enum {

/*
* Datatype combiners.
* Do not change the order of these without also modifying mpif.h.in.
* (see also mpif-common.h.fin).
* Do not change the order of these without also modifying
* mpif-values.pl.
*/
enum {
MPI_COMBINER_NAMED,
Expand Down Expand Up @@ -766,8 +786,8 @@ enum {

/*
* Communicator split type constants.
* Do not change the order of these without also modifying mpif.h.in
* (see also mpif-common.h.fin).
* Do not change the order of these without also modifying
* mpif-values.pl.
*/
enum {
MPI_COMM_TYPE_SHARED,
Expand Down