-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathcompiler_flags_Cray_Fortran.cmake
More file actions
62 lines (48 loc) · 2.39 KB
/
Copy pathcompiler_flags_Cray_Fortran.cmake
File metadata and controls
62 lines (48 loc) · 2.39 KB
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
# (C) Copyright 2009-2016 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.
####################################################################
# FLAGS COMMON TO ALL BUILD TYPES
####################################################################
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -emf -rmoid -lhugetlbfs")
if( HAVE_OMP )
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -homp")
else( )
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -hnoomp")
endif( )
####################################################################
# RELEASE FLAGS
####################################################################
set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -hPIC" )
####################################################################
# DEBUG FLAGS
####################################################################
set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -Gfast -Ktrap=fp" )
####################################################################
# BIT REPRODUCIBLE FLAGS
####################################################################
set( CMAKE_Fortran_FLAGS_BIT "-O2 -hflex_mp=conservative -hadd_paren -hfp1" )
####################################################################
# LINK FLAGS
####################################################################
set( CMAKE_Fortran_LINK_FLAGS "-Wl,-Map,loadmap" )
####################################################################
# FLAGS FOR AUTOPROFILING
####################################################################
set( Fortran_AUTOPROFILING_FLAGS "" )
####################################################################
# Meaning of flags
# ----------------
# -hfp3 : Special optimisation for floating points
# -Ktrap=fp : Abort on NaN
# -R b : Bounds checking
# -hflex_mp=conservative -hfp1 : Obtain bit-reproducible results
# -hflex_mp=intolerant -hfp2 : Obtain bit-reproducible results (also)
# -hadd_paren : encourage left to right fp evaluation
# -hscalarN , -hvectorN : optimisation for scalar and vectorisation
# -homp/-hnoomp : Enable/Disable OpenMP
# -rmoi : create compiler listing