diff --git a/matlab/profiler.m b/matlab/profiler.m index a8184e13023a624fdcf47ca4bc73239dab7bd080..86d73e4da8f30169afd92c6ddec18669ce685b42 100644 --- a/matlab/profiler.m +++ b/matlab/profiler.m @@ -7,15 +7,15 @@ DT_SIM = h5readatt(outfilename,'/data/input','dt'); rhs_Tc = h5read(outfilename,'/profiler/Tc_rhs'); +poisson_Tc = h5read(outfilename,'/profiler/Tc_poisson'); +Sapj_Tc = h5read(outfilename,'/profiler/Tc_Sapj'); +coll_Tc = h5read(outfilename,'/profiler/Tc_coll'); +process_Tc = h5read(outfilename,'/profiler/Tc_process'); adv_field_Tc = h5read(outfilename,'/profiler/Tc_adv_field'); ghost_Tc = h5read(outfilename,'/profiler/Tc_ghost'); clos_Tc = h5read(outfilename,'/profiler/Tc_clos'); -coll_Tc = h5read(outfilename,'/profiler/Tc_coll'); -poisson_Tc = h5read(outfilename,'/profiler/Tc_poisson'); -Sapj_Tc = h5read(outfilename,'/profiler/Tc_Sapj'); checkfield_Tc= h5read(outfilename,'/profiler/Tc_checkfield'); diag_Tc = h5read(outfilename,'/profiler/Tc_diag'); -process_Tc = h5read(outfilename,'/profiler/Tc_process'); step_Tc = h5read(outfilename,'/profiler/Tc_step'); Ts0D = h5read(outfilename,'/profiler/time'); @@ -65,9 +65,10 @@ FIGNAME = 'profiler'; else %% Normalized Area plot fig = figure; - +colors = colorcube(N_T); p1 = area(Ts0D(2:end),100*TIME_PER_FCT./diff(total_Tc),'LineStyle','none', 'FaceColor','flat'); -for i = 1:N_T; p1(i).FaceColor = rand(1,3); end; +% for i = 1:N_T; p1(i).FaceColor = rand(1,3); end; +for i = 1:N_T; p1(i).FaceColor = colors(i,:); end; legend('Compute RHS','Adv. fields','ghosts comm', 'closure', 'collision','Poisson','Nonlin','Check+sym', 'Diagnos.', 'Missing') xlabel('Sim. Time'); ylabel('Step Comp. Time [\%]') ylim([0,100]); xlim([Ts0D(2),Ts0D(end)]); diff --git a/src/basic_mod.F90 b/src/basic_mod.F90 index ece5f9b1ea99b56b5a2c0dedfa2b3a9074972ab5..c0ae90b5ce4d6e0006ad8fd0323754781fe2ded2 100644 --- a/src/basic_mod.F90 +++ b/src/basic_mod.F90 @@ -86,10 +86,17 @@ CONTAINS READ(lu_in,basic) !Init cumulative timers - tc_rhs = 0.; tc_adv_field = 0.; tc_poisson = 0. - tc_Sapj = 0.; tc_diag = 0.; tc_checkfield = 0. - tc_ghost = 0.; tc_coll = 0.; tc_process = 0. - tc_clos = 0.; tc_step = 0.; + tc_rhs = 0. + tc_poisson = 0. + tc_Sapj = 0. + tc_coll = 0. + tc_process = 0. + tc_adv_field = 0. + tc_ghost = 0. + tc_clos = 0. + tc_checkfield = 0. + tc_diag = 0. + tc_step = 0. END SUBROUTINE basic_data diff --git a/src/diagnose.F90 b/src/diagnose.F90 index 912baa9e7d45a1505aa3e5f8370d28f0b83f32a0..008b4f52e72d3e28bbad0d6224c09e5ef3a1e1ba 100644 --- a/src/diagnose.F90 +++ b/src/diagnose.F90 @@ -124,15 +124,15 @@ SUBROUTINE diagnose_full(kstep) ! Profiler time measurement CALL creatg(fidres, "/profiler", "performance analysis") CALL creatd(fidres, 0, dims, "/profiler/Tc_rhs", "cumulative rhs computation time") - CALL creatd(fidres, 0, dims, "/profiler/Tc_adv_field", "cumulative adv. fields computation time") - CALL creatd(fidres, 0, dims, "/profiler/Tc_clos", "cumulative closure computation time") - CALL creatd(fidres, 0, dims, "/profiler/Tc_ghost", "cumulative communication time") - CALL creatd(fidres, 0, dims, "/profiler/Tc_coll", "cumulative collision computation time") CALL creatd(fidres, 0, dims, "/profiler/Tc_poisson", "cumulative poisson computation time") CALL creatd(fidres, 0, dims, "/profiler/Tc_Sapj", "cumulative Sapj computation time") + CALL creatd(fidres, 0, dims, "/profiler/Tc_coll", "cumulative collision computation time") + CALL creatd(fidres, 0, dims, "/profiler/Tc_process", "cumulative process computation time") + CALL creatd(fidres, 0, dims, "/profiler/Tc_adv_field", "cumulative adv. fields computation time") + CALL creatd(fidres, 0, dims, "/profiler/Tc_ghost", "cumulative communication time") + CALL creatd(fidres, 0, dims, "/profiler/Tc_clos", "cumulative closure computation time") CALL creatd(fidres, 0, dims, "/profiler/Tc_checkfield", "cumulative checkfield computation time") CALL creatd(fidres, 0, dims, "/profiler/Tc_diag", "cumulative sym computation time") - CALL creatd(fidres, 0, dims, "/profiler/Tc_process", "cumulative process computation time") CALL creatd(fidres, 0, dims, "/profiler/Tc_step", "cumulative total step computation time") CALL creatd(fidres, 0, dims, "/profiler/time", "current simulation time")