Commit 5f9124b8 authored by Andreas Marek's avatar Andreas Marek
Browse files

Only print Kernel FLOP/s with detailed timings

parent 0fb43b46
......@@ -3334,9 +3334,9 @@
#endif
! Just for measuring the kernel performance
real(kind=c_double) :: kernel_time ! MPI_WTIME always needs double
real(kind=c_double) :: kernel_time, kernel_time_recv ! MPI_WTIME always needs double
! long integer
integer(kind=lik) :: kernel_flops
integer(kind=lik) :: kernel_flops, kernel_flops_recv
logical, intent(in) :: wantDebug
integer(kind=ik) :: istat
......@@ -5949,10 +5949,23 @@
#ifdef WITH_MPI
if (ANY(result_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_send_request ***',my_prow,my_pcol
if (ANY(result_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_recv_request ***',my_prow,my_pcol
#ifdef HAVE_DETAILED_TIMINGS
call MPI_ALLREDUCE(kernel_flops, kernel_flops_recv, 1, MPI_INTEGER8, MPI_SUM, MPI_COMM_ROWS, mpierr)
kernel_flops = kernel_flops_recv
call MPI_ALLREDUCE(kernel_flops, kernel_flops_recv, 1, MPI_INTEGER8, MPI_SUM, MPI_COMM_COLS, mpierr)
kernel_flops = kernel_flops_recv
call MPI_ALLREDUCE(kernel_time, kernel_time_recv, 1, MPI_REAL8, MPI_MAX, MPI_COMM_ROWS, mpierr)
kernel_time_recv = kernel_time
call MPI_ALLREDUCE(kernel_time, kernel_time_recv, 1, MPI_REAL8, MPI_MAX, MPI_COMM_COLS, mpierr)
kernel_time_recv = kernel_time
#endif
#else /* WITH_MPI */
if (my_prow==0 .and. my_pcol==0 .and. elpa_print_times) &
write(error_unit,'(" Kernel time:",f10.3," MFlops: ",es12.5)') kernel_time, kernel_flops/kernel_time*1.d-6
#endif /* WITH_MPI */
! deallocate all working space
if (.not.(useGPU)) then
......
......@@ -3851,9 +3851,9 @@
integer(kind=ik), parameter :: result_recv_tag = 333
! Just for measuring the kernel performance
real(kind=c_double) :: kernel_time ! MPI_WTIME always needs double
real(kind=c_double) :: kernel_time, kernel_time_recv ! MPI_WTIME always needs double
! long integer
integer(kind=lik) :: kernel_flops
integer(kind=lik) :: kernel_flops, kernel_flops_recv
#ifdef WITH_OPENMP
integer(kind=ik) :: max_threads, my_thread
......@@ -6292,11 +6292,25 @@
#ifdef WITH_MPI
if (ANY(result_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_send_request ***',my_prow,my_pcol
if (ANY(result_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_recv_request ***',my_prow,my_pcol
#ifdef HAVE_DETAILED_TIMINGS
call MPI_ALLREDUCE(kernel_flops, kernel_flops_recv, 1, MPI_INTEGER8, MPI_SUM, MPI_COMM_ROWS, mpierr)
kernel_flops = kernel_flops_recv
call MPI_ALLREDUCE(kernel_flops, kernel_flops_recv, 1, MPI_INTEGER8, MPI_SUM, MPI_COMM_COLS, mpierr)
kernel_flops = kernel_flops_recv
call MPI_ALLREDUCE(kernel_time, kernel_time_recv, 1, MPI_REAL8, MPI_MAX, MPI_COMM_ROWS, mpierr)
kernel_time_recv = kernel_time
call MPI_ALLREDUCE(kernel_time, kernel_time_recv, 1, MPI_REAL8, MPI_MAX, MPI_COMM_COLS, mpierr)
kernel_time_recv = kernel_time
#endif
#else /* WITH_MPI */
if (my_prow==0 .and. my_pcol==0 .and. elpa_print_times) &
write(error_unit,'(" Kernel time:",f10.3," MFlops: ",es12.5)') kernel_time, kernel_flops/kernel_time*1.d-6
#endif /* WITH_MPI */
! copy q to q_dev needed in trans_ev_band_to_full
#ifdef DOUBLE_PRECISION_REAL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment