From 260e596c3cc6f01e7f7903ed4d36b64dd4bf31a1 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 16 Jan 2018 12:07:57 +0000 Subject: [PATCH 1/2] Work vectors for X2Y/Y2X should be taken from different levels. --- mlprec/impl/mld_cmlprec_aply.f90 | 18 +++++++++--------- mlprec/impl/mld_dmlprec_aply.f90 | 18 +++++++++--------- mlprec/impl/mld_smlprec_aply.f90 | 18 +++++++++--------- mlprec/impl/mld_zmlprec_aply.f90 | 18 +++++++++--------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/mlprec/impl/mld_cmlprec_aply.f90 b/mlprec/impl/mld_cmlprec_aply.f90 index 050d9916..34b67ba5 100644 --- a/mlprec/impl/mld_cmlprec_aply.f90 +++ b/mlprec/impl/mld_cmlprec_aply.f90 @@ -520,7 +520,7 @@ contains call psb_map_X2Y(cone,vx2l,& & czero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -540,7 +540,7 @@ contains call psb_map_Y2X(cone,p%precv(level+1)%wrk%vy2l,& & cone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -653,7 +653,7 @@ contains call psb_map_X2Y(cone,vty,& & czero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -664,7 +664,7 @@ contains call psb_map_X2Y(cone,vx2l,& & czero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -680,7 +680,7 @@ contains call psb_map_Y2X(cone,p%precv(level+1)%wrk%vy2l,& & cone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -697,7 +697,7 @@ contains if (info == psb_success_) call psb_map_X2Y(cone,vty,& & czero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during W-cycle restriction') @@ -709,7 +709,7 @@ contains if (info == psb_success_) call psb_map_Y2X(cone,p%precv(level+1)%wrk%vy2l,& & cone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -889,7 +889,7 @@ contains call psb_map_X2Y(cone,vty,& & czero,p%precv(level + 1)%wrk%vx2l,& & p%precv(level + 1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -925,7 +925,7 @@ contains call psb_map_Y2X(cone,p%precv(level+1)%wrk%vy2l,& & cone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_dmlprec_aply.f90 b/mlprec/impl/mld_dmlprec_aply.f90 index 9aab499b..92c74340 100644 --- a/mlprec/impl/mld_dmlprec_aply.f90 +++ b/mlprec/impl/mld_dmlprec_aply.f90 @@ -520,7 +520,7 @@ contains call psb_map_X2Y(done,vx2l,& & dzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -540,7 +540,7 @@ contains call psb_map_Y2X(done,p%precv(level+1)%wrk%vy2l,& & done,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -653,7 +653,7 @@ contains call psb_map_X2Y(done,vty,& & dzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -664,7 +664,7 @@ contains call psb_map_X2Y(done,vx2l,& & dzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -680,7 +680,7 @@ contains call psb_map_Y2X(done,p%precv(level+1)%wrk%vy2l,& & done,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -697,7 +697,7 @@ contains if (info == psb_success_) call psb_map_X2Y(done,vty,& & dzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during W-cycle restriction') @@ -709,7 +709,7 @@ contains if (info == psb_success_) call psb_map_Y2X(done,p%precv(level+1)%wrk%vy2l,& & done,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -889,7 +889,7 @@ contains call psb_map_X2Y(done,vty,& & dzero,p%precv(level + 1)%wrk%vx2l,& & p%precv(level + 1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -925,7 +925,7 @@ contains call psb_map_Y2X(done,p%precv(level+1)%wrk%vy2l,& & done,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_smlprec_aply.f90 b/mlprec/impl/mld_smlprec_aply.f90 index 749c140a..f211c95e 100644 --- a/mlprec/impl/mld_smlprec_aply.f90 +++ b/mlprec/impl/mld_smlprec_aply.f90 @@ -520,7 +520,7 @@ contains call psb_map_X2Y(sone,vx2l,& & szero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -540,7 +540,7 @@ contains call psb_map_Y2X(sone,p%precv(level+1)%wrk%vy2l,& & sone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -653,7 +653,7 @@ contains call psb_map_X2Y(sone,vty,& & szero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -664,7 +664,7 @@ contains call psb_map_X2Y(sone,vx2l,& & szero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -680,7 +680,7 @@ contains call psb_map_Y2X(sone,p%precv(level+1)%wrk%vy2l,& & sone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -697,7 +697,7 @@ contains if (info == psb_success_) call psb_map_X2Y(sone,vty,& & szero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during W-cycle restriction') @@ -709,7 +709,7 @@ contains if (info == psb_success_) call psb_map_Y2X(sone,p%precv(level+1)%wrk%vy2l,& & sone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -889,7 +889,7 @@ contains call psb_map_X2Y(sone,vty,& & szero,p%precv(level + 1)%wrk%vx2l,& & p%precv(level + 1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -925,7 +925,7 @@ contains call psb_map_Y2X(sone,p%precv(level+1)%wrk%vy2l,& & sone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_zmlprec_aply.f90 b/mlprec/impl/mld_zmlprec_aply.f90 index c6903bd4..c09fb56e 100644 --- a/mlprec/impl/mld_zmlprec_aply.f90 +++ b/mlprec/impl/mld_zmlprec_aply.f90 @@ -520,7 +520,7 @@ contains call psb_map_X2Y(zone,vx2l,& & zzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -540,7 +540,7 @@ contains call psb_map_Y2X(zone,p%precv(level+1)%wrk%vy2l,& & zone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -653,7 +653,7 @@ contains call psb_map_X2Y(zone,vty,& & zzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -664,7 +664,7 @@ contains call psb_map_X2Y(zone,vx2l,& & zzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during restriction') @@ -680,7 +680,7 @@ contains call psb_map_Y2X(zone,p%precv(level+1)%wrk%vy2l,& & zone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during prolongation') @@ -697,7 +697,7 @@ contains if (info == psb_success_) call psb_map_X2Y(zone,vty,& & zzero,p%precv(level+1)%wrk%vx2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& & a_err='Error during W-cycle restriction') @@ -709,7 +709,7 @@ contains if (info == psb_success_) call psb_map_Y2X(zone,p%precv(level+1)%wrk%vy2l,& & zone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -889,7 +889,7 @@ contains call psb_map_X2Y(zone,vty,& & zzero,p%precv(level + 1)%wrk%vx2l,& & p%precv(level + 1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=wv(1),vty=p%precv(level+1)%wrk%wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& @@ -925,7 +925,7 @@ contains call psb_map_Y2X(zone,p%precv(level+1)%wrk%vy2l,& & zone,vy2l,& & p%precv(level+1)%map,info,work=work,& - & vtx=wv(1),vty=wv(2)) + & vtx=p%precv(level+1)%wrk%wv(1),vty=wv(1)) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& From a7bd1fb466f6e7bb08d356bb9e73f010857b2b86 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 16 Jan 2018 12:11:09 +0000 Subject: [PATCH 2/2] Print UMF's own error message when needed. --- mlprec/impl/mld_dumf_interface.c | 2 ++ mlprec/impl/mld_zumf_interface.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mlprec/impl/mld_dumf_interface.c b/mlprec/impl/mld_dumf_interface.c index 20b451af..791d5dde 100644 --- a/mlprec/impl/mld_dumf_interface.c +++ b/mlprec/impl/mld_dumf_interface.c @@ -106,6 +106,7 @@ int mld_dumf_fact(int n, int nnz, info = 0; } else { printf("umfpack_di_symbolic() error returns INFO= %d\n", info); + umfpack_di_report_status(Control,info); *symptr = (void *) NULL; *numptr = (void *) NULL; return -11; @@ -127,6 +128,7 @@ int mld_dumf_fact(int n, int nnz, } else { printf("umfpack_di_numeric() error returns INFO= %d\n", info); + umfpack_di_report_status(Control,info); info = -12; *numptr = NULL; } diff --git a/mlprec/impl/mld_zumf_interface.c b/mlprec/impl/mld_zumf_interface.c index 5acc11dd..c3ca1b88 100644 --- a/mlprec/impl/mld_zumf_interface.c +++ b/mlprec/impl/mld_zumf_interface.c @@ -107,6 +107,7 @@ int mld_zumf_fact(int n, int nnz, info = 0; } else { printf("umfpack_zi_symbolic() error returns INFO= %d\n", info); + umfpack_zi_report_status(Control,info); *symptr = (void *) NULL; *numptr = (void *) NULL; return -11; @@ -128,6 +129,7 @@ int mld_zumf_fact(int n, int nnz, } else { printf("umfpack_zi_numeric() error returns INFO= %d\n", info); + umfpack_zi_report_status(Control,info); info = -12; *numptr = NULL; }