Skip to content
Snippets Groups Projects
Commit ebb3432a authored by Christopher Subich's avatar Christopher Subich
Browse files

Add -ftz for builds on winisk

This patch specifically includes -ftz for winisk builds; this
forces denormalized floats to be flushed to 0, which should
avoid software-floating-point-faults that spam /var/log/messages
and probably slow down the program.  (Quick checks suggest a ~8%
speed increase for bench_dipole).

Additionally, make_deps is also extended to specifically include
CFLAGS and mark building with CC on the ./configure command line.
This should ensure that the library is built with the same
compiler (and settings) as SPINS itself.  If you have to modify
this part, pay special attention to the comment abour use of bash
array syntax.
parent 2f6524af
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,10 @@ else
echo "Untar of FFTW FAILED"; exit 1
fi
pushd fftw-3.3.2
(./configure --prefix="$CWD" --disable-fortran --enable-sse2 $FFTW_OPTIONS > /dev/null) && \
# The "${FFTW_OPTIONS[@]}" syntax expands FFTW_OPTIONS as an array variable;
# this allows for multi-word arguments like 'CFLAGS="-O3 --fast-math"' to
# work properly as a single argument from configure's perspective.
(./configure --prefix="$CWD" --disable-fortran --enable-sse2 "${FFTW_OPTIONS[@]}" CC=$CC > /dev/null) && \
(make > /dev/null) && \
(make install-libLTLIBRARIES > /dev/null) && \
pushd api; (make install > /dev/null) && popd
......
......@@ -16,7 +16,7 @@ DEBUG_CFLAGS="-g -DBZ_DEBUG"
DEBUG_LDFLAGS=
# Compiler flags for optimization
OPTIM_CFLAGS="-O3 -fp-model fast=2"
OPTIM_CFLAGS="-O3 -fp-model fast=2 -ftz"
OPTIM_LDFLAGS=$OPTIM_CFLAGS
# Compiler flags for extra optimization, such as -ip -ipo on icc
......@@ -45,7 +45,7 @@ BLITZ_INCDIR=
FFTW_LIBDIR=
FFTW_INCDIR=
# Have to disable SSE2 on itanium machines like winisk/kazan
FFTW_OPTIONS="--disable-sse2"
FFTW_OPTIONS=(--disable-sse2 CFLAGS=${OPTIM_CFLAGS[*]})
# Library locations for UMFPACK
UMF_INCDIR=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment