Skip to content

Commit

Permalink
Adding -fdefault-double-8 to gfortran build flags
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
douglasjacobsen authored and mgduda committed Nov 15, 2013
1 parent 8d82e7f commit 75fa8eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ gfortran:
"CC_PARALLEL = mpicc" \
"FC_SERIAL = gfortran" \
"CC_SERIAL = gcc" \
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form" \
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fconvert=big-endian -ffree-form" \
"CFLAGS_OPT = -O3 -m64" \
"LDFLAGS_OPT = -O3 -m64" \
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \
"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" \
"CFLAGS_DEBUG = -g -m64" \
"LDFLAGS_DEBUG = -g -m64" \
"CORE = $(CORE)" \
Expand All @@ -138,10 +138,10 @@ gfortran-openmpi:
"CC_PARALLEL = openmpicc" \
"FC_SERIAL = gfortran" \
"CC_SERIAL = gcc" \
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form" \
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fconvert=big-endian -ffree-form" \
"CFLAGS_OPT = -O3 -m64" \
"LDFLAGS_OPT = -O3 -m64" \
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \
"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" \
"CFLAGS_DEBUG = -g -m64" \
"LDFLAGS_DEBUG = -g -m64" \
"CORE = $(CORE)" \
Expand Down

0 comments on commit 75fa8eb

Please sign in to comment.