Qbox 1.63.7 can be built on CentOS 7 using the following steps:
1) Install the following packages using "yum install"
lapack lapack-devel xerces-c xerces-c-devel fftw fftw-devel openmpi openmpi-devel
2) Install scalapack-2.0.2 using the following script
Code: Select all
#!/bin/bash
# Install scalapack on a CentOS7 system
#
# It is assumed that the following packages are installed with yum
# blas, blas-devel
# lapack, lapack-devel
# openmpi, openmpi-devel
# choose where to install scalapack
SCALAPACKDIR=${HOME}/software/scalapack
mkdir -p $SCALAPACKDIR
cd $SCALAPACKDIR
wget http://www.netlib.org/scalapack/scalapack-2.0.2.tgz
tar zxf scalapack-2.0.2.tgz
cd scalapack-2.0.2
cp SLmake.inc.example SLmake.inc
# patch SLmake.inc to use OpenMPI MPI compilers
patch << EOF
--- SLmake.inc 2014-11-23 16:15:18.899263427 -0800
+++ ../SLmake.inc 2014-11-23 15:57:02.475807334 -0800
@@ -26,8 +26,8 @@
# The fortran and C compilers, loaders, and their flags
#
-FC = mpif90
-CC = mpicc
+FC = /usr/lib64/openmpi/bin/mpif90
+CC = /usr/lib64/openmpi/bin/mpicc
NOOPT = -O0
FCFLAGS = -O3
CCFLAGS = -O3
EOF
# build
make
Code: Select all
#-------------------------------------------------------------------------------
#
# Copyright (c) 2008-2014 The Regents of the University of California
#
# This file is part of Qbox
#
# Qbox is distributed under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
# See the file COPYING in the root directory of this distribution
# or <http://www.gnu.org/licenses/>.
#
#-------------------------------------------------------------------------------
#
# centos7.mk
#
#-------------------------------------------------------------------------------
# The following packages must be installed using yum install:
#
# atlas atlas-devel fftw fftw-devel xerces-c xerces-c-devel
# openmpi openmpi-devel
#
# The scalapack library must be built using the install_scalapack.sh script
#
SCALAPACKDIR = $(HOME)/software/scalapack/scalapack-2.0.2
ATLASDIR=/usr/lib64/atlas
PLTOBJECTS = readTSC.o
CXX=/usr/lib64/openmpi/bin/mpicxx
LD=$(CXX)
PLTFLAGS += -DIA32 -D_LARGEFILE_SOURCE \
-D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ \
-DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES \
-DXERCESC_3 -DMPICH_IGNORE_CXX_SEEK
PLTFLAGS += -DUSE_FFTW3
PLTFLAGS += -DFFTWMEASURE
#PLTFLAGS += -DFFTW_TRANSPOSE
PLTFLAGS += -DFFTW3_2D
LIBS += -lfftw3
CXXFLAGS= -g -O3 $(PLTFLAGS) $(DFLAGS)
LIBPATH += -L$(XERCESCDIR)/lib \
-L$(ATLASDIR) -L$(SCALAPACKDIR) -L/usr/lib64
LIBS += -lxerces-c -lscalapack -lsatlas -lgfortran
LDFLAGS = $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------