
FC = mpif90

# Intel Composer XE
FFLAGS = -O3 -traceback
LFLAGS = -O3 -mkl

# GCC gfortran
#FFLAGS = -O3
#LFLAGS = -O3

# ScaLAPACK, LAPACK, FFTW
SCALAPACK_LIB = -L/usr/local/scalapack -lscalapack
LAPACK_LIB = -L/usr/local/lapack -llapack -lblas
FFT_LIB = -L/usr/local/fftw/lib -lfftw3

# Intel MKL (intel64)
MKLROOT = /opt/intel/composerxe/mkl
SCALAPACK_LIB = -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64
#SCALAPACK_LIB = -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
LAPACK_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
FFT_LIB = -L$(MKLROOT)/interfaces/fftw3xf -lfftw3xf_intel

## Intel MKL (ia32)
#MKLROOT = /opt/intel/composerxe/mkl
# Intel MKL + OpenMPI
#SCALAPACK_LIB = -lmkl_scalapack_core -lmkl_blacs_openmpi
# Intel MKL + Intel MPI
#SCALAPACK_LIB = -lmkl_scalapack_core -lmkl_blacs_intelmpi
#LAPACK_LIB = -lmkl_intel -lmkl_sequential -lmkl_core
#FFT_LIB = -L$(MKLROOT)/interfaces/fftw3xf -lfftw3xf_intel

# K Computer, Fujitsu FX10
#FC = mpifrtpx
#FFLAGS = -Kfast,parallel
#LFLAGS = -Kfast,parallel
#SCALAPACK_LIB = -SCALAPACK 
#LAPACK_LIB = -SSL2BLAMP
#FFT_LIB = -L/home/apps/fftw/3.3/lib64 -lfftw3
#FFT_LIB = -L/usr/local/fftw/3.3/lib64 -lfftw3

LIBS = $(SCALAPACK_LIB) $(LAPACK_LIB) $(FFT_LIB)

