Skip to content

Commit

Permalink
f08: avoid using MPIR_Assert
Browse files Browse the repository at this point in the history
Use assert to avoid including the whole mpich internal header stack.
  • Loading branch information
hzhou committed Jan 25, 2022
1 parent 11d681f commit 3cbd706
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "cdesc.h"
#include <limits.h>
#include <assert.h>

/* Fortran 2008 specifies a maximum rank of 15 */
#define MAX_RANK (15)
Expand All @@ -24,12 +25,12 @@ int cdesc_create_datatype(CFI_cdesc_t * cdesc, MPI_Aint oldcount, MPI_Datatype o
#ifdef HAVE_ERROR_CHECKING
{
int size;
MPIR_Assert(cdesc->rank <= MAX_RANK);
assert(cdesc->rank <= MAX_RANK);
PMPI_Type_size(oldtype, &size);
/* When cdesc->elem_len != size, things suddenly become complicated. Generally, it is hard to create
* a composite datatype based on two datatypes. Currently we don't support it and doubt it is useful.
*/
MPIR_Assert(cdesc->elem_len == size);
assert(cdesc->elem_len == size);
}
#endif

Expand Down

0 comments on commit 3cbd706

Please sign in to comment.