Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92610166
Makefile
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 22, 00:19
Size
11 KB
Mime Type
text/x-makefile
Expires
Sun, Nov 24, 00:19 (2 d)
Engine
blob
Format
Raw Data
Handle
22437926
Attached To
rSPCLIBS SPClibs
Makefile
View Options
#
# @file Makefile
#
# @brief
#
# @copyright
# Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
# SPC (Swiss Plasma Center)
#
# SPClibs is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# SPClibs is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# @author
# (in alphabetical order)
# @author Emmanuel Lanti <emmanuel.lanti@epfl.ch>
# @author Trach-Minh Tran <trach-minh.tran@epfl.ch>
#
PREFIX=$(HOME)
XGRAFIX=/usr/local/xgrafix_1.2/src-double
# FUTILS=/usr/local/crpp/futils
# BSPLINES=/usr/local/crpp/bsplines
# PPUTILS2=../pputils2
# PPPACK=../pppack
# SLATEC=/usr/local/slatec
# FFTW=/usr/local/fftw-2.1.5-opt
ARPACK=/usr/local/ARPACK
LAPACK95=$(MKL)/../../../mkl/include/intel64/lp64
MPIF90 = mpif90
F90 = ifort
LD = $(MPIF90)
debug = -g -traceback -check bounds -warn alignments -warn unused
optim = -O3 -xHOST
OPT=$(debug)
#OPT=$(optim)
F90FLAGS = $(OPT) -fPIC -I../fft -I$(BSPLINES)/include -I$(FUTILS)/include \
-I$(FFTW)/include -I$(MKL)/../../include/intel64/lp64
LDFLAGS = $(OPT) -fPIC -L$(FUTILS)/lib -L$(BSPLINES)/lib -L${HDF5}/lib -L$(FFTW)/lib64 \
-L$(SLATEC)/lib -L$(ARPACK)
CC = cc
CFLAGS = -O2
LIBS = -mkl=cluster -lbsplines -lpppack -lpppack -lpputils2 -lfutils -lfft -larpack \
-lfftw -lhdf5_fortran -lhdf5 -lz -lpthread
LIBS1 = -mkl=cluster -lbsplines1 -lpppack -lfutils \
-lhdf5_fortran -lhdf5 -lz -lsz -lpthread
ifdef WSMP
LDFLAGS += -L$(WSMP)
LIBS += -lwsmp64
LIBS1 += -lpwsmp64
endif
ifdef MUMPS
F90FLAGS += -I$(MUMPS)/include -I$(LAPACK95)
LDFLAGS += -L$(MUMPS)/lib -L$(PARMETIS)/lib
LIBS += $(MUMPSLIBS)
endif
ifdef PETSC_DIR
include ${PETSC_DIR}/conf/variables
F90FLAGS += -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include \
-I$(MKL)/../../include
LIBS += ${PETSC_FORTRAN_LIB} ${PETSC_KSP_LIB}
endif
PDE1DOBJS = pde1d.o
PDE2DOBJS = pde2d.o dismat.o disrhs.o ibcmat.o
FIT1DOBJJS = fit1d.o
.SUFFIXES:
.SUFFIXES: .o .c .f90 .f
.f90.o:
$(MPIF90) $(F90FLAGS) -c $<
.f.o:
$(F90) $(F90FLAGS) -c $<
all: examples tmat
EX_FILES = driv1 driv2 driv3 driv4 pde1d pde1dp pde1dp_cmpl pde3d ppde3d ppde3d_pb \
pde2d pde2d_pb fit1d fit1dbc \
fit1dp fit2d fit2d1d fit2d_cmpl fit2dbc fit2dbc_x fit2dbc_y \
moments optim1 optim2 optim3 tmassmat tbasfun tcdsmat tsparse1 tsparse2 \
pde2d_pardiso pde2d_sym_pardiso pde1dp_cmpl_pardiso pde1dp_cmpl_dft \
pde2d_sym_pardiso_dft \
pde1d_eig_csr pde1d_eig_gb pde1d_eig_ge
ifdef WSMP
EX_FILES += pde2d_wsmp pde2d_pwsmp pde2d_sym_wsmp pde1dp_cmpl_wsmp
endif
ifdef MUMPS
EX_FILES += pde2d_mumps pde1dp_cmpl_mumps pde1d_eig_zmumps
endif
ifdef PETSC_DIR
EX_FILES += pde2d_petsc
endif
examples: $(EX_FILES)
tmat: tmatrix_gb tmatrix_pb tmatrix_zpb
adv: adv.o extra.o
$(LD) $(LDFLAGS) -L$(XGRAFIX) -o $@ $< extra.o $(LIBS) \
-lfftw -lXGF -lXGC -lX11
cp -p $@ ../bin/
driv1: driv1.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
driv2: driv2.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
driv3: driv3.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
driv4: driv4.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde1d: $(PDE1DOBJS)
$(LD) $(LDFLAGS) -o $@ $(PDE1DOBJS) $(LIBS)
cp -p $@ ../bin/
pde1d_eig_csr: pde1d_eig_csr.o
$(LD) $(LDFLAGS) -o $@ pde1d_eig_csr.o $(LIBS) -lpputils2
cp -p $@ ../bin/
pde1d_eig_zcsr: pde1d_eig_zcsr.o
$(LD) $(LDFLAGS) -o $@ pde1d_eig_zcsr.o $(LIBS)
cp -p $@ ../bin/
pde1d_eig_zmumps: pde1d_eig_zmumps.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS) -lpputils2
cp -p $@ ../bin/
pde1d_eig_zcsr: pde1d_eig_zcsr.o
$(LD) $(LDFLAGS) -o $@ pde1d_eig_zcsr.o $(LIBS)
cp -p $@ ../bin/
pde1d_eig_gb: pde1d_eig_gb.o
$(LD) $(LDFLAGS) -o $@ pde1d_eig_gb.o $(LIBS)
cp -p $@ ../bin/
pde1d_eig_ge: pde1d_eig_ge.o
$(LD) $(LDFLAGS) -o $@ pde1d_eig_ge.o $(LIBS)
cp -p $@ ../bin/
pde1dp: pde1dp.o pde1dp_mod.o
$(LD) $(LDFLAGS) -o $@ pde1dp.o pde1dp_mod.o $(LIBS)
cp -p $@ ../bin/
pde1dp_cmpl: pde1dp_cmpl.o
$(LD) $(LDFLAGS) -o $@ pde1dp_cmpl.o $(LIBS)
cp -p $@ ../bin/
pde1dp_KA: pde1dp_KA.o pde1dp_mod_KA.o
$(LD) $(LDFLAGS) -o $@ pde1dp_KA.o pde1dp_mod_KA.o $(LIBS)
cp -p $@ ../bin/
pde2d: $(PDE2DOBJS)
$(LD) $(LDFLAGS) -o $@ $(PDE2DOBJS) $(LIBS)
cp -p $@ ../bin/
pde3d: pde3d.o pde3d_mod.o
$(LD) $(LDFLAGS) -o $@ pde3d.o pde3d_mod.o $(LIBS)
cp -p $@ ../bin/
ppde3d: ppde3d.o ppde3d_mod.o
$(LD) $(LDFLAGS) -o $@ ppde3d.o ppde3d_mod.o $(LIBS)
cp -p $@ ../bin/
ppde3d_pb: ppde3d_pb.o ppde3d_pb_mod.o
$(LD) $(LDFLAGS) -o $@ ppde3d_pb.o ppde3d_pb_mod.o $(LIBS)
cp -p $@ ../bin/
pde2d_pb: pde2d_pb.o
$(LD) $(LDFLAGS) -o $@ pde2d_pb.o $(LIBS)
cp -p $@ ../bin/
pde2d_nh: pde2d_nh.o
$(LD) $(LDFLAGS) -o $@ pde2d_nh.o $(LIBS)
cp -p $@ ../bin/
tcdsmat: tcdsmat.o tcdsmat_mod.o meshdist.o
$(LD) $(LDFLAGS) -o $@ tcdsmat.o tcdsmat_mod.o meshdist.o $(LIBS)
cp -p $@ ../bin/
tmatrix_pb: tmatrix_pb.o
$(LD) $(LDFLAGS) -o $@ tmatrix_pb.o $(LIBS)
cp -p $@ ../bin/
tmatrix_zpb: tmatrix_zpb.o
$(LD) $(LDFLAGS) -o $@ tmatrix_zpb.o $(LIBS)
cp -p $@ ../bin/
tmatrix_gb: tmatrix_gb.o
$(LD) $(LDFLAGS) -o $@ tmatrix_gb.o $(LIBS)
cp -p $@ ../bin/
fit1d: $(FIT1DOBJJS)
$(LD) $(LDFLAGS) -o $@ $(FIT1DOBJJS) $(LIBS)
cp -p $@ ../bin/
fit1d_cmpl: fit1d_cmpl.o
$(LD) $(LDFLAGS) -o $@ fit1d_cmpl.o $(LIBS)
cp -p $@ ../bin/
gyro: gyro.o
$(LD) $(LDFLAGS) -o $@ gyro.o -lslatec $(LIBS)
cp -p $@ ../bin/
fit1dbc: fit1dbc.o
$(LD) $(LDFLAGS) -o $@ fit1dbc.o $(LIBS)
cp -p $@ ../bin/
fit1dp: fit1dp.o
$(LD) $(LDFLAGS) -o $@ fit1dp.o $(LIBS)
cp -p $@ ../bin/
fit2d: fit2d.o meshdist.o
$(LD) $(LDFLAGS) -o $@ fit2d.o meshdist.o $(LIBS)
cp -p $@ ../bin/
fit2d1d: fit2d1d.o meshdist.o
$(LD) $(LDFLAGS) -o $@ fit2d1d.o meshdist.o $(LIBS)
cp -p $@ ../bin/
fit2d_cmpl: fit2d_cmpl.o meshdist.o
$(LD) $(LDFLAGS) -o $@ fit2d_cmpl.o meshdist.o $(LIBS)
cp -p $@ ../bin/
fit2dbc: fit2dbc.o meshdist.o
$(LD) $(LDFLAGS) -o $@ fit2dbc.o meshdist.o $(LIBS)
cp -p $@ ../bin/
fit2dbc_x: fit2dbc_x.o meshdist.o
$(LD) $(LDFLAGS) -o $@ fit2dbc_x.o meshdist.o $(LIBS)
cp -p $@ ../bin/
fit2dbc_y: fit2dbc_y.o meshdist.o
$(LD) $(LDFLAGS) -o $@ fit2dbc_y.o meshdist.o $(LIBS)
cp -p $@ ../bin/
moments: moments.o
$(LD) $(LDFLAGS) -o $@ moments.o $(LIBS)
cp -p $@ ../bin/
mesh: mesh.o meshdist.o
$(LD) $(LDFLAGS) -o $@ mesh.o meshdist.o $(LIBS)
cp -p $@ ../bin/
optim1: optim1.o
$(LD) $(LDFLAGS) -o $@ optim1.o $(LIBS)
cp -p $@ ../bin/
optim2: optim2.o
$(LD) $(LDFLAGS) -o $@ optim2.o $(LIBS)
cp -p $@ ../bin/
optim3: optim3.o
$(LD) $(LDFLAGS) -o $@ optim3.o $(LIBS)
cp -p $@ ../bin/
tmassmat: tmassmat.o
$(LD) $(LDFLAGS) -o $@ tmassmat.o $(LIBS)
cp -p $@ ../bin/
tbasfun: tbasfun.o
$(LD) $(LDFLAGS) -o $@ tbasfun.o $(LIBS)
cp -p $@ ../bin/
basfun_perf: basfun_perf.o
$(LD) $(LDFLAGS) -o $@ basfun_perf.o $(LIBS)
cp -p $@ ../bin/
gridval_perf: gridval_perf.o
$(LD) $(LDFLAGS) -o $@ gridval_perf.o $(LIBS)
cp -p $@ ../bin/
getgrad_perf: getgrad_perf.o
$(LD) $(LDFLAGS) -o $@ getgrad_perf.o $(LIBS)
cp -p $@ ../bin/
basfun_perf1: basfun_perf1.o
$(LD) $(LDFLAGS) -o $@ basfun_perf1.o $(LIBS)
cp -p $@ ../bin/
tlocintv: tlocintv.o meshdist.o
$(LD) $(LDFLAGS) -o $@ tlocintv.o meshdist.o $(LIBS)
cp -p $@ ../bin/
tgausleg: tgausleg.o meshdist.o
$(LD) $(LDFLAGS) -o $@ tgausleg.o meshdist.o $(LIBS)
cp -p $@ ../bin/
poisson: poisson.o
$(LD) $(LDFLAGS) -o $@ poisson.o $(LIBS)
cp -p $@ ../bin/
poisson_mumps: poisson_mumps.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
poisson_petsc: poisson_petsc.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
tsparse1: tsparse1.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
tsparse2: tsparse2.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_pardiso: pde2d_pardiso.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_mumps: pde2d_mumps.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_petsc: pde2d_petsc.o $(PPUTILS2)/pputils2.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_sym_pardiso: pde2d_sym_pardiso.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_sym_pardiso_dft: pde2d_sym_pardiso_dft.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_sym_wsmp_dft: pde2d_sym_wsmp_dft.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
zssmp_ex1: zssmp_ex1.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
zpardiso_ex1: zpardiso_ex1.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_sym_wsmp: pde2d_sym_wsmp.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_wsmp: pde2d_wsmp.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde2d_pwsmp: pde2d_pwsmp.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS1)
cp -p $@ ../bin/
pde1dp_cmpl_pardiso: pde1dp_cmpl_pardiso.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde1dp_cmpl_mumps: pde1dp_cmpl_mumps.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde1dp_cmpl_dft: pde1dp_cmpl_dft.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
pde1dp_cmpl_wsmp: pde1dp_cmpl_wsmp.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
tspline: tspline.o
$(LD) $(LDFLAGS) -o $@ tspline.o $(LIBS)
cp -p $@ ../bin/
tpsum_mat: tpsum_mat.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
tp2p_mat: tp2p_mat.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
cp -p $@ ../bin/
test_pwsmp: test_pwsmp.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS1)
cp -p $@ ../bin/
driv1.o:
driv2.o:
driv3.o:
driv4.o:
pde1d.o:
pde1dp.o: pde1dp_mod.o
pde1dp_cmpl.o:
pde1dp_mod.o:
pde1dp_KA.o: pde1dp_mod_KA.o
pde1dp_mod_KA.o:
pde2d.o:
pde3d.o: pde3d_mod.o
pde3d_mod.o:
ppde3d.o: ppde3d_mod.o
ppde3d_mod.o:
ppde3d_pb.o: ppde3d_pb_mod.o
ppde3d_pb_mod.o:
pde2d_pb.o:
pde2d_nh.o:
tcdsmat.o: tcdsmat_mod.o
tcdsmat_mod.o:
fit1d.o:
fit1d_cmpl.o:
gyro.o:
fit1dbc.o:
fit1dp.o:
fit2d.o:
fit2d_cmpl.o:
fit2dbc.o:
dismat.o:
disrhs.o:
ibcmat.o:
adv.o:
tmatrix_pb.o:
tmatrix_zpb.o:
tmatrix_gb.o:
moments.o:
mesh.o:
optim1.o:
optim2.o:
optim3.o:
tmassmat.o:
tbasfun.o:
basfun_perf.o:
basfun_perf1.o:
tlocintv.o:
tgausleg.o:
poisson.o:
poisson_mumps.o:
tsparse1.o:
tsparse2.o:
pde2d_pardiso.o:
pde2d_mumps.o:
pde2d_petsc.o:
pde2d_sym_pardiso.o:
pde2d_sym_pardiso_dft.o:
pde2d_sym_wsmp_dft.o:
pde2d_wsmp.o:
pde2d_pwsmp.o:
pde2d_sym_wsmp.o:
pde1dp_cmpl_pardiso.o:
pde1dp_cmpl_mumps.o:
pde1dp_cmpl_dft.o:
pde1dp_cmpl_wsmp.o:
tpsum_mat.o:
tp2p_mat.o:
poisson_petsc.o:
tags:
etags *.f *.f90 ../src/*.f90 $(PPPACK)/*.f90
clean:
rm -f *.o *.mod *~ a.out
distclean: clean
# $(MAKE) -C ../src distclean
# $(MAKE) -C ../fft distclean
# $(MAKE) -C $(PPUTILS2) distclean
rm -f *.a *.mod pde1d pde1dp pde1dp_cmpl pde1dp_KA driv1 driv2 driv3 driv4 \
tmatrix_pb tmatrix_gb tmatrix_zpb \
pde2d pde2d_pb pde2d_nh pde3d ppde3d ppde3d_pb\
fit1d fit1d_cmpl gyro fit1dbc fit1dp \
fit2d fit2d1d fit2d_cmpl fit2dbc \
fit2dbc_x fit2dbc_y adv moments tcdsmat poisson poisson_mumps\
mesh optim1 optim2 optim3 tmassmat tbasfun \
basfun_perf gridval_perf getgrad_perf tlocintv \
tsparse1 tsparse2 \
pde2d_pardiso pde2d_sym_pardiso pde2d_wsmp pde2d_sym_wsmp \
pde1dp_cmpl_dft pde1dp_cmpl_wsmp pde1d_eig_csr pde1d_eig_pb pde1d_eig_ge \
pde2d_sym_pardiso_dft pde1dp_cmpl_pardiso \
pde2d_mumps pde1dp_cmpl_mumps tpsum_mat tp2p_mat pde2d_sym_wsmp_dft \
poisson_petsc pde2d_petsc \
pde1d_eig_csr pde1d_eig_zcsr pde1d_eig_zmumps pde1d_eig_gb pde1d_eig.ge \
../bin/*
Event Timeline
Log In to Comment