From 2f6524afecab574e6863d07a9eb616bb3f11e40f Mon Sep 17 00:00:00 2001 From: Christopher Subich <csubich@uwaterloo.ca> Date: Wed, 24 Apr 2013 15:30:54 -0400 Subject: [PATCH] Added build options for clean build on plata Prior modifications to systems/plata.sh did not result in a clean build; spins itself and the UMFPACK libraries were built in 64- bit with the -m64 option, but fftw, blitz, and boost were not. This led to build-time errors. The fix involves making sure that make_deps specifies CFLAGS/CXXFLAGS as appropriate, and this was done via including $BOOST_OPTIONS/$FFTW_OPTIONS/etc flags. Where those didn't already exist in make_deps, they were added so that it will be easy to make a similar change in the future for other systems. --- make_deps.sh | 12 ++++++------ systems/plata.sh | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/make_deps.sh b/make_deps.sh index 718b2e8..a169c20 100755 --- a/make_deps.sh +++ b/make_deps.sh @@ -9,12 +9,12 @@ # This is a C++ "meta-template library" for arrays that allows # manipulation of multidimensional arrays in C++ code with a # MATLAB-like syntax -BUILD_BLITZ=no +BUILD_BLITZ=yes # fftw -- www.fftw.org # This is a self-contained library for high-performance Fast # Fourier Transforms -BUILD_FFTW=no +BUILD_FFTW=yes # UMFPACK -- www.cise.ufl.edu/research/sparse/umfpack # AMD -- www.cise.ufl.edu/research/sparse/amd/ @@ -30,7 +30,7 @@ BUILD_UMFPACK=yes # older versions of libboost do not have the program_options # library. -BUILD_BOOST=no +BUILD_BOOST=yes # Read in the appropriate system script. If none is specified on the # command line, guess based on the hostname @@ -73,7 +73,7 @@ else fi (tar -xzvf blitz_2010.tgz > /dev/null) || (echo "Untar of Blitz FAILED"; exit 1); pushd blitz - (./configure --prefix="$CWD" --disable-fortran > /dev/null) && \ + (./configure --prefix="$CWD" --disable-fortran "${BLITZ_OPTIONS}" > /dev/null) && \ (make lib > /dev/null) && \ pushd blitz && (make install > /dev/null) && popd && \ pushd lib && (make install > /dev/null) && popd && \ @@ -221,8 +221,8 @@ else ( (./bootstrap.sh $BOOST_TOOLSET_OPTION \ --with-libraries=program_options \ - --prefix="$CWD" && - ./b2 link=static && ./b2 link=static install) > /dev/null) + --prefix="$CWD" && + ./b2 link=static ${BOOST_OPTIONS} && ./b2 link=static ${BOOST_OPTIONS} install) > /dev/null) if [ 0 -ne $? ]; then echo "Could not build libboost!" ; exit 1 fi diff --git a/systems/plata.sh b/systems/plata.sh index 0404ae6..3bc644c 100644 --- a/systems/plata.sh +++ b/systems/plata.sh @@ -11,7 +11,7 @@ MPICXX=mpic++ # System-specific compiler flags SYSTEM_CFLAGS="-m64" SYSTEM_CXXFLAGS="-Wno-deprecated" -SYSTEM_LDFLAGS=-m64 +SYSTEM_LDFLAGS="-m64" # Compiler flags for debugging DEBUG_CFLAGS="-g -DBZ_DEBUG" @@ -33,6 +33,9 @@ MPI_LIB= MPI_LIBDIR= MPI_INCDIR= +# Options for building boost +BOOST_OPTIONS="cxxflags=-m64" + # Library names/locations for LAPACK LAPACK_LIB="-framework Accelerate" LAPACK_LIBDIR= @@ -42,10 +45,13 @@ LAPACK_INCDIR= # or compiled-with-this-package version BLITZ_LIBDIR= BLITZ_INCDIR= +BLITZ_OPTIONS="CXX=g++ -m64" # Library locations for fftw FFTW_LIBDIR= FFTW_INCDIR= +# Force FFTW to compile in 64-bit mode +FFTW_OPTIONS='CFLAGS=-m64' # Library locations for UMFPACK UMF_INCDIR= -- GitLab