Commit 23494d19 by Francois Gygi

Add build directory and example makefile includes


git-svn-id: http://qboxcode.org/svn/qb/trunk@1730 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 04bdc9b2
#-------------------------------------------------------------------------------
#
# bgq.mk
#
#-------------------------------------------------------------------------------
#
PLT=BGQ
#-------------------------------------------------------------------------------
# use the following .soft environment
####~/.soft###
# @default
# +mpiwrapper-xl
CXX=mpic++
LD=$(CXX)
PLTFLAGS += -DUSE_MPI -DSCALAPACK
PLTFLAGS += -D__linux__ -DPLT_BIG_ENDIAN
PLTFLAGS += -DUSE_XERCES
PLTFLAGS += -D_LARGEFILE_SOURCE
PLTFLAGS += -D_FILE_OFFSET_BITS=64
PLTFLAGS += -DMPICH_IGNORE_CXX_SEEK
PLTFLAGS += -DUSE_MASSV
# FFT must be FFTW2, FFTW3, ESSL or NOLIB
FFT=ESSL
ifeq ($(FFT),FFTW2)
PLTFLAGS += -DUSE_FFTW2
PLTFLAGS += -DUSE_DFFTW
PLTFLAGS += -DFFTWMEASURE
FFTWDIR=/soft/libraries/alcf/current/xl/FFTW2
FFTWINCLUDEDIR=$(FFTWDIR)/include
FFTWLIBDIR=$(FFTWDIR)/lib
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -ldfftw
endif
ifeq ($(FFT),FFTW3)
PLTFLAGS += -DUSE_FFTW3
PLTFLAGS += -DFFTWMEASURE
FFTWDIR=/soft/libraries/alcf/current/xl/FFTW3
FFTWINCLUDEDIR=$(FFTWDIR)/include
FFTWLIBDIR=$(FFTWDIR)/lib
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -lfftw3
endif
ifeq ($(FFT),ESSL)
PLTFLAGS += -DUSE_ESSL_FFT
#PLTFLAGS += -DUSE_ESSL_2DFFT
endif
ifeq ($(FFT),NOLIB)
PLTFLAGS += -DFFT_NOLIB
endif
XERCESCDIR=$(HOME)/software/xerces/xerces-c-src_2_8_0
XERCESCLIBDIR=$(XERCESCDIR)/lib
SCALAPACKLIBDIR=/soft/libraries/alcf/current/xl/SCALAPACK/lib
SCALAPACKLIB=-lscalapack
LAPACKLIBDIR=/soft/libraries/alcf/current/xl/LAPACK/lib
LAPACKLIB=-llapack
BLASLIBDIR=/soft/libraries/essl/current/lib64
BLASLIB=-lesslsmpbg
INCLUDE += -I$(XERCESCDIR)/include
CXXFLAGS= -g -O3 -qsmp=omp -qarch=qp -qtune=qp \
-D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBPATH += -L$(XERCESCLIBDIR) -L$(SCALAPACKLIBDIR) \
-L$(LAPACKLIBDIR) -L$(BLASLIBDIR) \
-L${IBM_FCMP}/bglib64 \
-L${IBM_MAIN_DIR}/xlmass/bg/7.3/bglib64 \
-L${IBM_MAIN_DIR}/xlf/bg/14.1/bglib64 \
-L${IBM_MAIN_DIR}/xlsmp/bg/3.1/bglib64 \
-L$(IBM_MAIN_DIR)/xlf/bg/14.1/bglib64
LIBS += $(PLIBS) $(SCALAPACKLIB) $(LAPACKLIB) $(BLASLIB) \
-lmass -lmassv -lxerces-c \
-lxlf90_r -lxlfmath -lxl \
-lxlsmp -lxlomp_ser \
-lpthread -lgomp
LDFLAGS = $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# Copyright (c) 2008-2015 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/>.
#
#-------------------------------------------------------------------------------
#
# centos6.mk
#
#-------------------------------------------------------------------------------
# Prerequisites:
# On a Centos-6.6 system, install the following packages:
# yum install xerces-c xerces-c-devel
# yum install openmpi openmpi-devel
# yum install lapack lapack-devel
# yum install fftw fftw-devel
# yum install scalapack-common scalapack-openmpi \
# scalapack-openmpi-devel scalapack-openmpi-static
# yum install libuuid libuuid-devel
#
#-------------------------------------------------------------------------------
PLT=Linux_x8664
#-------------------------------------------------------------------------------
PLTOBJECTS = readTSC.o
SVN_VER :=$(shell svnversion -n)
DFLAGS += -DSVN_VERSION='"$(SVN_VER)"'
CXX=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 -DUSE_UUID
# FFT must be FFTW2, FFTW3, ESSL or NOLIB
FFT=FFTW3
ifeq ($(FFT),FFTW2)
PLTFLAGS += -DUSE_FFTW2
PLTFLAGS += -DFFTWMEASURE
FFTWDIR=$(HOME)/software/fftw/Linux_x8664/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 += -DFFTWMEASURE
#PLTFLAGS += -DFFTW_TRANSPOSE
PLTFLAGS += -DFFTW3_2D
FFTWDIR=$(HOME)/software/fftw/fftw-3.3.4
FFTWINCLUDEDIR=$(FFTWDIR)/api
FFTWLIBDIR=$(FFTWDIR)/.libs
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -lfftw3
endif
ifeq ($(FFT),ESSL)
$(error ESSL library not available)
endif
ifeq ($(FFT),NOLIB)
PLTFLAGS += -DFFT_NOLIB
endif
CXXFLAGS= -g -O3 -Wunused -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBS += -lpthread -lxerces-c -lscalapack -llapack -lblas -luuid
LDFLAGS = $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# Copyright (c) 2008 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/>.
#
#-------------------------------------------------------------------------------
#
# gcc_atlas.mk
#
#-------------------------------------------------------------------------------
PLT=Linux_x8664
#-------------------------------------------------------------------------------
SCALAPACKDIR = $(HOME)/software/scalapack/scalapack-2.0.2
XERCESCDIR=$(HOME)/software/xerces/xerces-c-src_2_8_0
ATLASDIR=/usr/lib64/atlas
PLTOBJECTS = readTSC.o
SVN_VER :=$(shell svnversion -n)
DFLAGS += -DSVN_VERSION='"$(SVN_VER)"'
CXX=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 \
-DMPICH_IGNORE_CXX_SEEK
# FFT must be FFTW2, FFTW3, ESSL or NOLIB
FFT=FFTW2
ifeq ($(FFT),FFTW2)
PLTFLAGS += -DUSE_FFTW2
PLTFLAGS += -DFFTWMEASURE
FFTWDIR=$(HOME)/software/fftw/Linux_x8664/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 += -DFFTWMEASURE
#PLTFLAGS += -DFFTW_TRANSPOSE
PLTFLAGS += -DFFTW3_2D
FFTWDIR=$(HOME)/software/fftw/fftw-3.3.4
FFTWINCLUDEDIR=$(FFTWDIR)/api
FFTWLIBDIR=$(FFTWDIR)/.libs
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -lfftw3
endif
ifeq ($(FFT),ESSL)
$(error ESSL library not available)
endif
ifeq ($(FFT),NOLIB)
PLTFLAGS += -DFFT_NOLIB
endif
INCLUDE += -I$(XERCESCDIR)/include
CXXFLAGS= -g -O3 -Wunused -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBPATH += -L$(XERCESCDIR)/lib \
-L$(ATLASDIR) -L$(SCALAPACKDIR) -L/usr/lib64
LIBS += -lpthread -lxerces-c -lscalapack -llapack -lf77blas -latlas
LDFLAGS = $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# icc_mkl.mk
#
#-------------------------------------------------------------------------------
#
PLT=x86_64
#-------------------------------------------------------------------------------
MPIDIR=/opt/openmpi
XERCESCDIR=/share/apps/xerces/xerces-c-src_2_8_0
PLTOBJECTS = readTSC.o
INCLUDE = -I$(MKLROOT)/include
CXX=icc
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
# FFT must be FFTW2, FFTW3, ESSL or NOLIB
FFT=FFTW2
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 += -DFFTWMEASURE
#PLTFLAGS += -DFFTW_TRANSPOSE
PLTFLAGS += -DFFTW3_2D
FFTWDIR=$(HOME)/software/fftw/fftw-3.3.4
FFTWINCLUDEDIR=$(FFTWDIR)/api
FFTWLIBDIR=$(FFTWDIR)/.libs
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -lfftw3
endif
ifeq ($(FFT),ESSL)
$(error ESSL library not available)
endif
ifeq ($(FFT),NOLIB)
PLTFLAGS += -DFFT_NOLIB
endif
INCLUDE += -I$(MPIDIR)/include -I$(XERCESCDIR)/include
CXXFLAGS= -g -O3 -vec-report1 -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBPATH += -L$(MPIDIR)/lib64 \
-L$(MKLDIR)/lib/intel64 \
-L$(XERCESCDIR)/lib
LIBS += $(PLIBS) \
-lmkl_intel_lp64 \
-lmkl_lapack95_lp64 -lmkl_sequential -lmkl_core \
-lirc -lifcore -lsvml \
-luuid $(XERCESCDIR)/lib/libxerces-c.a -lpthread
# Parallel libraries
PLIBS = -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64
LDFLAGS = $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# icc_mkl_omp.mk
#
#-------------------------------------------------------------------------------
#
PLT=x86_64
#-------------------------------------------------------------------------------
MPIDIR=/opt/openmpi
XERCESCDIR=/share/apps/xerces/xerces-c-src_2_8_0
PLTOBJECTS = readTSC.o
CXX=icc
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
# FFT must be FFTW2, FFTW3, ESSL or NOLIB
FFT=FFTW2
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 += -DFFTWMEASURE
#PLTFLAGS += -DFFTW_TRANSPOSE
PLTFLAGS += -DFFTW3_2D
FFTWDIR=$(HOME)/software/fftw/fftw-3.3.4
FFTWINCLUDEDIR=$(FFTWDIR)/api
FFTWLIBDIR=$(FFTWDIR)/.libs
INCLUDE += -I$(FFTWINCLUDEDIR)
LIBPATH += -L$(FFTWLIBDIR)
LIBS += -lfftw3
endif
ifeq ($(FFT),ESSL)
$(error ESSL library not available)
endif
ifeq ($(FFT),NOLIB)
PLTFLAGS += -DFFT_NOLIB
endif
INCLUDE += -I$(MPIDIR)/include -I$(XERCESCDIR)/include
CXXFLAGS= -g -openmp -O3 -vec-report1 -D$(PLT) \
$(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBPATH += -L$(MPIDIR)/lib64 \
-L$(MKLDIR)/lib/intel64 \
-L$(XERCESCDIR)/lib
LIBS += $(PLIBS) \
-lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread \
-lifcoremt -lirc -lsvml \
-luuid $(XERCESCDIR)/lib/libxerces-c.a -liomp5 -lpthread
# Parallel libraries
PLIBS = -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64
LDFLAGS = $(LIBPATH) $(LIBS)
#-------------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment