From 6945b1495ec2b3a127ca1c28999b3e302368183d Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 25 Mar 2022 15:50:53 +0100 Subject: [PATCH] Fix use of mpi_comm_null --- base/modules/penv/psi_penv_mod.F90 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/base/modules/penv/psi_penv_mod.F90 b/base/modules/penv/psi_penv_mod.F90 index 2e880367..0c77c6df 100644 --- a/base/modules/penv/psi_penv_mod.F90 +++ b/base/modules/penv/psi_penv_mod.F90 @@ -1138,6 +1138,13 @@ contains function psb_m_get_mpi_comm(ctxt) result(comm) +#ifdef MPI_MOD + use mpi +#endif + implicit none +#ifdef MPI_H + include 'mpif.h' +#endif type(psb_ctxt_type) :: ctxt integer(psb_mpk_) :: comm comm = mpi_comm_null @@ -1153,6 +1160,13 @@ contains end function psb_m_get_mpi_rank subroutine psb_get_mpicomm(ctxt,comm) +#ifdef MPI_MOD + use mpi +#endif + implicit none +#ifdef MPI_H + include 'mpif.h' +#endif type(psb_ctxt_type) :: ctxt integer(psb_mpk_) :: comm comm = mpi_comm_null