bgq-anl-omp.mk 2.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
#-------------------------------------------------------------------------------
#
#  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)
#-------------------------------------------------------------------------------