99 * University of Stuttgart. All rights reserved.
1010 * Copyright (c) 2004-2005 The Regents of the University of California.
1111 * All rights reserved.
12- * Copyright (c) 2007-2021 Cisco Systems, Inc. All rights reserved
12+ * Copyright (c) 2007-2022 Cisco Systems, Inc. All rights reserved
1313 * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
1414 * Copyright (c) 2009-2012 Oak Rigde National Laboratory. All rights reserved.
1515 * Copyright (c) 2011-2020 Sandia National Laboratories. All rights reserved.
@@ -532,6 +532,11 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
532532
533533/*
534534 * Miscellaneous constants
535+ *
536+ * NOTE: Many of the integer constants below *also* appear in
537+ * ompi/include/mpif-values.pl. If you change any of these integer
538+ * values below, make sure to also change the corresponding values in
539+ * mpif-values.pl.
535540 */
536541#define MPI_ANY_SOURCE -1 /* match any source rank */
537542#define MPI_PROC_NULL -2 /* rank of null process */
@@ -572,9 +577,13 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
572577
573578/*
574579 * Constants for C code to access elements in Fortran MPI status array.
580+ *
581+ * NOTE: The MPI_F_SOURCE, MPI_F_TAG, MPI_F_ERROR are intentionally 1
582+ * smaller than their Fortran equivalents in mpif-values.pl (because C
583+ * is 0-indexed and Fortran is 1-indexed).
575584 */
576585#define MPI_F_STATUS_SIZE OMPI_FORTRAN_STATUS_SIZE /* Size of Fortran MPI status array */
577- #define MPI_F_SOURCE 0 /* Index for MPI_SOURCE */
586+ #define MPI_F_SOURCE 0 /* Index for MPI_SOURCE */
578587#define MPI_F_TAG 1 /* Index for MPI_TAG */
579588#define MPI_F_ERROR 2 /* Index for MPI_ERROR */
580589
@@ -626,7 +635,8 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
626635 * Predefined attribute keyvals
627636 *
628637 * DO NOT CHANGE THE ORDER WITHOUT ALSO CHANGING THE ORDER IN
629- * src/attribute/attribute_predefined.c and mpif.h.in.
638+ * ompi/attribute/attribute_predefined.c and mpif-constants.h (which
639+ * is included by mpif.h.in).
630640 */
631641enum {
632642 /* MPI-1 */
@@ -744,7 +754,8 @@ enum {
744754/*
745755 * Comparison results. Don't change the order of these, the group
746756 * comparison functions rely on it.
747- * Do not change the order of these without also modifying mpif.h.in.
757+ * Do not change the order of these without also modifying
758+ * mpif-values.pl.
748759 */
749760enum {
750761 MPI_IDENT ,
@@ -755,7 +766,8 @@ enum {
755766
756767/*
757768 * MPI_Init_thread constants
758- * Do not change the order of these without also modifying mpif.h.in.
769+ * Do not change the order of these without also modifying
770+ * mpif-values.pl.
759771 */
760772enum {
761773 MPI_THREAD_SINGLE ,
@@ -766,8 +778,8 @@ enum {
766778
767779/*
768780 * Datatype combiners.
769- * Do not change the order of these without also modifying mpif.h.in.
770- * (see also mpif-common.h.fin) .
781+ * Do not change the order of these without also modifying
782+ * mpif-values.pl .
771783 */
772784enum {
773785 MPI_COMBINER_NAMED ,
@@ -818,8 +830,8 @@ enum {
818830
819831/*
820832 * Communicator split type constants.
821- * Do not change the order of these without also modifying mpif.h.in
822- * (see also mpif-common.h.fin) .
833+ * Do not change the order of these without also modifying
834+ * mpif-values.pl .
823835 */
824836enum {
825837 MPI_COMM_TYPE_SHARED ,
@@ -1478,7 +1490,7 @@ OMPI_DECLSPEC int MPI_Comm_disconnect(MPI_Comm *comm);
14781490OMPI_DECLSPEC int MPI_Comm_dup (MPI_Comm comm , MPI_Comm * newcomm );
14791491OMPI_DECLSPEC int MPI_Comm_idup (MPI_Comm comm , MPI_Comm * newcomm , MPI_Request * request );
14801492OMPI_DECLSPEC int MPI_Comm_dup_with_info (MPI_Comm comm , MPI_Info info , MPI_Comm * newcomm );
1481- OMPI_DECLSPEC int MPI_Comm_idup_with_info (MPI_Comm comm , MPI_Info info , MPI_Comm * newcomm ,
1493+ OMPI_DECLSPEC int MPI_Comm_idup_with_info (MPI_Comm comm , MPI_Info info , MPI_Comm * newcomm ,
14821494 MPI_Request * request );
14831495OMPI_DECLSPEC MPI_Comm MPI_Comm_f2c (MPI_Fint comm );
14841496OMPI_DECLSPEC int MPI_Comm_free_keyval (int * comm_keyval );
@@ -2258,7 +2270,7 @@ OMPI_DECLSPEC int PMPI_Comm_disconnect(MPI_Comm *comm);
22582270OMPI_DECLSPEC int PMPI_Comm_dup (MPI_Comm comm , MPI_Comm * newcomm );
22592271OMPI_DECLSPEC int PMPI_Comm_idup (MPI_Comm comm , MPI_Comm * newcomm , MPI_Request * request );
22602272OMPI_DECLSPEC int PMPI_Comm_dup_with_info (MPI_Comm comm , MPI_Info info , MPI_Comm * newcomm );
2261- OMPI_DECLSPEC int PMPI_Comm_idup_with_info (MPI_Comm comm , MPI_Info info , MPI_Comm * newcomm ,
2273+ OMPI_DECLSPEC int PMPI_Comm_idup_with_info (MPI_Comm comm , MPI_Info info , MPI_Comm * newcomm ,
22622274 MPI_Request * request );
22632275OMPI_DECLSPEC MPI_Comm PMPI_Comm_f2c (MPI_Fint comm );
22642276OMPI_DECLSPEC int PMPI_Comm_free_keyval (int * comm_keyval );
0 commit comments