CentOS8 build
Posted: Thu Sep 03, 2020 11:10 pm
The following procedure can be followed to build Qbox on a CentOS8 platform with the Intel compiler and MKL library, using OpenMPI:
Install the Xerces-C and uuid libraries (as root)
Define the PATH to include the Intel compiler and libraries:
Add the OpenMPI libs to the PATH:
The scalapack-2.1.0 library compiled with Intel compilers is available in $(HOME)/software/scalapack/scalapack-2.1.0.
Use the following Makefile include:
Install the Xerces-C and uuid libraries (as root)
Code: Select all
# yum install xerces-c xerces-c-devel libuuid libuuid-devel
Code: Select all
# . /opt/intel/bin/compilervars.sh intel64
Code: Select all
$ export MPIHOME=/opt/openmpi
$ export PATH=$MPIHOME/bin:$PATH
$ export LD_LIBRARY_PATH=$MPIHOME/lib:$LD_LIBRARY_PATH
Use the following Makefile include:
Code: Select all
#-------------------------------------------------------------------------------
#
# CentOS8
#
#-------------------------------------------------------------------------------
PLT=x86_64
#-------------------------------------------------------------------------------
PLTOBJECTS = readTSC.o
INCLUDE = -I$(MKLROOT)/include
CXX=mpicxx
LD=mpicxx
PLTFLAGS += -DIA32 -D_LARGEFILE_SOURCE \
-D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ \
-DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES -DUSE_UUID
# FFT must be FFTW2, FFTW3, ESSL or NOLIB
FFT=FFTW3
ifeq ($(FFT),FFTW2)
PLTFLAGS += -DUSE_FFTW2
#PLTFLAGS += -DFFTWMEASURE
FFTWDIR=/share/apps/fftw/fftw-2.1.5/fftw
FFTWINCLUDEDIR=$(FFTWDIR)
FFTWLIBDIR=$(FFTWDIR)/.libs
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -lfftw
endif
ifeq ($(FFT),FFTW3)
PLTFLAGS += -DUSE_FFTW3
PLTFLAGS += -DFFTW3_2D
PLTFLAGS += -DUSE_FFTW3_THREADS
PLTFLAGS += -DFFTWMEASURE
#PLTFLAGS += -DUSE_GATHER_SCATTER
#PLTFLAGS += -DFFTW_TRANSPOSE
endif
ifeq ($(FFT),ESSL)
$(error ESSL library not available)
endif
ifeq ($(FFT),NOLIB)
PLTFLAGS += -DFFT_NOLIB
endif
CXXFLAGS= -g -mkl=parallel -qopenmp -O3 -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBPATH += -L$(HOME)/software/scalapack/scalapack-2.1.0 \
-L$(MKLROOT)/lib/intel64
LIBS += -lscalapack -lpthread -lm -ldl \
-lifcore \
-luuid -lxerces-c
LDFLAGS = -mkl=parallel $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------