Commit ba83f312 authored by Daniel Wortmann's avatar Daniel Wortmann

Added option to print timing for all PE

parent 09d4939a
......@@ -354,6 +354,7 @@ CONTAINS
INCLUDE "mpif.h"
INTEGER::err,isize
LOGICAL:: l_mpi
CHARACTER(len=30)::filename
CALL mpi_initialized(l_mpi,err)
if (l_mpi) CALL MPI_COMM_RANK(MPI_COMM_WORLD, irank, err)
#endif
......@@ -372,14 +373,21 @@ CONTAINS
CALL priv_writetimes(globaltimer, 1, 6)
#ifdef CPP_MPI
IF (l_mpi) THEN
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, isize, err)
WRITE (6, *) "Program used ", isize, " PE"
ENDIF
IF (l_mpi) THEN
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, isize, err)
WRITE (6, *) "Program used ", isize, " PE"
ENDIF
#endif
END IF
IF (irank==0.OR.judft_was_argument("-all_times"))
json_str = ""
call priv_genjson(globaltimer, 1, json_str)
open(32, file="juDFT_times.json")
CALL priv_genjson(globaltimer, 1, json_str)
IF (irank==0) THEN
OPEN(32, file="juDFT_times.json")
ELSE
WRITE(filename,"(a,i0,a)") "juDFT_times.",irank,".json"
OPEN(32, file=trim(filename))
END IF
write (32,"(A)") json_str
close(32)
ENDIF
......
......@@ -59,6 +59,7 @@ CONTAINS
CALL print_argument("-warn_only")
CALL print_argument("-trace")
CALL print_argument("-debugtime")
CALL print_argument("-all_times")
#ifdef CPP_HDF
WRITE(*,'(a)')""
WRITE(*,'(a)')"HDF density file relevant options:"
......@@ -120,7 +121,8 @@ CONTAINS
!Debugging
CALL new_argument(0,"-warn_only","Continue execution after a warning message","")
CALL new_argument(0,"-trace","Try to generate a stacktrace in case of an error","")
CALL new_argument(0,"-debugtime","Write the start/stop of all timers to the console","")
CALL new_argument(0,"-debugtime","Write the start/stop of all timers to the console","")
CALL new_argument(0,"-all_times","Write json files of timing for all PE, not only for PE=0")
!Output
CALL new_argument(0,"-mix_io","Do not store mixing history in memory but do IO in each iteration","")
CALL new_argument(0,"-no_out","Do not open the 'out' file but write to stdout","")
......
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