Commit 1dd0cc4b authored by Junchao Zhang's avatar Junchao Zhang Committed by Kenneth Raffenetti
Browse files

Increase MAX_F90_TYPES to 64



64 is big enough to include 32-bit, 64-bit, and possilbe 128-bit
floating point or integer data types.

Also, fixed a bug. We need to return an error when we need to add a new
data type but nAlloc is already >= MAX_F90_TYPES

Fixes #2265
Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <raffenet@mcs.anl.gov>
parent 52316da7
......@@ -17,7 +17,7 @@
/* This gives the maximum number of distinct types returned by any one of the
MPI_Type_create_f90_xxx routines */
#define MAX_F90_TYPES 16
#define MAX_F90_TYPES 64
typedef struct { int combiner; int r, p;
MPI_Datatype d; } F90Predefined;
static int nAlloc = 0;
......@@ -57,7 +57,7 @@ int MPIR_Create_unnamed_predefined( MPI_Datatype old, int combiner,
}
/* Create a new type and remember it */
if (nAlloc > MAX_F90_TYPES) {
if (nAlloc >= MAX_F90_TYPES) {
return MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
"MPIF_Create_unnamed_predefined", __LINE__,
MPI_ERR_INTERN, "**f90typetoomany", 0 );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment