|
|
|
|
@ -1035,6 +1035,8 @@ contains
|
|
|
|
|
! !$ call psb_error(ctxt)
|
|
|
|
|
! !$ endif
|
|
|
|
|
! !$ endif
|
|
|
|
|
if (close_) call psb_clear_vect_defaults()
|
|
|
|
|
if (close_) call psb_clear_mat_defaults()
|
|
|
|
|
#if defined(PSB_SERIAL_MPI)
|
|
|
|
|
! Under serial mode, CLOSE has no effect, but reclaim
|
|
|
|
|
! the used ctxt number.
|
|
|
|
|
@ -1045,12 +1047,6 @@ contains
|
|
|
|
|
else
|
|
|
|
|
call psb_close_context(psb_mesg_queue,ctxt)
|
|
|
|
|
end if
|
|
|
|
|
!if ((ctxt /= mpi_comm_null).and.(ctxt /= mpi_comm_world)) then
|
|
|
|
|
if (allocated(ctxt%ctxt)) then
|
|
|
|
|
!write(0,*) ctxt%ctxt,mpi_comm_world,mpi_comm_null
|
|
|
|
|
if ((ctxt%ctxt /= mpi_comm_world).and.(ctxt%ctxt /= mpi_comm_null)) &
|
|
|
|
|
& call mpi_comm_Free(ctxt%ctxt,info)
|
|
|
|
|
end if
|
|
|
|
|
if (close_) then
|
|
|
|
|
if (info == 0) call mpi_op_free(mpi_i2amx_op,info)
|
|
|
|
|
if (info == 0) call mpi_op_free(mpi_i2amn_op,info)
|
|
|
|
|
@ -1069,12 +1065,16 @@ contains
|
|
|
|
|
if (info == 0) call mpi_op_free(mpi_snrm2_op,info)
|
|
|
|
|
if (info == 0) call mpi_op_free(mpi_dnrm2_op,info)
|
|
|
|
|
end if
|
|
|
|
|
if (allocated(ctxt%ctxt)) then
|
|
|
|
|
!!$ write(0,*) ctxt%ctxt,mpi_comm_world,mpi_comm_null,mpi_comm_self
|
|
|
|
|
if ((ctxt%ctxt /= mpi_comm_world).and.(ctxt%ctxt /= mpi_comm_null).and.&
|
|
|
|
|
& (ctxt%ctxt /= mpi_comm_self)) &
|
|
|
|
|
& call mpi_comm_Free(ctxt%ctxt,info)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
if (close_) call mpi_finalize(info)
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
if (close_) call psb_clear_vect_defaults()
|
|
|
|
|
if (close_) call psb_clear_mat_defaults()
|
|
|
|
|
|
|
|
|
|
end subroutine psb_exit_mpik
|
|
|
|
|
|
|
|
|
|
|