68 logical :: initialized
69 integer :: provided, nthrds
72 character(len=255) :: color_str
78 call mpi_initialized(initialized, ierr)
80 call get_environment_variable(
"NEKO_COMM_ID", color_str, envvar_len)
81 if (envvar_len .gt. 0)
then
82 read(color_str(1:envvar_len), *) color
94 if (.not.initialized)
then
95 if (nthrds .gt. 1)
then
96 call mpi_init_thread(mpi_thread_multiple, provided, ierr)
97 if (provided .ne. mpi_thread_multiple)
then
100 call neko_error(
'Invalid thread support provided by MPI')
102 call mpi_init_thread(mpi_thread_serialized, provided, ierr)
103 if (provided .ne. mpi_thread_serialized)
then
104 call neko_error(
'Invalid thread support provided by MPI')
113#ifndef HAVE_MPI_PARAM_DTYPE
121 call mpi_comm_rank(mpi_comm_world,
pe_rank, ierr)
130 if (envvar_len .gt. 0)
then
145 call neko_comm_nvshmem_init()
148#if defined(HAVE_NCCL) | defined(HAVE_RCCL)
150 call neko_comm_nccl_init()