1
C @(#)nosci.for 19.1 (ES0-DMD) 02/25/03 14:36:00
2
C===========================================================================
3
C Copyright (C) 1995 European Southern Observatory (ESO)
5
C This program is free software; you can redistribute it and/or
6
C modify it under the terms of the GNU General Public License as
7
C published by the Free Software Foundation; either version 2 of
8
C the License, or (at your option) any later version.
10
C This program is distributed in the hope that it will be useful,
11
C but WITHOUT ANY WARRANTY; without even the implied warranty of
12
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
C GNU General Public License for more details.
15
C You should have received a copy of the GNU General Public
16
C License along with this program; if not, write to the Free
17
C Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
C Corresponding concerning ESO-MIDAS should be addressed as follows:
21
C Internet e-mail: midas@eso.org
22
C Postal address: European Southern Observatory
23
C Data Management Division
24
C Karl-Schwarzschild-Strasse 2
25
C D 85748 Garching bei Muenchen
27
C===========================================================================
29
c "nosci" and "noscf" are nosc routines which
30
c write run timing results to file "{directory_name}results"
31
c in the current directory. The environment
32
c file "../environ", containing the compiler
33
c names and options, is copied to "*results",
34
c along with any local "environ" file. This local
35
c "environ" defines info unique to the individual
36
c benchmark , e.g. hspice. The current date and
37
c wall clock time is also written to "*results".
38
c The Timings are then referenced to our "baseline" machine.
40
c The "*results" file is always appended to which
41
c gives a benchmark history for this benchmark
42
c using different compiler options.
45
c "iu" is unit to use when writing to "*results".
46
c Unit "iu+1" is also used to read in "environ" and "baseline"
49
c Usage: call nosci(iu) Initalize "results" file.
50
c call noscf() Finalize "results".
55
c This should be the 1st thing the program does!
56
c set up file "results" and initialize timing
60
character line*80,path*80
61
character *16 group,name
71
c strip path name from directory
72
last=index(path,' ')-1
74
ii=index(path(i:last),'/')
79
results=path(i:last)//'results'
81
c open the 'results' file and position to end of file.
82
c if file not there, create it.
85
open(iout,file=results,status='old',err=20)
86
c file exists - position to end of file
87
5 read(iout,*,end=30,err=5) line(1:1)
89
c 'results' doesn't exist - open new file
90
20 open(iout,file=results,status='new',err=300)
91
call chmod(results,'ugo+rw')
93
write(iout,*)'*********************************'
94
write(iout,*)path(i:last),' ',fdate()
97
c copy "../environ" and "./environ" (if one exists)
98
c files to "./*results" file
102
open(in,file=envir(ie:10),status='old',err=55)
103
47 read(in,49,end=50)line
113
c ****************** NOSCF ***********************
115
c This should be the last thing the program does!
116
c get elapsed time for run and write to "*results"
121
write(iout,*)'Total elapsed time (sec) =',t,' system ='
124
c ***********************************************
125
c reference to baseline '../baseline'
127
open (in,file='../baseline',status='old',err=90)
128
80 read(in,*,end=90,err=90)name,bt,bs,bu
129
if (name.ne.group)go to 80
136
write(iout,*)'BASELINED total =',bt1,' system =',bs1,
140
c Come here on errors!
142
c call perror('nosci error')