-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_timer
executable file
·62 lines (50 loc) · 1.45 KB
/
run_timer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
echo " "
echo " =>executing: run_timer"
echo " "
#
# script for testing the "timer.F" module
#
# the following options may also be set
#set OPTIONS ='-Ddebug_timer -Ddebug_tictoc_nesting -Dshow_tictocs'
# if executing on SGI, use -Dsgi
# if executing on CRAY YMP, use -Dcray_ymp
# use cf77 on CRAY YMP and f77 on workstations
set MOM2 = /home/rcp/MOM_2 # base model code
set WORK = TEMP_DIR # temp directory
if (! -r timer.F) then
echo '=>Error: "timer.F" is not in this UPDATES directory'
exit
endif
echo "=>Grabbing sources from $MOM2"
mkdir $WORK
cd $WORK
set list = (stdunits.h timer.h)
foreach file ($list)
cp $MOM2/$file .
end
cp ../timer.F .
set case = 'sgi'
#set case = 'cray'
if ($case == 'sgi') then
echo 'running timer test on sgi'
set COMPILER_OPTIONS = "-O2 -mips2 -r8 -align64 -Olimit 2000"
# set COMPILER_OPTIONS = "-O2 -r8 -Olimit 2000"
# set COMPILER_OPTIONS = " "
set OPTIONS = '-Dtest_timer -Dsgi -Dtiming'
echo "=>compiling..."
f77 -P $OPTIONS timer.F; f77 $COMPILER_OPTIONS -o a.out timer.i
echo "=> running...results are being written to results_sgi_timer"
a.out > ../results_sgi_timer
endif
if ($case == 'cray') then
echo 'running timer test on cray ymp'
set OPTIONS = '-Dtest_timer -Dcray_ymp -Dtiming'
echo "=>compiling..."
cf77 -Zv -P $OPTIONS timer.F; cf77 -Zv timer.i
echo "=> running...results are being written to results_cray_timer"
a.out > ../results_cray_timer
endif
cd ../
/bin/rm -r $WORK
echo "Done"