Skip to content

Commit 236d964

Browse files
committed
mpi.h.in: update several comments
Add some clarifying comments and update some stale comments. No code or logic changes. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
1 parent 4e5eedd commit 236d964

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

ompi/include/mpi.h.in

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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, too.
535540
*/
536541
#define MPI_ANY_SOURCE -1 /* match any source rank */
537542
#define MPI_PROC_NULL -2 /* rank of null process */
@@ -572,6 +577,10 @@ 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 */
577586
#define MPI_F_SOURCE 0 /* Index for MPI_SOURCE */
@@ -626,7 +635,7 @@ 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.h.in.
630639
*/
631640
enum {
632641
/* MPI-1 */
@@ -744,7 +753,8 @@ enum {
744753
/*
745754
* Comparison results. Don't change the order of these, the group
746755
* comparison functions rely on it.
747-
* Do not change the order of these without also modifying mpif.h.in.
756+
* Do not change the order of these without also modifying
757+
* mpif-values.pl.
748758
*/
749759
enum {
750760
MPI_IDENT,
@@ -755,7 +765,8 @@ enum {
755765

756766
/*
757767
* MPI_Init_thread constants
758-
* Do not change the order of these without also modifying mpif.h.in.
768+
* Do not change the order of these without also modifying
769+
* mpif-values.pl.
759770
*/
760771
enum {
761772
MPI_THREAD_SINGLE,
@@ -766,8 +777,8 @@ enum {
766777

767778
/*
768779
* Datatype combiners.
769-
* Do not change the order of these without also modifying mpif.h.in.
770-
* (see also mpif-common.h.fin).
780+
* Do not change the order of these without also modifying
781+
* mpif-values.pl.
771782
*/
772783
enum {
773784
MPI_COMBINER_NAMED,
@@ -818,8 +829,8 @@ enum {
818829

819830
/*
820831
* 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).
832+
* Do not change the order of these without also modifying
833+
* mpif-values.pl.
823834
*/
824835
enum {
825836
MPI_COMM_TYPE_SHARED,

0 commit comments

Comments
 (0)