@@ -1134,6 +1134,8 @@ contains
11341134 real (kind (0d0 )), intent (inout ) :: start, finish
11351135 integer , intent (inout ) :: nt
11361136
1137+ real (kind (0d0 )) :: grind_time
1138+
11371139 call s_mpi_barrier()
11381140
11391141 if (num_procs > 1 ) then
@@ -1152,29 +1154,33 @@ contains
11521154 time_final = maxval (proc_time)
11531155 io_time_final = maxval (io_proc_time)
11541156 end if
1155- print * , " Performance: " , time_final* 1.0d9 / (sys_size* maxval ((/ 1 ,m_glb/ ))* maxval ((/ 1 ,n_glb/ ))* maxval ((/ 1 ,p_glb/ ))), " ns/gp/eq/rhs"
1157+
1158+ grind_time = time_final* 1.0d9 / (sys_size* maxval ((/ 1 ,m_glb/ ))* maxval ((/ 1 ,n_glb/ ))* maxval ((/ 1 ,p_glb/ )))
1159+
1160+ print * , " Performance:" , grind_time, " ns/gp/eq/rhs"
11561161 inquire (FILE= ' time_data.dat' , EXIST= file_exists)
11571162 if (file_exists) then
11581163 open (1 , file= ' time_data.dat' , position= ' append' , status= ' old' )
1159- write (1 , * ) num_procs, time_final
1160- close (1 )
11611164 else
11621165 open (1 , file= ' time_data.dat' , status= ' new' )
1163- write (1 , * ) num_procs, time_final
1164- close (1 )
1166+ write (1 , ' (A10, A15, A15)' ) " Ranks" , " s/step" , " ns/gp/eq/rhs"
11651167 end if
11661168
1169+ write (1 , ' (I10, 2(F15.8))' ) num_procs, time_final, grind_time
1170+
1171+ close (1 )
1172+
11671173 inquire (FILE= ' io_time_data.dat' , EXIST= file_exists)
11681174 if (file_exists) then
11691175 open (1 , file= ' io_time_data.dat' , position= ' append' , status= ' old' )
1170- write (1 , * ) num_procs, io_time_final
1171- close (1 )
11721176 else
11731177 open (1 , file= ' io_time_data.dat' , status= ' new' )
1174- write (1 , * ) num_procs, io_time_final
1175- close (1 )
1178+ write (1 , ' (A10, A15)' ) " Ranks" , " s/step"
11761179 end if
11771180
1181+ write (1 , ' (I10, F15.8)' ) num_procs, io_time_final
1182+ close (1 )
1183+
11781184 end if
11791185
11801186 end subroutine s_save_performance_metrics
0 commit comments