forked from SPECFEM/specfem3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflags.guess
171 lines (165 loc) · 6.5 KB
/
flags.guess
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/bin/sh
# Attempt to guess suitable flags for the Fortran compiler.
# Use AC_CANONICAL_BUILD (and package config.guess, etc.) in the future?
if test x"$UNAME_MS" = x; then
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_MS="${UNAME_MACHINE}:${UNAME_SYSTEM}"
fi
case $FC in
pgf90|*/pgf90)
#
# Beowulf Portland pgf90
#
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="-fast -Mnobounds -Mneginfo -Mdclchk -Knoieee" # -mcmodel=medium
fi
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="-fast -Mnobounds -Mneginfo -Mdclchk -Knoieee -Ktrap=none -Minline" # -mcmodel=medium
fi
;;
ifort|*/ifort)
#
# Intel ifort Fortran90 for Linux
#
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="-O3 -vec-report0 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds -align sequence -assume byterecl -fpe0 -ftz -traceback -ftrapuv" # -mcmodel=medium
fi
if test x"$FLAGS_NO_CHECK" = x; then
# standard options (leave option -ftz, which is *critical* for performance)
# add -Winline to get information about routines that are inlined
# add -vec-report3 to get information about loops that are vectorized or not
#
# use -xP or -xS with Intel version 10, -xSSE4.2 with Intel version 11 (for Intel Nehalem processors; otherwise -xS is fine)
#
FLAGS_NO_CHECK="-O3 -xS -vec-report0 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds -align sequence -assume byterecl -fpe3 -ftz" # -mcmodel=medium
fi
#MPI_LIBS = -Vaxlib
;;
gfortran|*/gfortran|f95|*/f95)
#
# GNU gfortran
#
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="-std=f2003 -fimplicit-none -frange-check -O3 -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow -fno-trapping-math" # -mcmodel=medium
# older gfortran syntax
# FLAGS_NO_CHECK="-std=f95 -fimplicit-none -frange-check -O3 -Wunused-labels -Waliasing -Wampersand -Wsurprising -Wline-truncation -Wunderflow -fno-trapping-math" # -mcmodel=medium
fi
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="\$(FLAGS_NO_CHECK)" # -fbounds-check
fi
;;
g95|*/g95)
#
# g95 (free f95 compiler from http://www.g95.org)
#
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="-O"
fi
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="-O"
fi
;;
f90|*/f90)
case $UNAME_MS in
i*86:Linux | x86_64:Linux)
################ PC Linux #################
#
# AbSoft
#
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="-W132 -s -O3 -cpu:p7 -v -YDEALLOC=ALL"
fi
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="\$(FLAGS_CHECK)"
fi
;;
*:IRIX*)
################ SGI Irix #################
if test x"$MPIFC" = x; then
MPIFC=$FC
if test x"$MPILIBS" = x; then
MPILIBS="-lmpi -lfastm -lfpe"
fi
fi
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="\$(FLAGS_NO_CHECK) -check_bounds"
fi
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="-ansi -u -64 -O3 -OPT:Olimit=0 -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -r10000 -mips4"
fi
;;
SX-*:SUPER-UX | ES:ESOS)
################## NEC SX ##################
if test x"$MPIFC" = x; then
MPIFC=$FC
fi
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="-C hopt -R2 -Wf\" -L nostdout noinclist mrgmsg noeject -msg b -pvctl loopcnt=14000000 expand=10 fullmsg vecthreshold=20 -s\" -pi auto line=100 exp=swap_all,rank"
fi
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="\$(FLAGS_CHECK)"
fi
;;
esac
;;
lf95|*/lf95)
#
# Lahey f90
#
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="--warn --wo --tpp --f95 --dal -O --chk"
fi
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="--warn --wo --tpp --f95 --dal -O"
fi
;;
######## IBM ######
mpxlf*|*/mpxlf*)
if test x"$MPIFC" = x; then
MPIFC=$FC
fi
;;
*xlf*|*/*xlf*)
#
# do NOT remove option -qsave otherwise the IBM compiler allocates the
# arrays in the stack and the code crashes if the stack size is too
# small (which is often the case)
#
# on IBM with xlf one should also set
#
# CC = xlc_r
# CFLAGS = -O3 -q64
#
# or
#
# CC = gcc
# CFLAGS = -O3 -m64
#
# for the C compiler when using -q64 for the Fortran compiler
#
if test x"$FLAGS_NO_CHECK" = x; then
FLAGS_NO_CHECK="-O3 -qsave -qstrict -q64 -qtune=auto -qarch=auto -qcache=auto -qfree=f90 -Q -qsuffix=f=f90 -qhalt=w -qlanglvl=2003pure -qflttrap=overflow:zerodivide:invalid:enable -qsigtrap -qinitauto=7FBFFFFF"
# on MareNostrum at the Barcelona SuperComputing Center (Spain) use
# -qtune=ppc970 -qarch=ppc64v instead of -qtune=auto -qarch=auto
fi
if test x"$FLAGS_CHECK" = x; then
FLAGS_CHECK="\$(FLAGS_NO_CHECK) -C -qddim -qfloat=nans -qfullpath"
fi
;;
esac
case $UNAME_MS in
*:IRIX*)
################ SGI Irix #################
##
## CAUTION: always define setenv TRAP_FPE OFF on SGI before compiling
##
FCENV="TRAP_FPE=OFF"
;;
esac
echo MPIFC=\"$MPIFC\" | sed 's/\$/\\\$/g'
echo MPILIBS=\"$MPILIBS\" | sed 's/\$/\\\$/g'
echo FLAGS_CHECK=\"$FLAGS_CHECK\" | sed 's/\$/\\\$/g'
echo FLAGS_NO_CHECK=\"$FLAGS_NO_CHECK\" | sed 's/\$/\\\$/g'
echo FCENV=\"$FCENV\" | sed 's/\$/\\\$/g'
# end of file