diff --git a/mlprec/impl/mld_cslud_interface.c b/mlprec/impl/mld_cslud_interface.c index 04056e00..4e218fc3 100644 --- a/mlprec/impl/mld_cslud_interface.c +++ b/mlprec/impl/mld_cslud_interface.c @@ -170,7 +170,14 @@ int mld_csludist_fact(int n, int nl, int nnzl, int ffstr, ScalePermstruct = (ScalePermstruct_t *) SUPERLU_MALLOC(sizeof(ScalePermstruct_t)); LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t)); ScalePermstructInit(n,n, ScalePermstruct); +#if defined(SLUD_VERSION_4) + LUstructInit(n, LUstruct); +#elif defined(SLUD_VERSION_3) LUstructInit(n,n, LUstruct); +#else + choke_on_me; +#endif + /* Set the default input options. */ set_default_options_dist(&options); diff --git a/mlprec/impl/mld_dslud_interface.c b/mlprec/impl/mld_dslud_interface.c index 65d3a6a2..364a5188 100644 --- a/mlprec/impl/mld_dslud_interface.c +++ b/mlprec/impl/mld_dslud_interface.c @@ -157,7 +157,13 @@ int mld_dsludist_fact(int n, int nl, int nnzl, int ffstr, ScalePermstruct = (ScalePermstruct_t *) SUPERLU_MALLOC(sizeof(ScalePermstruct_t)); LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t)); ScalePermstructInit(n,n, ScalePermstruct); +#if defined(SLUD_VERSION_4) + LUstructInit(n, LUstruct); +#elif defined(SLUD_VERSION_3) LUstructInit(n,n, LUstruct); +#else + choke_on_me; +#endif /* Set the default input options. */ set_default_options_dist(&options); diff --git a/mlprec/impl/mld_sslud_interface.c b/mlprec/impl/mld_sslud_interface.c index f5bf6965..e5392376 100644 --- a/mlprec/impl/mld_sslud_interface.c +++ b/mlprec/impl/mld_sslud_interface.c @@ -162,7 +162,14 @@ int mld_ssludist_fact(int n, int nl, int nnzl, int ffstr, ScalePermstruct = (ScalePermstruct_t *) SUPERLU_MALLOC(sizeof(ScalePermstruct_t)); LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t)); ScalePermstructInit(n,n, ScalePermstruct); +#if defined(SLUD_VERSION_4) + LUstructInit(n, LUstruct); +#elif defined(SLUD_VERSION_3) LUstructInit(n,n, LUstruct); +#else + choke_on_me; +#endif + /* Set the default input options. */ set_default_options_dist(&options); diff --git a/mlprec/impl/mld_zslud_interface.c b/mlprec/impl/mld_zslud_interface.c index e8e36931..ef29c464 100644 --- a/mlprec/impl/mld_zslud_interface.c +++ b/mlprec/impl/mld_zslud_interface.c @@ -164,7 +164,14 @@ int mld_zsludist_fact(int n, int nl, int nnzl, int ffstr, ScalePermstruct = (ScalePermstruct_t *) SUPERLU_MALLOC(sizeof(ScalePermstruct_t)); LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t)); ScalePermstructInit(n,n, ScalePermstruct); +#if defined(SLUD_VERSION_4) + LUstructInit(n, LUstruct); +#elif defined(SLUD_VERSION_3) LUstructInit(n,n, LUstruct); +#else + choke_on_me; +#endif + /* Set the default input options. */ set_default_options_dist(&options); diff --git a/mlprec/mld_c_sludist_solver.F90 b/mlprec/mld_c_sludist_solver.F90 index 06b96183..b4652ce3 100644 --- a/mlprec/mld_c_sludist_solver.F90 +++ b/mlprec/mld_c_sludist_solver.F90 @@ -159,6 +159,9 @@ contains end if endif + if (info == psb_success_)& + & call psb_geaxpby(cone,x,czero,ww,desc_data,info) + select case(trans_) case('N') info = mld_csludist_solve(0,n_row,1,ww,n_row,sv%lufactors) diff --git a/mlprec/mld_d_sludist_solver.F90 b/mlprec/mld_d_sludist_solver.F90 index 5ea041d1..af4b952f 100644 --- a/mlprec/mld_d_sludist_solver.F90 +++ b/mlprec/mld_d_sludist_solver.F90 @@ -159,6 +159,9 @@ contains end if endif + if (info == psb_success_)& + & call psb_geaxpby(done,x,dzero,ww,desc_data,info) + select case(trans_) case('N') info = mld_dsludist_solve(0,n_row,1,ww,n_row,sv%lufactors) diff --git a/mlprec/mld_s_sludist_solver.F90 b/mlprec/mld_s_sludist_solver.F90 index 75712117..92500d18 100644 --- a/mlprec/mld_s_sludist_solver.F90 +++ b/mlprec/mld_s_sludist_solver.F90 @@ -159,6 +159,9 @@ contains end if endif + if (info == psb_success_)& + & call psb_geaxpby(sone,x,szero,ww,desc_data,info) + select case(trans_) case('N') info = mld_ssludist_solve(0,n_row,1,ww,n_row,sv%lufactors) diff --git a/mlprec/mld_z_sludist_solver.F90 b/mlprec/mld_z_sludist_solver.F90 index 6e3afc69..bd9ea637 100644 --- a/mlprec/mld_z_sludist_solver.F90 +++ b/mlprec/mld_z_sludist_solver.F90 @@ -159,6 +159,9 @@ contains end if endif + if (info == psb_success_)& + & call psb_geaxpby(zone,x,zzero,ww,desc_data,info) + select case(trans_) case('N') info = mld_zsludist_solve(0,n_row,1,ww,n_row,sv%lufactors)