Skip to content
Snippets Groups Projects
Commit 8072a6d3 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

Fixing integrated profiler in the code (still some time is missing)

parent 13ea6942
No related branches found
No related tags found
No related merge requests found
...@@ -7,15 +7,15 @@ DT_SIM = h5readatt(outfilename,'/data/input','dt'); ...@@ -7,15 +7,15 @@ DT_SIM = h5readatt(outfilename,'/data/input','dt');
rhs_Tc = h5read(outfilename,'/profiler/Tc_rhs'); 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'); adv_field_Tc = h5read(outfilename,'/profiler/Tc_adv_field');
ghost_Tc = h5read(outfilename,'/profiler/Tc_ghost'); ghost_Tc = h5read(outfilename,'/profiler/Tc_ghost');
clos_Tc = h5read(outfilename,'/profiler/Tc_clos'); 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'); checkfield_Tc= h5read(outfilename,'/profiler/Tc_checkfield');
diag_Tc = h5read(outfilename,'/profiler/Tc_diag'); diag_Tc = h5read(outfilename,'/profiler/Tc_diag');
process_Tc = h5read(outfilename,'/profiler/Tc_process');
step_Tc = h5read(outfilename,'/profiler/Tc_step'); step_Tc = h5read(outfilename,'/profiler/Tc_step');
Ts0D = h5read(outfilename,'/profiler/time'); Ts0D = h5read(outfilename,'/profiler/time');
...@@ -65,9 +65,10 @@ FIGNAME = 'profiler'; ...@@ -65,9 +65,10 @@ FIGNAME = 'profiler';
else else
%% Normalized Area plot %% Normalized Area plot
fig = figure; fig = figure;
colors = colorcube(N_T);
p1 = area(Ts0D(2:end),100*TIME_PER_FCT./diff(total_Tc),'LineStyle','none', 'FaceColor','flat'); 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') legend('Compute RHS','Adv. fields','ghosts comm', 'closure', 'collision','Poisson','Nonlin','Check+sym', 'Diagnos.', 'Missing')
xlabel('Sim. Time'); ylabel('Step Comp. Time [\%]') xlabel('Sim. Time'); ylabel('Step Comp. Time [\%]')
ylim([0,100]); xlim([Ts0D(2),Ts0D(end)]); ylim([0,100]); xlim([Ts0D(2),Ts0D(end)]);
......
...@@ -86,10 +86,17 @@ CONTAINS ...@@ -86,10 +86,17 @@ CONTAINS
READ(lu_in,basic) READ(lu_in,basic)
!Init cumulative timers !Init cumulative timers
tc_rhs = 0.; tc_adv_field = 0.; tc_poisson = 0. tc_rhs = 0.
tc_Sapj = 0.; tc_diag = 0.; tc_checkfield = 0. tc_poisson = 0.
tc_ghost = 0.; tc_coll = 0.; tc_process = 0. tc_Sapj = 0.
tc_clos = 0.; tc_step = 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 END SUBROUTINE basic_data
......
...@@ -124,15 +124,15 @@ SUBROUTINE diagnose_full(kstep) ...@@ -124,15 +124,15 @@ SUBROUTINE diagnose_full(kstep)
! Profiler time measurement ! Profiler time measurement
CALL creatg(fidres, "/profiler", "performance analysis") 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_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_poisson", "cumulative poisson computation time")
CALL creatd(fidres, 0, dims, "/profiler/Tc_Sapj", "cumulative Sapj 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_checkfield", "cumulative checkfield computation time")
CALL creatd(fidres, 0, dims, "/profiler/Tc_diag", "cumulative sym 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/Tc_step", "cumulative total step computation time")
CALL creatd(fidres, 0, dims, "/profiler/time", "current simulation time") CALL creatd(fidres, 0, dims, "/profiler/time", "current simulation time")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment