修訂 | f1b5708381ef10afdf229c38e5c24fb384a30863 (tree) |
---|---|
時間 | 2022-09-01 20:38:29 |
作者 | Harald Klimach <harald.klimach@dlr....> |
Commiter | Harald Klimach |
Added a timer to measure the syncUpdate of simcontrol.
@@ -133,6 +133,10 @@ | ||
133 | 133 | |
134 | 134 | use tem_convergence_module, only: tem_convergence_reset |
135 | 135 | |
136 | + use tem_timer_module, only: tem_addTimer, & | |
137 | + & tem_startTimer, & | |
138 | + & tem_stopTimer | |
139 | + | |
136 | 140 | use aotus_module, only: flu_State, aot_get_val |
137 | 141 | use aot_table_module, only: aot_table_open, & |
138 | 142 | & aot_table_close |
@@ -182,6 +186,10 @@ | ||
182 | 186 | !> Use nonblocking operations for gobal checks and delay evaluation by |
183 | 187 | !! one check interval (see timeControl%check_iter) |
184 | 188 | logical :: delay_check = .false. |
189 | + | |
190 | + !> Handle for the syncUpdate timer to measure the time spent on syncUpdate | |
191 | + !! calls. | |
192 | + integer :: syncUpdate_timer | |
185 | 193 | end type tem_simControl_type |
186 | 194 | |
187 | 195 |
@@ -277,6 +285,9 @@ | ||
277 | 285 | ! simulation time. |
278 | 286 | call tem_timeControl_start_at_sim(me = me%timeControl, now = me%now) |
279 | 287 | |
288 | + call tem_addTimer( timerHandle = me%syncUpdate_timer, & | |
289 | + & timerName = 'tem_syncUpdate' ) | |
290 | + | |
280 | 291 | end subroutine tem_simControl_load |
281 | 292 | ! ************************************************************************ ! |
282 | 293 |
@@ -399,6 +410,8 @@ | ||
399 | 410 | logical :: max_reached(tem_time_n_ids) |
400 | 411 | ! -------------------------------------------------------------------- ! |
401 | 412 | |
413 | + call tem_startTimer(timerHandle = me%syncUpdate_timer) | |
414 | + | |
402 | 415 | if (present(dt)) then |
403 | 416 | call tem_time_advance( me = me%now, & |
404 | 417 | & sim_dt = dt, & |
@@ -441,6 +454,8 @@ | ||
441 | 454 | & %bits(tem_stat_interval) ) |
442 | 455 | end if |
443 | 456 | |
457 | + call tem_stopTimer(timerHandle = me%syncUpdate_timer) | |
458 | + | |
444 | 459 | end subroutine tem_simControl_syncUpdate |
445 | 460 | ! ************************************************************************ ! |
446 | 461 |