From bb4547a0bf6fc4f4c255ea75c828f97b9efae220 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 20 Dec 2019 09:40:42 +0000 Subject: [PATCH] Define new method get_mpi_comm --- base/modules/psi_penv_mod.F90 | 17 +++++++++++++++-- base/tools/psb_icdasb.F90 | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/base/modules/psi_penv_mod.F90 b/base/modules/psi_penv_mod.F90 index 5b4c53e7..566eae6a 100644 --- a/base/modules/psi_penv_mod.F90 +++ b/base/modules/psi_penv_mod.F90 @@ -556,16 +556,29 @@ contains subroutine psb_get_mpicomm(ictxt,comm) integer(psb_mpik_) :: ictxt, comm - comm = ictxt + comm = psb_get_mpi_comm(ictxt) end subroutine psb_get_mpicomm subroutine psb_get_rank(rank,ictxt,id) integer(psb_mpik_) :: rank,ictxt,id - rank = id + rank = psb_get_mpi_rank(ictxt,id) end subroutine psb_get_rank + function psb_get_mpi_comm(ictxt) result(comm) + integer(psb_mpik_) :: ictxt, comm + + comm = ictxt + end function psb_get_mpi_comm + + function psb_get_mpi_rank(ictxt,id) result(rank) + integer(psb_mpik_) :: rank,ictxt,id + + rank = id + end function psb_get_mpi_rank + + ! !!!!!!!!!!!!!!!!!!!!!! ! ! Base binary operations diff --git a/base/tools/psb_icdasb.F90 b/base/tools/psb_icdasb.F90 index b10ec1c9..b40d0b3c 100644 --- a/base/tools/psb_icdasb.F90 +++ b/base/tools/psb_icdasb.F90 @@ -80,7 +80,7 @@ subroutine psb_icdasb(desc,info,ext_hv,mold) dectype = desc%get_dectype() n_row = desc%get_local_rows() n_col = desc%get_local_cols() - call psb_get_mpicomm(ictxt,icomm ) + icomm = psb_get_mpi_comm(ictxt) ! check on blacs grid call psb_info(ictxt, me, np)