-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_iomngr
executable file
·74 lines (56 loc) · 1.79 KB
/
run_iomngr
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
62
63
64
65
66
67
68
69
70
71
72
73
74
#
echo " "
echo " =>executing: run_iomngr"
echo " "
#
# script for testing the io manager on cray-ymp and sgi
#
# the following options may also be set
# set OPTIONS ='-Dverbose_iomngr -Ddebug_iomngr -Dio_history'
# if executing on SGI, use -Dsgi
# if executing on CRAY YMP, use -Dcray_ymp and -Dshow_assigns
set case = 'sgi'
#set case = 'cray'
#set TEST_OPTIONS = '-Dtest_iomngr -Dverbose_iomngr -Ddebug_iomngr'
set TEST_OPTIONS = '-Dtest_iomngr -Dprint_iomngr_description -Dverbose_iomngr -Diohistory'
set MOM2 = /home/rcp/MOM_2 # base model code
set WORK = TEMP_DIR # temp directory
if (! -r iomngr.F) then
echo '=>Error: "iomngr.F" is not in this UPDATES directory'
exit
endif
echo "=>Grabbing sources from $MOM2"
mkdir $WORK
cd $WORK
set list = (stdunits.h iomngr.h)
foreach file ($list)
cp $MOM2/$file .
end
cp ../iomngr.F .
if ($case == 'sgi') then
echo '=>running iomngr test on sgi'
echo ' change case if running on cray-ymp'
set COMPUTER_OPTION = '-Dsgi'
#set COMPILER_OPTIONS = "-O2 -mips2 -r8 -align64 -Olimit 2000"
#set COMPILER_OPTIONS = "-O2 -r8 -Olimit 2000"
set COMPILER_OPTIONS = " "
set OPTIONS = " $COMPUTER_OPTION $TEST_OPTIONS "
echo 'OPTIONS=' $OPTIONS
echo "=>compiling..."
f77 -P $OPTIONS iomngr.F; f77 $COMPILER_OPTIONS -o sgi_a.out iomngr.i
echo "=> running...results are being written to results_sgi_iotest"
sgi_a.out > ../results_sgi_iotest
endif
if ($case == 'cray') then
echo '=>running iomngr test on cray ymp'
echo ' change case if running on sgi'
/bin/rm .assign
set COMPUTER_OPTION = '-Dcray_ymp'
set OPTIONS = " $COMPUTER_OPTION $TEST_OPTIONS "
cf77 -Zv -P $OPTIONS iomngr.F; cf77 -Zv iomngr.i
echo "=> running...results are being written to results_cray_iotest"
a.out > ../results_cray_iotest
endif
cd ../
/bin/rm -r $WORK
echo "Done"