mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
Improve cbind makefile. First working version of test program.
This commit is contained in:
+3
-4
@@ -8,9 +8,9 @@ LIBNAME=$(CBINDLIBNAME)
|
||||
LIBNAME=libmld_cbind.a
|
||||
|
||||
lib: mlprecd
|
||||
# /bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)#
|
||||
# /bin/cp -p $(CPUPDFLAG) *.h $(INCDIR)
|
||||
# /bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
|
||||
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
|
||||
/bin/cp -p $(CPUPDFLAG) *.h $(INCDIR)
|
||||
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
|
||||
|
||||
|
||||
mlprecd:
|
||||
@@ -19,7 +19,6 @@ mlprecd:
|
||||
|
||||
clean:
|
||||
cd mlprec && $(MAKE) clean
|
||||
cd krylov && $(MAKE) clean
|
||||
|
||||
|
||||
veryclean: clean
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
include ../../Make.inc
|
||||
LIBDIR=../../lib
|
||||
INCDIR=../../include
|
||||
MODDIR=../../modules
|
||||
TOP=../..
|
||||
include $(TOP)/Make.inc
|
||||
LIBDIR=$(TOP)/lib
|
||||
INCDIR=$(TOP)/include
|
||||
MODDIR=$(TOP)/modules
|
||||
HERE=.
|
||||
DEST=../
|
||||
|
||||
CINCLUDES=-I. -I$(LIBDIR) -I$(PSBLAS_INCDIR)
|
||||
FINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(INCDIR) $(FMFLAG)$(MODDIR) $(PSBLAS_INCLUDES)
|
||||
@@ -20,8 +22,8 @@ LOCAL_MODS=$(LIBMOD)
|
||||
lib: $(OBJS) $(CMOD)
|
||||
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
|
||||
$(RANLIB) $(HERE)/$(LIBNAME)
|
||||
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
|
||||
/bin/cp -p $(LIBMOD) $(CMOD) $(INCDIR)
|
||||
/bin/cp -p $(HERE)/$(LIBNAME) $(DEST)
|
||||
/bin/cp -p $(LIBMOD) $(CMOD) $(DEST)
|
||||
|
||||
mld_prec_cbind_mod.o: mld_dprec_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();
|
||||
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_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);
|
||||
|
||||
@@ -327,18 +327,21 @@ int main(int argc, char *argv[])
|
||||
psb_c_barrier(ictxt);
|
||||
/* Set up the preconditioner */
|
||||
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,"SUB_FILLIN",1);
|
||||
mld_c_dprecsetc(ph,"COARSE_SOLVE","BJAC");
|
||||
mld_c_dprecsetc(ph,"COARSE_SUBSOLVE","ILU");
|
||||
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);
|
||||
/* Set up the solver options */
|
||||
psb_c_DefaultSolverOptions(&options);
|
||||
options.eps = 1.e-9;
|
||||
options.eps = 1.e-6;
|
||||
options.itmax = itmax;
|
||||
options.irst = irst;
|
||||
options.itrace = 1;
|
||||
|
||||
Reference in New Issue
Block a user