From 28cc3283cdd118ed578cb9151d9d7f715d15b6c4 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 15 Apr 2020 09:50:57 +0200 Subject: [PATCH 1/3] Update makefile for cbind. --- cbind/mlprec/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cbind/mlprec/Makefile b/cbind/mlprec/Makefile index 37231cda..21f7db31 100644 --- a/cbind/mlprec/Makefile +++ b/cbind/mlprec/Makefile @@ -14,7 +14,7 @@ OBJS=mld_prec_cbind_mod.o mld_dprec_cbind_mod.o mld_c_dprec.o mld_zprec_cbind_m CMOD=mld_cbind.h mld_c_dprec.h mld_c_zprec.h mld_const.h -LIBMOD=mld_prec_cbind_mod$(.mod) +LIBMOD=mld_prec_cbind_mod$(.mod) mld_dprec_cbind_mod$(.mod) mld_zprec_cbind_mod$(.mod) LOCAL_MODS=$(LIBMOD) #LIBNAME=$(CPRECLIBNAME) From e4e7d8970ef246d3605227131deca512e9d699c3 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 17 Apr 2020 16:22:42 +0200 Subject: [PATCH 2/3] Move call to ac%fix --- mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 | 2 +- mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 | 2 +- mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 | 2 +- mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 index d06878de..0e75eb30 100644 --- a/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 @@ -170,10 +170,10 @@ subroutine mld_c_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) + call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza - call ac_coo%fix(info) call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) diff --git a/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 index aeac233e..0d85c647 100644 --- a/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 @@ -170,10 +170,10 @@ subroutine mld_d_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) + call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza - call ac_coo%fix(info) call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) diff --git a/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 index 0eff8d64..4ae68bbb 100644 --- a/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 @@ -170,10 +170,10 @@ subroutine mld_s_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) + call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza - call ac_coo%fix(info) call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) diff --git a/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 index d664e1d1..98aa63f2 100644 --- a/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 @@ -170,10 +170,10 @@ subroutine mld_z_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) + call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza - call ac_coo%fix(info) call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) From d2aeeb9dae1cad6d93fb58bf1a56b656ac0d04d6 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 18 Apr 2020 17:59:36 +0200 Subject: [PATCH 3/3] Improve structure of Makefiles --- Makefile | 4 ++-- cbind/Makefile | 4 ++-- mlprec/Makefile | 4 ++-- mlprec/impl/Makefile | 16 ++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 24e08cc2..8e727371 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,9 @@ libdir: mlp: - cd mlprec && $(MAKE) all + $(MAKE) -C mlprec all cbnd: mlp - cd cbind && $(MAKE) all + $(MAKE) -C cbind all install: all mkdir -p $(INSTALL_LIBDIR) &&\ $(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR) diff --git a/cbind/Makefile b/cbind/Makefile index 663fda86..a7cc9917 100644 --- a/cbind/Makefile +++ b/cbind/Makefile @@ -15,11 +15,11 @@ lib: mlprecd mlprecd: - cd mlprec && $(MAKE) lib LIBNAME=$(LIBNAME) + $(MAKE) -C mlprec lib LIBNAME=$(LIBNAME) clean: - cd mlprec && $(MAKE) clean + $(MAKE) -C mlprec clean veryclean: clean diff --git a/mlprec/Makefile b/mlprec/Makefile index 7b5b3d24..76a4a699 100644 --- a/mlprec/Makefile +++ b/mlprec/Makefile @@ -55,7 +55,7 @@ LIBNAME=libmld_prec.a all: lib impld impld: $(OBJS) - cd impl && $(MAKE) + $(MAKE) -C impl lib: $(OBJS) impld $(AR) $(HERE)/$(LIBNAME) $(OBJS) @@ -172,4 +172,4 @@ clean: implclean /bin/rm -f $(OBJS) $(LOCAL_MODS) *$(.mod) implclean: - cd impl && $(MAKE) clean + $(MAKE) -C impl clean diff --git a/mlprec/impl/Makefile b/mlprec/impl/Makefile index 27842294..3a527d23 100644 --- a/mlprec/impl/Makefile +++ b/mlprec/impl/Makefile @@ -72,13 +72,13 @@ lib: $(OBJS) aggrd levd smoothd solvd $(RANLIB) $(HERE)/$(LIBNAME) aggrd: - cd aggregator && $(MAKE) + $(MAKE) -C aggregator levd: - cd level && $(MAKE) + $(MAKE) -C level smoothd: - cd smoother && $(MAKE) + $(MAKE) -C smoother solvd: - cd solver && $(MAKE) + $(MAKE) -C solver mpobjs: (make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)") @@ -91,10 +91,10 @@ clean: solvclean smoothclean levclean aggrclean /bin/rm -f $(OBJS) $(LOCAL_MODS) aggrclean: - cd aggregator && $(MAKE) clean + $(MAKE) -C aggregator clean levclean: - cd level && $(MAKE) clean + $(MAKE) -C level clean smoothclean: - cd smoother && $(MAKE) clean + $(MAKE) -C smoother clean solvclean: - cd solver && $(MAKE) clean + $(MAKE) -C solver clean