bgl.mk 2.53 KB
Newer Older
Francois Gygi committed
1 2 3 4 5
#-------------------------------------------------------------------------------
#
#  bgl.mk
#
#-------------------------------------------------------------------------------
Francois Gygi committed
6
# $Id: bgl.mk,v 1.2 2005-04-26 19:08:12 fgygi Exp $
Francois Gygi committed
7 8 9 10
#
 PLT=BGL
#-------------------------------------------------------------------------------
 BGL_ROOT=/bgl/BlueLight/ppcfloor
Francois Gygi committed
11
 BGL_SYS=$(BGL_ROOT)/bglsys
Francois Gygi committed
12 13 14 15 16 17 18 19 20 21 22 23

 LIBS_MPI     += -L $(BGL_ROOT)/bglsys/lib -lmpich.rts \
                 -lmsglayer.rts -lrts.rts -ldevices.rts

 GNU_ROOT=/BlueLight/ppcfloor
 BLRTS_GNU_ROOT=$(GNU_ROOT)/blrts-gnu
 CXX=/opt/ibmcmp/vacpp/7.0/bin/blrts_xlC

 LD=$(CXX)
 PLTFLAGS += -DUSE_FFTW \
             -DUSE_MPI -DSCALAPACK \
             -D__linux__ -DPLT_BIG_ENDIAN -DUSE_XERCES \
Francois Gygi committed
24 25
             -DUSE_CSTDIO_LFS -D_LARGEFILE64_SOURCE  -D_FILE_OFFSET_BITS=64 \
             -DUSE_APC 
Francois Gygi committed
26 27 28 29 30

 FFTWDIR=$(HOME)/software/fftw/bgl/bglfftwgel-2.1.5.pre5
 FFTWINCLUDEDIR=$(FFTWDIR)/fftw
 FFTWLIBDIR=$(FFTWDIR)/fftw/.libs

Francois Gygi committed
31 32 33 34 35
 APCDIR=$(HOME)/Ctools/counters/bglusr
 APCINCLUDEDIR=$(APCDIR)/include
 APCLIBDIR=$(APCDIR)/lib
 APCLIB=-L$(APCLIBDIR) -lapc.rts -L$(BGL_SYS)/lib -lbgl_perfctr.rts

Francois Gygi committed
36 37 38 39 40 41 42 43
 XERCESCDIR=$(HOME)/software/xml/xerces-c-src_2_6_0
 XERCESCLIBDIR=$(XERCESCDIR)/lib


#BLASDIR=/bgl/local/lib
 BLASDIR=$(HOME)/software/blas/lib

 INCLUDE =  -I$(XERCESCDIR)/include \
Francois Gygi committed
44 45
            -I$(FFTWINCLUDEDIR) -I$(BGL_ROOT)/bglsys/include \
            -I$(APCINCLUDEDIR)
Francois Gygi committed
46 47 48 49 50

 CXXFLAGS= -g -O3 -qarch=440 -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)

 LIBPATH = -L$(FFTWLIBDIR) \
           -L$(BLASDIR) -L$(XERCESCLIBDIR) \
Francois Gygi committed
51
           -L/opt/ibmcmp/xlf/9.1/blrts_lib -L$(APCLIBDIR)
Francois Gygi committed
52 53

 LIBS =  $(PLIBS) -lfftw $(BLASLIB) -lg2c \
Francois Gygi committed
54 55
         -lxlf90 -lxlopt -lxlomp_ser -lxl -lxlfmath -lmassv -lxerces-c \
         $(APCLIB)
Francois Gygi committed
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

 LDFLAGS = $(LIBPATH) $(LIBS) $(LIBS_MPI)

 PLAT=BGL
 # Blacs libraries
 BLACSDBGLVL   = 0
 BLACSdir      = $(HOME)/software/blacs/bgl/BLACS/LIB
 BLACSCINIT    = $(BLACSdir)/blacsCinit_MPI-$(PLAT)-$(BLACSDBGLVL).a
 BLACSLIB      = $(BLACSdir)/blacs_MPI-$(PLAT)-$(BLACSDBGLVL).a
 CBLACSLIB     = $(BLACSCINIT) $(BLACSLIB) $(BLACSCINIT)

 # Scalapack libraries
 SCALAPACK_DIR = $(HOME)/software/scalapack/bgl/SCALAPACK
 PBLASLIB      = $(SCALAPACK_DIR)/pblas_$(PLAT).a
 SCALAPACKLIB  = $(SCALAPACK_DIR)/libscalapack.a

LAPACKLIB = -llapack440
BLASLIB = -ldgemm.rts -lblas440

 # Parallel libraries
 PLIBS = $(SCALAPACKLIB) $(CBLACSLIB)

#-------------------------------------------------------------------------------
.C.s:
	$(CXX) $(CXXFLAGS) $(INCLUDE) -S $<
#-------------------------------------------------------------------------------