From 71ad06541d229432a8384428f47b5ae7bf7423bf Mon Sep 17 00:00:00 2001 From: Patrick Sanan Date: Mon, 1 Oct 2018 16:50:49 +0200 Subject: [PATCH] DMSetUp_DA_3D: fix warning message for int32 mesh size overflow --- src/dm/impls/da/da3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dm/impls/da/da3.c b/src/dm/impls/da/da3.c index c31c3a3fe9..3472431cce 100644 --- a/src/dm/impls/da/da3.c +++ b/src/dm/impls/da/da3.c @@ -233,7 +233,7 @@ PetscErrorCode DMSetUp_DA_3D(DM da) if (stencil_type == DMDA_STENCIL_BOX && (bx == DM_BOUNDARY_MIRROR || by == DM_BOUNDARY_MIRROR || bz == DM_BOUNDARY_MIRROR)) SETERRQ(PetscObjectComm((PetscObject)da),PETSC_ERR_SUP,"Mirror boundary and box stencil"); ierr = PetscObjectGetComm((PetscObject) da, &comm);CHKERRQ(ierr); #if !defined(PETSC_USE_64BIT_INDICES) - if (((PetscInt64) M)*((PetscInt64) N)*((PetscInt64) P)*((PetscInt64) dof) > (PetscInt64) PETSC_MPI_INT_MAX) SETERRQ3(comm,PETSC_ERR_INT_OVERFLOW,"Mesh of %D by %D by %D (dof) is too large for 32 bit indices",M,N,dof); + if (((PetscInt64) M)*((PetscInt64) N)*((PetscInt64) P)*((PetscInt64) dof) > (PetscInt64) PETSC_MPI_INT_MAX) SETERRQ4(comm,PETSC_ERR_INT_OVERFLOW,"Mesh of %D by %D by %D by %D (dof) is too large for 32 bit indices",M,N,P,dof); #endif ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr); -- 2.17.1 (Apple Git-112)