Fedora .mk file
Posted: Fri Mar 14, 2014 6:34 am
I put together this .mk file for Fedora. Tested on Fedora 20 and openmpi after `yum install openmpi-devel libscalapack-devel libblacs-devel libuuid-devel` and setting openmpi as the default module `module load mpi/openmpi-x86_64`.
Code: Select all
#-------------------------------------------------------------------------------
#
# fedoraopenmpi.mk
#
#-------------------------------------------------------------------------------
# $Id: fedoraopenmpi.mk,v 1.0 $
#
PLT=LINUX
#-------------------------------------------------------------------------------
XERCESCDIR=/usr/lib64
XERCESCLIBDIR=$(XERCESCDIR)/lib64
XERCESLIB=-lxerces-c
FFTWDIR=/usr/lib64
FFTWLIB=-lfftw
BLASDIR=/usr/lib64/openmpi/lib
BLASLIB=-lblas
CXX=mpic++
LD=$(CXX)
DFLAGS += -DUSE_FFTW -DUSE_CSTDIO_LFS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DXML -DUSE_XERCES -DXERCESC_3
INCLUDE =
CXXFLAGS= -g -O3 -DUSE_MPI -DSCALAPACK -DADD_ -D$(PLT) $(INCLUDE) $(DFLAGS)
LIBPATH =
LIBS = $(PLIBS) -openmp -L$(FFTWLIB) $(FFTWLIB) -lgfortran -luuid -llapack -L$(BLASDIR) $(BLASLIB) -L$(XERCESCLIBDIR) $(XERCESLIB)
LDFLAGS = $(LIBS)
PLAT=FEDORA-OPENMPI
# Blacs libraries
BLACSDBGLVL = 0
BLACSdir =
BLACSFINIT = -lmpiblacsF77init
BLACSCINIT = -lmpiblacsCinit
BLACSLIB = -lmpiblacs
CBLACSLIB = $(BLACSCINIT) $(BLACSLIB) $(BLACSCINIT)
FBLACSLIB = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT)
# Scalapack libraries
SCALAPACK_DIR =
SCALAPACKLIB = -lscalapack
TOOLSLIB =
REDISTLIB =
PLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SCALAPACKLIB)
#-------------------------------------------------------------------------------