icc_mkl.mk 1.92 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
#-------------------------------------------------------------------------------
#
#  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)
#-------------------------------------------------------------------------------