AMUN: Print more info about MPI nodes/processes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2024-07-30 22:24:24 -03:00
parent a45a380d0c
commit 7b1d7319c9

View File

@ -37,7 +37,7 @@ program amun
use mpitools , only : initialize_mpitools, finalize_mpitools use mpitools , only : initialize_mpitools, finalize_mpitools
use mpitools , only : verbose => master, nproc, check_status use mpitools , only : verbose => master, nproc, check_status
#ifdef MPI #ifdef MPI
use mpitools , only : reduce_sum, nprocs use mpitools , only : reduce_sum, nodes, nprocs
#endif /* MPI */ #endif /* MPI */
use parameters, only : read_parameters, finalize_parameters use parameters, only : read_parameters, finalize_parameters
use random , only : initialize_random, finalize_random use random , only : initialize_random, finalize_random
@ -136,14 +136,19 @@ program amun
call print_welcome(verbose) call print_welcome(verbose)
#ifdef MPI #ifdef MPI
call print_section(verbose, "Parallelization") call print_section(verbose, "Parallelization")
call print_parameter(verbose, "MPI processes" , nprocs) call print_parameter(verbose, "MPI nodes" , nodes)
call print_parameter(verbose, "MPI processes per node" , nprocs / nodes)
#else /* MPI */ #else /* MPI */
!$ call print_section(verbose, "Parallelization") !$ call print_section(verbose, "Parallelization")
#endif /* MPI */ #endif /* MPI */
!$omp parallel !$omp parallel
!$omp master !$omp master
!$ nthreads = omp_get_num_threads() !$ nthreads = omp_get_num_threads()
#ifdef MPI
!$ call print_parameter(verbose, "OpenMP threads per process", nthreads)
#else /* MPI */
!$ call print_parameter(verbose, "OpenMP threads", nthreads) !$ call print_parameter(verbose, "OpenMP threads", nthreads)
#endif /* MPI */
!$omp end master !$omp end master
!$omp end parallel !$omp end parallel