Last active
October 29, 2015 05:33
-
-
Save hiracchi/a4f9af8f394e9e2922a0 to your computer and use it in GitHub Desktop.
build script for ProteinDF on MacOSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# a build script for ProteinDF on MacOSX | |
# | |
# 1. prepare build tools by using homebrew. | |
# $ brew install gcc automake autoconf libtool | |
# 2. install LAPACK into ${HOME}/local | |
# In this case, "librefblas.a" and "liblapack.a" are found in the ${HOME}/local/lib directory. | |
# 3. install OpenMPI into ${HOME}/local/openmpi | |
# This build-script uses "${HOME}/local/openmpi/bin/mpicxx" as MPI-C++ compiler. | |
# 4. install ScaLAPACK into ${HOME}/local | |
# The ScaLAPACK library should be build using the previous OpenMPI-compiler(fortran, c/c++). | |
# The file "libscalapack.a" is found in the ${HOME}/local/lib. | |
export LANG=C | |
MY_PREFIX=${HOME}/local/ProteinDF | |
if [ x${1} != x ]; then | |
MY_PREFIX=${1} | |
fi | |
export F77=gfortran | |
export FC=gfortran | |
export CC=gcc-5 | |
export CXX=g++-5 | |
export CFLAGS=" \ | |
-Wall -O3 \ | |
-fopenmp \ | |
-DMPICH_IGNORE_CXX_SEEK " | |
export CXXFLAGS=${CFLAGS} | |
export LDFLAGS="-fopenmp" | |
export MPICXX=${HOME}/local/openmpi/bin/mpicxx | |
export LIBS="-lgfortran -lm" | |
# Following parameters are also available. | |
# export BLAS_LIBS=${HOME}/local/lib/librefblas.a | |
# export LAPACK_LIBS=${HOME}/local/lib/liblapack.a | |
# export SCALAPACK_LIBS=${HOME}/local/lib/libscalapack.a | |
CONFIGURE_OPT=" \ | |
--disable-shared \ | |
--enable-static \ | |
--enable-parallel \ | |
--with-blas="${HOME}/local/lib/librefblas.a" \ | |
--with-lapack="${HOME}/local/lib/liblapack.a" \ | |
--with-scalapack="${HOME}/local/lib/libscalapack.a" \ | |
" | |
rm -rf autom4te.cache | |
./bootstrap.sh | |
./configure --prefix=${MY_PREFIX} ${CONFIGURE_OPT} 2>&1 | tee out.configure | |
make 2>&1 | tee out.make | |
make install 2>&1 | tee out.make_install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment