Improve cbind makefile. First working version of test program.

stopcriterion
Salvatore Filippone 5 years ago
parent 4f3ec3264a
commit 1af482fe33

@ -8,9 +8,9 @@ LIBNAME=$(CBINDLIBNAME)
LIBNAME=libmld_cbind.a LIBNAME=libmld_cbind.a
lib: mlprecd lib: mlprecd
# /bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)# /bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
# /bin/cp -p $(CPUPDFLAG) *.h $(INCDIR) /bin/cp -p $(CPUPDFLAG) *.h $(INCDIR)
# /bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR) /bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
mlprecd: mlprecd:
@ -19,7 +19,6 @@ mlprecd:
clean: clean:
cd mlprec && $(MAKE) clean cd mlprec && $(MAKE) clean
cd krylov && $(MAKE) clean
veryclean: clean veryclean: clean

@ -1,8 +1,10 @@
include ../../Make.inc TOP=../..
LIBDIR=../../lib include $(TOP)/Make.inc
INCDIR=../../include LIBDIR=$(TOP)/lib
MODDIR=../../modules INCDIR=$(TOP)/include
MODDIR=$(TOP)/modules
HERE=. HERE=.
DEST=../
CINCLUDES=-I. -I$(LIBDIR) -I$(PSBLAS_INCDIR) CINCLUDES=-I. -I$(LIBDIR) -I$(PSBLAS_INCDIR)
FINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(INCDIR) $(FMFLAG)$(MODDIR) $(PSBLAS_INCLUDES) FINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(INCDIR) $(FMFLAG)$(MODDIR) $(PSBLAS_INCLUDES)
@ -20,8 +22,8 @@ LOCAL_MODS=$(LIBMOD)
lib: $(OBJS) $(CMOD) lib: $(OBJS) $(CMOD)
$(AR) $(HERE)/$(LIBNAME) $(OBJS) $(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME) $(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) /bin/cp -p $(HERE)/$(LIBNAME) $(DEST)
/bin/cp -p $(LIBMOD) $(CMOD) $(INCDIR) /bin/cp -p $(LIBMOD) $(CMOD) $(DEST)
mld_prec_cbind_mod.o: mld_dprec_cbind_mod.o mld_prec_cbind_mod.o: mld_dprec_cbind_mod.o
#mld_prec_cbind_mod.o: psb_prec_cbind_mod.o #mld_prec_cbind_mod.o: psb_prec_cbind_mod.o

@ -19,7 +19,7 @@ extern "C" {
mld_c_dprec* mld_c_new_dprec(); mld_c_dprec* mld_c_new_dprec();
psb_i_t mld_c_delete_dprec(mld_c_dprec* p); psb_i_t mld_c_delete_dprec(mld_c_dprec* p);
psb_i_t mld_c_dprecinit(mld_c_dprec *ph, const char *ptype); psb_i_t mld_c_dprecinit(psb_i_t ictxt, mld_c_dprec *ph, const char *ptype);
psb_i_t mld_c_dprecseti(mld_c_dprec *ph, const char *what, psb_i_t val); psb_i_t mld_c_dprecseti(mld_c_dprec *ph, const char *what, psb_i_t val);
psb_i_t mld_c_dprecsetc(mld_c_dprec *ph, const char *what, const char *val); psb_i_t mld_c_dprecsetc(mld_c_dprec *ph, const char *what, const char *val);
psb_i_t mld_c_dprecsetr(mld_c_dprec *ph, const char *what, double val); psb_i_t mld_c_dprecsetr(mld_c_dprec *ph, const char *what, double val);

@ -327,18 +327,21 @@ int main(int argc, char *argv[])
psb_c_barrier(ictxt); psb_c_barrier(ictxt);
/* Set up the preconditioner */ /* Set up the preconditioner */
ph = mld_c_new_dprec(); ph = mld_c_new_dprec();
mld_c_dprecinit(ph,ptype); mld_c_dprecinit(ictxt,ph,ptype);
mld_c_dprecseti(ph,"SMOOTHER_SWEEPS",2); mld_c_dprecseti(ph,"SMOOTHER_SWEEPS",2);
mld_c_dprecseti(ph,"SUB_FILLIN",1); mld_c_dprecseti(ph,"SUB_FILLIN",1);
mld_c_dprecsetc(ph,"COARSE_SOLVE","BJAC"); mld_c_dprecsetc(ph,"COARSE_SOLVE","BJAC");
mld_c_dprecsetc(ph,"COARSE_SUBSOLVE","ILU"); mld_c_dprecsetc(ph,"COARSE_SUBSOLVE","ILU");
mld_c_dprecseti(ph,"COARSE_FILLIN",1); mld_c_dprecseti(ph,"COARSE_FILLIN",1);
mld_c_dprecbld(ah,cdh,ph); if ((ret=mld_c_dhierarchy_build(ah,cdh,ph))!=0)
fprintf(stderr,"From hierarchy_build: %d\n",ret);
if ((ret=mld_c_dsmoothers_build(ah,cdh,ph))!=0)
fprintf(stderr,"From smoothers_build: %d\n",ret);
psb_c_barrier(ictxt); psb_c_barrier(ictxt);
/* Set up the solver options */ /* Set up the solver options */
psb_c_DefaultSolverOptions(&options); psb_c_DefaultSolverOptions(&options);
options.eps = 1.e-9; options.eps = 1.e-6;
options.itmax = itmax; options.itmax = itmax;
options.irst = irst; options.irst = irst;
options.itrace = 1; options.itrace = 1;

Loading…
Cancel
Save