Skip to content

Commit 61a66cd

Browse files
jsquyresjjhursey
authored andcommitted
mpi.h.in: update several comments
Add some clarifying comments, update some stale comments, and fix some whitespace. No code or logic changes. Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit d5f871d)
1 parent a5f9fcc commit 61a66cd

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

ompi/include/mpi.h.in

Lines changed: 21 additions & 9 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-2020 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 Sandia National Laboratories. All rights reserved.
@@ -493,6 +493,11 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
493493

494494
/*
495495
* Miscellaneous constants
496+
*
497+
* NOTE: Many of the integer constants below *also* appear in
498+
* ompi/include/mpif-values.pl. If you change any of these integer
499+
* values below, make sure to also change the corresponding values in
500+
* mpif-values.pl.
496501
*/
497502
#define MPI_ANY_SOURCE -1 /* match any source rank */
498503
#define MPI_PROC_NULL -2 /* rank of null process */
@@ -531,9 +536,13 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
531536

532537
/*
533538
* Constants for C code to access elements in Fortran MPI status array.
539+
*
540+
* NOTE: The MPI_F_SOURCE, MPI_F_TAG, MPI_F_ERROR are intentionally 1
541+
* smaller than their Fortran equivalents in mpif-values.pl (because C
542+
* is 0-indexed and Fortran is 1-indexed).
534543
*/
535544
#define MPI_F_STATUS_SIZE OMPI_FORTRAN_STATUS_SIZE /* Size of Fortran MPI status array */
536-
#define MPI_F_SOURCE 0 /* Index for MPI_SOURCE */
545+
#define MPI_F_SOURCE 0 /* Index for MPI_SOURCE */
537546
#define MPI_F_TAG 1 /* Index for MPI_TAG */
538547
#define MPI_F_ERROR 2 /* Index for MPI_ERROR */
539548

@@ -585,7 +594,8 @@ typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn
585594
* Predefined attribute keyvals
586595
*
587596
* DO NOT CHANGE THE ORDER WITHOUT ALSO CHANGING THE ORDER IN
588-
* src/attribute/attribute_predefined.c and mpif.h.in.
597+
* ompi/attribute/attribute_predefined.c and mpif-constants.h (which
598+
* is included by mpif.h.in).
589599
*/
590600
enum {
591601
/* MPI-1 */
@@ -699,7 +709,8 @@ enum {
699709
/*
700710
* Comparison results. Don't change the order of these, the group
701711
* comparison functions rely on it.
702-
* Do not change the order of these without also modifying mpif.h.in.
712+
* Do not change the order of these without also modifying
713+
* mpif-values.pl.
703714
*/
704715
enum {
705716
MPI_IDENT,
@@ -710,7 +721,8 @@ enum {
710721

711722
/*
712723
* MPI_Init_thread constants
713-
* Do not change the order of these without also modifying mpif.h.in.
724+
* Do not change the order of these without also modifying
725+
* mpif-values.pl.
714726
*/
715727
enum {
716728
MPI_THREAD_SINGLE,
@@ -721,8 +733,8 @@ enum {
721733

722734
/*
723735
* Datatype combiners.
724-
* Do not change the order of these without also modifying mpif.h.in.
725-
* (see also mpif-common.h.fin).
736+
* Do not change the order of these without also modifying
737+
* mpif-values.pl.
726738
*/
727739
enum {
728740
MPI_COMBINER_NAMED,
@@ -774,8 +786,8 @@ enum {
774786

775787
/*
776788
* Communicator split type constants.
777-
* Do not change the order of these without also modifying mpif.h.in
778-
* (see also mpif-common.h.fin).
789+
* Do not change the order of these without also modifying
790+
* mpif-values.pl.
779791
*/
780792
enum {
781793
MPI_COMM_TYPE_SHARED,

0 commit comments

Comments
 (0)