Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
summary.f90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23  program summary
24 !
25 ! Summarizes timing data in GENXTimingDatannnn.txt files
26 !
27 ! Finds the longest wall clock time over all processes
28 ! in a given run. If the longest time is shorter in the
29 ! 2nd step than in the 3rd, it uses the 2nd step.
30 !
31 ! Use executable summary.x with timing_script.
32 !
33 ! Written by Robert Fiedler, revised 2/7/02.
34 !
35  integer m,n,np,nmax,mmax
36  parameter(nmax=10000,mmax=3)
37  double precision times(nmax,mmax),tmax2,tmax3,tmax
38 ! character*55 junk
39 ! character*56 junk
40  character*33 junk
41  character*33 junk1
42 !
43  times = 0.
44 !
45 ! Make a system call to grep to get list of timings
46 ! If "system" is not available on the machine, comment this
47 ! out and do it by hand.
48 !
49 ! call system('grep "PrecCorr loop time" *.txt > summary')
50 !
51 
52 !
53 ! This list has mmax entries per processor. Read in the times.
54 !
55  open(10,file='summary')
56  do n=1,nmax ! Loop over timing files (processors)
57 ! if (n == 1) then
58 !
59 ! See if it's in the format for 1 processor
60 !
61 ! do m=1,mmax
62 ! read(10,'(a,d25.16)',iostat=ios) junk1,times(n,m)
63 ! if (ios /= 0) exit
64 ! end do
65 ! if (ios /= 0) rewind(10)
66 ! endif
67 !
68 ! Try format for more than 1 processor
69 !
70  do m=1,mmax
71  read(10,'(a,d25.16)',iostat=ios) junk,times(n,m)
72  if (ios /= 0) exit
73  end do
74  if (ios /= 0) exit
75  end do
76  np = max(1,n-1)
77 !
78 ! Find the longest time for the 2nd and 3rd PreCorr loops
79 !
80  tmax2 = 0.
81  tmax3 = 0.
82  do n=1,np
83  if (times(n,2) > tmax2) tmax2 = times(n,2)
84  if (times(n,3) > tmax3) tmax3 = times(n,3)
85  end do
86  tmax = tmax2
87  if (tmax3 .ne. 0.) tmax = min(tmax2,tmax3)
88  write(*,10) np, tmax
89  10 format(i4, 2x, 1pd16.5)
90 ! print *,np,tmax
91 !
92  end
93 
94 
95 
96 
97 
98 
FT m(int i, int j) const
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
void int int REAL * x
Definition: read.cpp:74
const NT & n
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:346
program summary
Definition: summary.f90:23