Skip to content

Commit 75fa8eb

Browse files
douglasjacobsenmgduda
authored andcommitted
Adding -fdefault-double-8 to gfortran build flags
The -fdefault-real-8 flag (required by the atmosphere core) promotes all `double precision` types to real(16). The -fdefault-double-8 keeps `double precision` types the same as real(8). When `double precision` is real(16) the MPI_WTime routines return incorrect timer information, and cause the timers to all be zero.
1 parent 8d82e7f commit 75fa8eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ gfortran:
121121
"CC_PARALLEL = mpicc" \
122122
"FC_SERIAL = gfortran" \
123123
"CC_SERIAL = gcc" \
124-
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form" \
124+
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fconvert=big-endian -ffree-form" \
125125
"CFLAGS_OPT = -O3 -m64" \
126126
"LDFLAGS_OPT = -O3 -m64" \
127-
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \
127+
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \
128128
"CFLAGS_DEBUG = -g -m64" \
129129
"LDFLAGS_DEBUG = -g -m64" \
130130
"CORE = $(CORE)" \
@@ -138,10 +138,10 @@ gfortran-openmpi:
138138
"CC_PARALLEL = openmpicc" \
139139
"FC_SERIAL = gfortran" \
140140
"CC_SERIAL = gcc" \
141-
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form" \
141+
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fconvert=big-endian -ffree-form" \
142142
"CFLAGS_OPT = -O3 -m64" \
143143
"LDFLAGS_OPT = -O3 -m64" \
144-
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \
144+
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \
145145
"CFLAGS_DEBUG = -g -m64" \
146146
"LDFLAGS_DEBUG = -g -m64" \
147147
"CORE = $(CORE)" \

0 commit comments

Comments
 (0)