From 357d80553f75048c0995992b1d894c4e50d1721a Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 14 Nov 2013 09:57:20 +0000 Subject: [PATCH] mld2p4-2: Makefile examples/fileread/Makefile examples/pdegen/Makefile mlprec/Makefile mlprec/impl/Makefile mlprec/impl/level/Makefile mlprec/impl/smoother/Makefile mlprec/impl/solver/Makefile tests/fileread/Makefile tests/fileread/df_sample.f90 tests/newslv/Makefile tests/pdegen/Makefile Fix INCDIR. --- Makefile | 11 +++++++++-- examples/fileread/Makefile | 5 +++-- examples/pdegen/Makefile | 5 +++-- mlprec/Makefile | 4 ++-- mlprec/impl/Makefile | 3 ++- mlprec/impl/level/Makefile | 3 ++- mlprec/impl/smoother/Makefile | 3 ++- mlprec/impl/solver/Makefile | 3 ++- tests/fileread/Makefile | 5 +++-- tests/fileread/df_sample.f90 | 16 +++++++++------- tests/newslv/Makefile | 5 +++-- tests/pdegen/Makefile | 5 +++-- 12 files changed, 43 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index f5bb99bc..014d0758 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,9 @@ library: libdir mlp libdir: (if test ! -d lib ; then mkdir lib; fi) + (if test ! -d include ; then mkdir include; fi) + ($(INSTALL_DATA) Make.inc include/Make.inc.mld2p4) + mlp: cd mlprec && $(MAKE) all @@ -15,11 +18,15 @@ install: all (./mkdir.sh $(INSTALL_LIBDIR) &&\ $(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR)) (./mkdir.sh $(INSTALL_INCLUDEDIR) && \ - $(INSTALL_DATA) lib/*$(.mod) $(INSTALL_INCLUDEDIR)) + $(INSTALL_DATA) include/*$(.mod) $(INSTALL_INCLUDEDIR)) + (./mkdir.sh $(INSTALL_INCLUDEDIR) &&\ + $(INSTALL_DATA) Make.inc $(INSTALL_INCLUDEDIR)/Make.inc.mld2p4) (./mkdir.sh $(INSTALL_INCLUDEDIR) && \ - $(INSTALL_DATA) lib/*.h $(INSTALL_INCLUDEDIR)) + $(INSTALL_DATA) include/*.h $(INSTALL_INCLUDEDIR)) (./mkdir.sh $(INSTALL_DOCSDIR) && \ /bin/cp -fr docs/*pdf docs/html $(INSTALL_DOCSDIR)) + (./mkdir.sh $(INSTALL_DOCSDIR) && \ + $(INSTALL_DATA) README LICENSE $(INSTALL_DOCSDIR)) veryclean: (cd mlprec; make veryclean) (cd lib; /bin/rm -f *.a *$(.mod)) diff --git a/examples/fileread/Makefile b/examples/fileread/Makefile index 5513170d..da736c58 100644 --- a/examples/fileread/Makefile +++ b/examples/fileread/Makefile @@ -1,11 +1,12 @@ MLDDIR=../.. -include $(MLDDIR)/Make.inc +MLDINCDIR=$(MLDDIR)/include +include $(MLDINCDIR)/Make.inc.mld2p4 PSBLIBDIR=$(PSBLASDIR)/lib/ PSBINCDIR=$(PSBLASDIR)/include MLDLIBDIR=$(MLDDIR)/lib MLD_LIB=-L$(MLDLIBDIR) -lmld_prec PSBLAS_LIB= -L$(PSBLIBDIR) -lpsb_krylov -lpsb_prec -lpsb_util -lpsb_base -FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). +FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). DMOBJS=mld_dexample_ml.o data_input.o D1OBJS=mld_dexample_1lev.o data_input.o diff --git a/examples/pdegen/Makefile b/examples/pdegen/Makefile index 81d5b9a3..b49b60e4 100644 --- a/examples/pdegen/Makefile +++ b/examples/pdegen/Makefile @@ -1,11 +1,12 @@ MLDDIR=../.. -include $(MLDDIR)/Make.inc +MLDINCDIR=$(MLDDIR)/include +include $(MLDINCDIR)/Make.inc.mld2p4 PSBLIBDIR=$(PSBLASDIR)/lib/ PSBINCDIR=$(PSBLASDIR)/include MLDLIBDIR=$(MLDDIR)/lib MLD_LIB=-L$(MLDLIBDIR) -lmld_prec PSBLAS_LIB= -L$(PSBLIBDIR) -lpsb_krylov -lpsb_prec -lpsb_util -lpsb_base -FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). +FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). DMOBJS=mld_dexample_ml.o data_input.o D1OBJS=mld_dexample_1lev.o data_input.o diff --git a/mlprec/Makefile b/mlprec/Makefile index 60004d8b..3d3adced 100644 --- a/mlprec/Makefile +++ b/mlprec/Makefile @@ -1,5 +1,6 @@ include ../Make.inc LIBDIR=../lib +INCDIR=../include PSBLIBDIR=$(PSBLASDIR)/lib PSBINCDIR=$(PSBLASDIR)/include HERE=. @@ -36,7 +37,6 @@ MODOBJS=mld_base_prec_type.o mld_prec_type.o mld_prec_mod.o \ OBJS=$(MODOBJS) -#LIBMOD=mld_prec_mod$(.mod) LOCAL_MODS=$(MODOBJS:.o=$(.mod)) LIBNAME=libmld_prec.a @@ -49,7 +49,7 @@ lib: $(OBJS) impld $(AR) $(HERE)/$(LIBNAME) $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) - /bin/cp -p *$(.mod) mld_const.h $(LIBDIR) + /bin/cp -p *$(.mod) mld_const.h $(INCDIR) $(MODOBJS): $(PSBINCDIR)/$(BASEMODNAME)$(.mod) diff --git a/mlprec/impl/Makefile b/mlprec/impl/Makefile index e66f699b..300d9816 100644 --- a/mlprec/impl/Makefile +++ b/mlprec/impl/Makefile @@ -1,10 +1,11 @@ include ../../Make.inc LIBDIR=../../lib +INCDIR=../../include PSBLIBDIR=$(PSBLASDIR)/lib PSBINCDIR=$(PSBLASDIR)/include HERE=.. -FINCLUDES=$(FMFLAG).. $(FMFLAG)$(LIBDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) +FINCLUDES=$(FMFLAG).. $(FMFLAG)$(INCDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) DMPFOBJS=mld_daggrmat_nosmth_asb.o mld_daggrmat_smth_asb.o mld_daggrmat_minnrg_asb.o mld_daggrmat_biz_asb.o diff --git a/mlprec/impl/level/Makefile b/mlprec/impl/level/Makefile index d90f44aa..bd50f2a0 100644 --- a/mlprec/impl/level/Makefile +++ b/mlprec/impl/level/Makefile @@ -1,10 +1,11 @@ include ../../../Make.inc LIBDIR=../../../lib +INCDIR=../../../include PSBLIBDIR=$(PSBLASDIR)/lib PSBINCDIR=$(PSBLASDIR)/include HERE=../.. -FINCLUDES=$(FMFLAG)../.. $(FMFLAG)$(LIBDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) +FINCLUDES=$(FMFLAG)../.. $(FMFLAG)$(INCDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) OBJS=mld_c_base_onelev_check.o \ diff --git a/mlprec/impl/smoother/Makefile b/mlprec/impl/smoother/Makefile index 49429c8d..16add2fe 100644 --- a/mlprec/impl/smoother/Makefile +++ b/mlprec/impl/smoother/Makefile @@ -1,10 +1,11 @@ include ../../../Make.inc LIBDIR=../../../lib +INCDIR=../../../include PSBLIBDIR=$(PSBLASDIR)/lib PSBINCDIR=$(PSBLASDIR)/include HERE=../.. -FINCLUDES=$(FMFLAG)../.. $(FMFLAG)$(LIBDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) +FINCLUDES=$(FMFLAG)../.. $(FMFLAG)$(INCDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) OBJS=mld_c_as_smoother_apply.o \ diff --git a/mlprec/impl/solver/Makefile b/mlprec/impl/solver/Makefile index 27e6723d..db7ddb78 100644 --- a/mlprec/impl/solver/Makefile +++ b/mlprec/impl/solver/Makefile @@ -1,10 +1,11 @@ include ../../../Make.inc LIBDIR=../../../lib +INCDIR=../../../include PSBLIBDIR=$(PSBLASDIR)/lib PSBINCDIR=$(PSBLASDIR)/include HERE=../.. -FINCLUDES=$(FMFLAG)../.. $(FMFLAG)$(LIBDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) +FINCLUDES=$(FMFLAG)../.. $(FMFLAG)$(INCDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBDIR) OBJS=mld_c_base_solver_apply.o \ diff --git a/tests/fileread/Makefile b/tests/fileread/Makefile index 45895eb7..4a1456d3 100644 --- a/tests/fileread/Makefile +++ b/tests/fileread/Makefile @@ -1,11 +1,12 @@ MLDDIR=../.. -include $(MLDDIR)/Make.inc +MLDINCDIR=$(MLDDIR)/include +include $(MLDINCDIR)/Make.inc.mld2p4 PSBLIBDIR=$(PSBLASDIR)/lib/ PSBINCDIR=$(PSBLASDIR)/include MLDLIBDIR=$(MLDDIR)/lib MLD_LIB=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec PSBLAS_LIB= -L$(PSBLIBDIR) -lpsb_util -lpsb_base -FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). +FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). DFSOBJS=df_sample.o data_input.o SFSOBJS=sf_sample.o data_input.o diff --git a/tests/fileread/df_sample.f90 b/tests/fileread/df_sample.f90 index a94ea92f..98b85cae 100644 --- a/tests/fileread/df_sample.f90 +++ b/tests/fileread/df_sample.f90 @@ -276,13 +276,15 @@ program df_sample else nlv = 1 call mld_precinit(prec,prec_choice%prec,info) - call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info) - call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info) - call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info) - call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info) - call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info) - call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info) - call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info) + if (psb_toupper(prec_choice%prec) /= 'NONE') then + call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info) + call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info) + call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info) + call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info) + call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info) + call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info) + call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info) + end if end if ! building the preconditioner diff --git a/tests/newslv/Makefile b/tests/newslv/Makefile index 4f07fa1b..bc49d0fc 100644 --- a/tests/newslv/Makefile +++ b/tests/newslv/Makefile @@ -1,11 +1,12 @@ MLDDIR=../.. -include $(MLDDIR)/Make.inc +MLDINCDIR=$(MLDDIR)/include +include $(MLDINCDIR)/Make.inc.mld2p4 PSBLIBDIR=$(PSBLASDIR)/lib/ PSBINCDIR=$(PSBLASDIR)/include MLDLIBDIR=$(MLDDIR)/lib MLD_LIB=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec PSBLAS_LIB= -L$(PSBLIBDIR) -lpsb_util -lpsb_base -FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). +FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). PD3DOBJS=ppde3d.o data_input.o mld_d_tlu_solver.o mld_d_tlu_solver_impl.o PSOBJS=spde.o data_input.o diff --git a/tests/pdegen/Makefile b/tests/pdegen/Makefile index 0c95cf6b..003c59ee 100644 --- a/tests/pdegen/Makefile +++ b/tests/pdegen/Makefile @@ -1,11 +1,12 @@ MLDDIR=../.. -include $(MLDDIR)/Make.inc +MLDINCDIR=$(MLDDIR)/include +include $(MLDINCDIR)/Make.inc.mld2p4 PSBLIBDIR=$(PSBLASDIR)/lib/ PSBINCDIR=$(PSBLASDIR)/include MLDLIBDIR=$(MLDDIR)/lib MLD_LIB=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec PSBLAS_LIB= -L$(PSBLIBDIR) -lpsb_util -lpsb_base -FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). +FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). EXEDIR=./runs