Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(inout) | :: | params |
subroutine initialize_communications(params)
TYPE(KORC_PARAMS), INTENT(INOUT) :: params
CHARACTER(MAX_STRING_LENGTH) :: string
call initialize_mpi(params)
!$OMP PARALLEL SHARED(params)
params%num_omp_threads = OMP_GET_NUM_THREADS()
!$OMP END PARALLEL
if (params%mpi_params%rank.EQ.0) then
write(output_unit_write,'(/,"* * * * * * * OMP SET-UP * * * * * * *")')
!$OMP PARALLEL
!$OMP MASTER
write(output_unit_write,'(/,"OMP threads per MPI process: ",I3)') OMP_GET_NUM_THREADS()
write(output_unit_write,'(/,"Cores available per MPI process: ",I3)') OMP_GET_NUM_PROCS()
!$OMP END MASTER
!$OMP END PARALLEL
#ifdef GNU
call GET_ENVIRONMENT_VARIABLE("OMP_PLACES",string)
write(output_unit_write,'(/,"OMP places: ",A30)') TRIM(string)
call GET_ENVIRONMENT_VARIABLE("GOMP_CPU_AFFINITY",string)
write(output_unit_write,'(/,"OMP CPU affinity: ",A30)') TRIM(string)
#endif
write(output_unit_write,'("* * * * * * * * * * * * * * * * * * *",/)')
end if
end subroutine initialize_communications