20 bind(c, name=
'neko_comm_wrapper_init')
21 use,
intrinsic :: iso_c_binding, only : c_int
22 integer(c_int),
value :: fcomm
31 integer,
intent(in) :: ext_comm
35 if (ext_comm .eq. mpi_comm_null)
then
36 call neko_error(
'Cannot initialize test communicator from MPI_COMM_NULL')
39#ifndef HAVE_MPI_PARAM_DTYPE
45 if (ierr .ne. mpi_success)
then
46 call neko_error(
'Failed to duplicate test global communicator')
48 call mpi_comm_dup(ext_comm,
neko_comm%mpi_val, ierr)
49 if (ierr .ne. mpi_success)
then
50 call neko_error(
'Failed to duplicate test communicator')
59 logical :: initialized, finalized
63 call mpi_initialized(initialized, ierr)
65 call mpi_finalized(finalized, ierr)
67 if ((.not. initialized) .or. finalized)
then
68 call neko_error(
'MPI is not active during comm_free_test')
73 call mpi_comm_free(
neko_comm%mpi_val, ierr)
89 logical :: initialized, finalized
92 call neko_error(
'Test communicator is already initialized')
95 call mpi_initialized(initialized, ierr)
97 if (.not. initialized)
then
98 call neko_error(
'MPI must be initialized before comm_init_test')
101 call mpi_finalized(finalized, ierr)
104 call neko_error(
'MPI is finalized before comm_init_test')
129 integer,
intent(in) :: ierr
130 character(len=*),
intent(in) :: msg
132 if (ierr .ne. mpi_success)
call neko_error(msg)
logical, public nio
I/O node.
type(mpi_comm), public neko_global_comm
type(mpi_datatype), public mpi_real_precision
MPI type for working precision of REAL types.
integer, public global_pe_rank
Global MPI rank.
integer, public pe_size
MPI size of communicator.
integer, public pe_rank
MPI rank.
integer, public global_pe_size
Global MPI size of communicator.
type(mpi_comm), public neko_comm
MPI communicator.
integer, public neko_mpi_thread_provided
Thread support provided by the MPI library.
type(mpi_datatype), public mpi_extra_precision
subroutine comm_init_test_f(ext_comm)
Initialize Neko communicator state from an externally owned integer communicator, as returned by pFUn...
subroutine comm_test_set_state()
subroutine, public comm_free_test
Free communicator state initialized by comm_init_test without finalizing MPI.
subroutine comm_test_precheck()
subroutine comm_test_check(ierr, msg)