Page 1 of 1

Centos 7 build

Posted: Tue Nov 25, 2014 8:07 am
by fgygi
[Updated 2017-07-06]
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
Build Qbox using the following include makefile (centos7.mk):

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)

#-------------------------------------------------------------------------------

Re: Centos 7 build

Posted: Sun May 03, 2015 7:12 am
by fgygi
The scalapack library can also be installed using:

Code: Select all

yum install scalapack-common scalapack-openmpi scalapack-openmpi-devel scalapack-openmpi-static

Re: Centos 7 build

Posted: Mon Oct 24, 2016 4:43 am
by fgygi
The scalapack packages are provided by the EPEL repository. The following steps may be required before invoking yum to install scalapack:

Code: Select all

# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
# rpm -ivh epel-release-7-9.noarch.rpm
[Update 2017-07-06: the above file name was changed from "release-7-8" to "release-7-9"]

Re: Centos 7 build

Posted: Fri Jul 07, 2017 1:05 am
by fgygi
Note: libfabric bug in CentOS 7.3 1611
As of 2017-07-06, a bug in libfabric causes all openmpi applications to pause for approximately 15 s after launch, due to checking for the presence of the /dev/hfi1_0 device (which is absent). The program then executes normally.
This is a known bug, documented at https://bugzilla.redhat.com/show_bug.cgi?id=1408316
The version of libfabric distributed with CentOS 7.3.1611 is libfabric-1.3.0-3.el7.x86_64. It must be upgraded to 1.4.0.
Download the rpm libfabric-1.4.0-1.fc26.x86_64.rpm from
https://koji.fedoraproject.org/koji/pac ... geID=20963
(note: this is a Fedora RPM, but it seems to work). Update the RPM using:

Code: Select all

# rpm -Uvh libfabric-1.4.0-1.fc26.x86_64.rpm