Commit a12fa4a3 authored by Andreas Marek's avatar Andreas Marek
Browse files

Timer for MPI communication in elpa_transpose_vectors.X90

parent 1e66b7a6
......@@ -97,7 +97,9 @@ subroutine elpa_transpose_vectors_complex_single(vmat_s,ld_s,comm_s,vmat_t,ld_t,
#ifdef WITH_OPENMP
use omp_lib
#endif
#ifdef HAVE_DETAILED_TIMINGS
use timings
#endif
use elpa_mpi
implicit none
......@@ -115,27 +117,38 @@ subroutine elpa_transpose_vectors_complex_single(vmat_s,ld_s,comm_s,vmat_t,ld_t,
integer(kind=ik) :: auxstride
#ifdef HAVE_DETAILED_TIMINGS
#if COMPLEXCASE == 1
#ifdef DOUBLE_PRECISION_COMPLEX
call timer%start("elpa_transpose_vectors_complex_double")
#else
call timer%start("elpa_transpose_vectors_complex_single")
#endif
#else
#else /* COMPLEXCASE == 1 */
#ifdef DOUBLE_PRECISION_REAL
call timer%start("elpa_transpose_vectors_real_double")
#else
call timer%start("elpa_transpose_vectors_real_single")
#endif
#endif
#endif /* COMPLEXCASE == 1 */
#endif /* HAVE_DETAILED_TIMINGS */
#ifdef HAVE_DETAILED_TIMINGS
call timer%start("mpi_communication")
#endif
call mpi_comm_rank(comm_s,myps,mpierr)
call mpi_comm_size(comm_s,nps ,mpierr)
call mpi_comm_rank(comm_t,mypt,mpierr)
call mpi_comm_size(comm_t,npt ,mpierr)
#ifdef HAVE_DETAILED_TIMINGS
call timer%stop("mpi_communication")
#endif
! The basic idea of this routine is that for every block (in the block cyclic
! distribution), the processor within comm_t which owns the diagonal
! broadcasts its values of vmat_s to all processors within comm_t.
......@@ -190,6 +203,9 @@ subroutine elpa_transpose_vectors_complex_single(vmat_s,ld_s,comm_s,vmat_t,ld_t,
#endif
#ifdef WITH_MPI
#ifdef HAVE_DETAILED_TIMINGS
call timer%start("mpi_communication")
#endif
#if COMPLEXCASE==1
......@@ -212,6 +228,9 @@ subroutine elpa_transpose_vectors_complex_single(vmat_s,ld_s,comm_s,vmat_t,ld_t,
#endif /* REALCASE == 1 */
#ifdef HAVE_DETAILED_TIMINGS
call timer%stop("mpi_communication")
#endif
#endif /* WITH_MPI */
#ifdef WITH_OPENMP
......@@ -246,14 +265,15 @@ subroutine elpa_transpose_vectors_complex_single(vmat_s,ld_s,comm_s,vmat_t,ld_t,
call timer%stop("elpa_transpose_vectors_complex_single")
#endif
#else
#else /* COMPLEXCASE == 1 */
#ifdef DOUBLE_PRECISION_REAL
call timer%stop("elpa_transpose_vectors_real_double")
#else
call timer%stop("elpa_transpose_vectors_real_single")
#endif
#endif
#endif /* COMPLEXCASE == 1 */
#endif
#endif /* HAVE_DETAILED_TIMINGS */
end subroutine
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