config/pac.m4
 docs/src/building.tex
 docs/src/userguide.tex
 docs/src/userhtml.tex
 mlprec/impl/mld_cslu_interface.c
 mlprec/impl/mld_dslu_interface.c
 mlprec/impl/mld_sslu_interface.c
 mlprec/impl/mld_zslu_interface.c
 mlprec/mld_c_slu_solver.F90
 mlprec/mld_d_slu_solver.F90
 mlprec/mld_s_slu_solver.F90
 mlprec/mld_z_slu_solver.F90

Fixed docs and interface to Super_LU 4.3.
stopcriterion
Salvatore Filippone 9 years ago
parent 9c958105a4
commit 4d5a921205

@ -324,8 +324,8 @@ dnl
AC_DEFUN([PAC_ARG_WITH_PSBLAS], AC_DEFUN([PAC_ARG_WITH_PSBLAS],
[ [
AC_ARG_WITH(psblas, AC_ARG_WITH(psblas,
AC_HELP_STRING([--with-psblas], [The install directory for PSBLAS, for example, AC_HELP_STRING([--with-psblas=DIR], [The install directory for PSBLAS, for example,
--with-psblas=/opt/packages/psblas-3.1]), --with-psblas=/opt/packages/psblas-3.3]),
[pac_cv_psblas_dir=$withval], [pac_cv_psblas_dir=$withval],
[pac_cv_psblas_dir='']) [pac_cv_psblas_dir=''])
AC_ARG_WITH(psblas-incdir, AC_HELP_STRING([--with-psblas-incdir=DIR], [Specify the directory for PSBLAS includes.]), AC_ARG_WITH(psblas-incdir, AC_HELP_STRING([--with-psblas-incdir=DIR], [Specify the directory for PSBLAS includes.]),

@ -35,10 +35,10 @@ The following base libraries are needed:
preconditioners based on the UMFPACK or SuperLU third party preconditioners based on the UMFPACK or SuperLU third party
libraries. libraries.
\item[MPI] \cite{MPI2,MPI1} A version of MPI is available on most \item[MPI] \cite{MPI2,MPI1} A version of MPI is available on most
high-performance computing systems; only version 1.1 is required. high-performance computing systems;
\item[PSBLAS] \cite{PSBLASGUIDE,psblas_00} Parallel Sparse BLAS is \item[PSBLAS] \cite{PSBLASGUIDE,psblas_00} Parallel Sparse BLAS is
available from \\ \verb|http://www.ce.uniroma2.it/psblas|; version available from \\ \verb|http://www.ce.uniroma2.it/psblas|; version
3.1 (or later) is required. Indeed, all the prerequisites 3.3 (or later) is required. Indeed, all the prerequisites
listed so far are also prerequisites of PSBLAS. listed so far are also prerequisites of PSBLAS.
\end{description} \end{description}
Please note that the four previous libraries must have Fortran Please note that the four previous libraries must have Fortran
@ -88,7 +88,7 @@ The full set of options may be looked at by issuing the command
\begin{verbatim} \begin{verbatim}
`configure' configures MLD2P4 2.0 to adapt to many kinds of systems. `configure' configures MLD2P4 2.0 to adapt to many kinds of systems.
Usage: ../../configure [OPTION]... [VAR=VALUE]... Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables. VAR=VALUE. See below for descriptions of some of the useful variables.
@ -150,19 +150,31 @@ Optional Features:
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-psblas The source directory for PSBLAS, for example, --with-psblas=DIR The install directory for PSBLAS, for example,
--with-psblas=/opt/packages/psblas-2.3 --with-psblas=/opt/packages/psblas-3.3
--with-libs List additional link flags here. For example, --with-psblas-incdir=DIR
--with-libs=-lspecial_system_lib or Specify the directory for PSBLAS includes.
--with-libs=-L/path/to/libs --with-psblas-libdir=DIR
Specify the directory for PSBLAS library.
--with-extra-libs List additional link flags here. For example,
--with-extra-libs=-lspecial_system_lib or
--with-extra-libs=-L/path/to/libs
--with-umfpack=LIBNAME Specify the library name for UMFPACK library. --with-umfpack=LIBNAME Specify the library name for UMFPACK library.
Default: "-lumfpack -lamd" Default: "-lumfpack -lamd"
--with-umfpackdir=DIR Specify the directory for UMFPACK library and --with-umfpackdir=DIR Specify the directory for UMFPACK library and
includes. includes.
--with-umfpackincdir=DIR
Specify the directory for UMFPACK includes.
--with-umfpacklibdir=DIR
Specify the directory for UMFPACK library.
--with-superlu=LIBNAME Specify the library name for SUPERLU library. --with-superlu=LIBNAME Specify the library name for SUPERLU library.
Default: "-lsuperlu" Default: "-lsuperlu"
--with-superludir=DIR Specify the directory for SUPERLU library and --with-superludir=DIR Specify the directory for SUPERLU library and
includes. includes.
--with-superluincdir=DIR
Specify the directory for SUPERLU includes.
--with-superlulibdir=DIR
Specify the directory for SUPERLU library.
--with-superludist=LIBNAME --with-superludist=LIBNAME
Specify the libname for SUPERLUDIST library. Specify the libname for SUPERLUDIST library.
Requires you also specify SuperLU. Default: Requires you also specify SuperLU. Default:
@ -170,6 +182,10 @@ Optional Packages:
--with-superludistdir=DIR --with-superludistdir=DIR
Specify the directory for SUPERLUDIST library and Specify the directory for SUPERLUDIST library and
includes. includes.
--with-superludistincdir=DIR
Specify the directory for SUPERLUDIST includes.
--with-superludistlibdir=DIR
Specify the directory for SUPERLUDIST library.
Some influential environment variables: Some influential environment variables:
FC Fortran compiler command FC Fortran compiler command
@ -179,7 +195,7 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library> LIBS libraries to pass to the linker, e.g. -l<library>
CC C compiler command CC C compiler command
CFLAGS C compiler flags CFLAGS C compiler flags
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir> you have headers in a nonstandard directory <include dir>
CPP C preprocessor CPP C preprocessor
MPICC MPI C compiler command MPICC MPI C compiler command
@ -193,13 +209,13 @@ it to find libraries and programs with nonstandard names/locations.
Report bugs to <bugreport@mld2p4.it>. Report bugs to <bugreport@mld2p4.it>.
\end{verbatim} \end{verbatim}
Thus, a sample build with libraries in installation For instance, if a user has built and installed PSBLAS 3.3 under the
directories specifics to the GNU 4.7 compiler suite might be as \verb|/opt| directory and is
follows, specifying only the UMFPACK external package: using the SuiteSparse package (which includes UMFPACK), then MLD2P4
might be configured with:
\begin{verbatim} \begin{verbatim}
./configure --with-psblas=/home/user/psblas-3.1/ \ ./configure --with-psblas=/opt/psblas-3.3/ \
--with-libs="-L/usr/local/BLAS/gnu47" \ --with-umfpackincdir=/usr/include/suitesparse
--with-umfpackdir=/usr/local/UMFPACK/gnu47
\end{verbatim} \end{verbatim}
Once the configure script has completed execution, it will have Once the configure script has completed execution, it will have
generated the file \verb|Make.inc| which will then be used by all generated the file \verb|Make.inc| which will then be used by all

@ -125,9 +125,9 @@ based on PSBLAS}
\vspace{\stretch{1}} \vspace{\stretch{1}}
\noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth} \noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth}
\flushright \flushright
\large Software version: 2.0-beta\\ \large Software version: 2.0\\
%\today %\today
\large June 14, 2013 \large Oct. 12, 2015
\end{minipage}} \end{minipage}}
%\addtolength{\textwidth}{\centeroffset} %\addtolength{\textwidth}{\centeroffset}
\vspace{\stretch{2}} \vspace{\stretch{2}}

@ -102,9 +102,9 @@ based on PSBLAS}\\[3ex]
University of Rome ``Tor Vergata'', Italy\\[2ex] University of Rome ``Tor Vergata'', Italy\\[2ex]
%\\[10ex] %\\[10ex]
%\today %\today
Software version: 2.0-beta\\ Software version: 2.0\\
%\today %\today
June 14, 2013 Oct. 12, 2015
\clearpage \clearpage
\ \\ \ \\
\thispagestyle{empty} \thispagestyle{empty}

@ -116,7 +116,7 @@ int mld_cslu_fact(int n, int nnz,
#else #else
void *values, void *values,
#endif #endif
int *rowptr, int *colind, void **f_factors) int *colptr, int *rowind, void **f_factors)
{ {
/* /*
* This routine can be called from Fortran. * This routine can be called from Fortran.
@ -142,6 +142,7 @@ int mld_cslu_fact(int n, int nnz,
superlu_options_t options; superlu_options_t options;
SuperLUStat_t stat; SuperLUStat_t stat;
factors_t *LUfactors; factors_t *LUfactors;
GlobalLU_t Glu; /* Not needed on return. */
int info; int info;
trans = NOTRANS; trans = NOTRANS;
@ -153,8 +154,8 @@ int mld_cslu_fact(int n, int nnz,
/* Initialize the statistics variables. */ /* Initialize the statistics variables. */
StatInit(&stat); StatInit(&stat);
cCreate_CompRow_Matrix(&A, n, n, nnz, values, colind, rowptr, cCreate_CompCol_Matrix(&A, n, n, nnz, values, rowind, colptr,
SLU_NR, SLU_C, SLU_GE); SLU_NC, SLU_C, SLU_GE);
L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
if ( !(perm_r = intMalloc(n)) ) ABORT("Malloc fails for perm_r[]."); if ( !(perm_r = intMalloc(n)) ) ABORT("Malloc fails for perm_r[].");
@ -176,9 +177,15 @@ int mld_cslu_fact(int n, int nnz,
panel_size = sp_ienv(1); panel_size = sp_ienv(1);
relax = sp_ienv(2); relax = sp_ienv(2);
#if defined(SLU_VERSION_5)
cgstrf(&options, &AC, relax, panel_size, cgstrf(&options, &AC, relax, panel_size, etree,
etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(SLU_VERSION_4)
cgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &stat, &info);
#else
choke_on_me;
#endif
if ( info == 0 ) { if ( info == 0 ) {
Lstore = (SCformat *) L->Store; Lstore = (SCformat *) L->Store;

@ -111,7 +111,7 @@ typedef struct {
int mld_dslu_fact(int n, int nnz, double *values, int mld_dslu_fact(int n, int nnz, double *values,
int *rowptr, int *colind, void **f_factors) int *colptr, int *rowind, void **f_factors)
{ {
/* /*
* This routine can be called from Fortran. * This routine can be called from Fortran.
@ -137,6 +137,7 @@ int mld_dslu_fact(int n, int nnz, double *values,
superlu_options_t options; superlu_options_t options;
SuperLUStat_t stat; SuperLUStat_t stat;
factors_t *LUfactors; factors_t *LUfactors;
GlobalLU_t Glu; /* Not needed on return. */
int info; int info;
trans = NOTRANS; trans = NOTRANS;
@ -148,8 +149,8 @@ int mld_dslu_fact(int n, int nnz, double *values,
/* Initialize the statistics variables. */ /* Initialize the statistics variables. */
StatInit(&stat); StatInit(&stat);
dCreate_CompRow_Matrix(&A, n, n, nnz, values, colind, rowptr, dCreate_CompCol_Matrix(&A, n, n, nnz, values, rowind, colptr,
SLU_NR, SLU_D, SLU_GE); SLU_NC, SLU_D, SLU_GE);
L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
if ( !(perm_r = intMalloc(n)) ) ABORT("Malloc fails for perm_r[]."); if ( !(perm_r = intMalloc(n)) ) ABORT("Malloc fails for perm_r[].");
@ -171,9 +172,15 @@ int mld_dslu_fact(int n, int nnz, double *values,
panel_size = sp_ienv(1); panel_size = sp_ienv(1);
relax = sp_ienv(2); relax = sp_ienv(2);
#if defined(SLU_VERSION_5)
dgstrf(&options, &AC, relax, panel_size, dgstrf(&options, &AC, relax, panel_size, etree,
etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(SLU_VERSION_4)
dgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &stat, &info);
#else
choke_on_me;
#endif
if ( info == 0 ) { if ( info == 0 ) {
Lstore = (SCformat *) L->Store; Lstore = (SCformat *) L->Store;

@ -111,7 +111,7 @@ typedef struct {
int mld_sslu_fact(int n, int nnz, float *values, int mld_sslu_fact(int n, int nnz, float *values,
int *rowptr, int *colind, void **f_factors) int *colptr, int *rowind, void **f_factors)
{ {
/* /*
* This routine can be called from Fortran. * This routine can be called from Fortran.
@ -137,6 +137,7 @@ int mld_sslu_fact(int n, int nnz, float *values,
superlu_options_t options; superlu_options_t options;
SuperLUStat_t stat; SuperLUStat_t stat;
factors_t *LUfactors; factors_t *LUfactors;
GlobalLU_t Glu; /* Not needed on return. */
int info; int info;
trans = NOTRANS; trans = NOTRANS;
@ -148,7 +149,7 @@ int mld_sslu_fact(int n, int nnz, float *values,
/* Initialize the statistics variables. */ /* Initialize the statistics variables. */
StatInit(&stat); StatInit(&stat);
sCreate_CompRow_Matrix(&A, n, n, nnz, values, colind, rowptr, sCreate_CompRow_Matrix(&A, n, n, nnz, values, rowind, colptr,
SLU_NR, SLU_S, SLU_GE); SLU_NR, SLU_S, SLU_GE);
L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
@ -171,9 +172,15 @@ int mld_sslu_fact(int n, int nnz, float *values,
panel_size = sp_ienv(1); panel_size = sp_ienv(1);
relax = sp_ienv(2); relax = sp_ienv(2);
#if defined(SLU_VERSION_5)
sgstrf(&options, &AC, relax, panel_size,
etree, NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(SLU_VERSION_4)
sgstrf(&options, &AC, relax, panel_size, sgstrf(&options, &AC, relax, panel_size,
etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info);
#else
choke_on_me;
#endif
if ( info == 0 ) { if ( info == 0 ) {
Lstore = (SCformat *) L->Store; Lstore = (SCformat *) L->Store;

@ -115,7 +115,7 @@ int mld_zslu_fact(int n, int nnz,
#else #else
void *values, void *values,
#endif #endif
int *rowptr, int *colind, void **f_factors) int *colptr, int *rowind, void **f_factors)
{ {
/* /*
@ -142,6 +142,7 @@ int mld_zslu_fact(int n, int nnz,
superlu_options_t options; superlu_options_t options;
SuperLUStat_t stat; SuperLUStat_t stat;
factors_t *LUfactors; factors_t *LUfactors;
GlobalLU_t Glu; /* Not needed on return. */
int info; int info;
trans = NOTRANS; trans = NOTRANS;
@ -153,8 +154,8 @@ int mld_zslu_fact(int n, int nnz,
/* Initialize the statistics variables. */ /* Initialize the statistics variables. */
StatInit(&stat); StatInit(&stat);
zCreate_CompRow_Matrix(&A, n, n, nnz, values, colind, rowptr, zCreate_CompCol_Matrix(&A, n, n, nnz, values, rowind, colptr,
SLU_NR, SLU_Z, SLU_GE); SLU_NC, SLU_Z, SLU_GE);
L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) ); U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
if ( !(perm_r = intMalloc(n)) ) ABORT("Malloc fails for perm_r[]."); if ( !(perm_r = intMalloc(n)) ) ABORT("Malloc fails for perm_r[].");
@ -176,9 +177,15 @@ int mld_zslu_fact(int n, int nnz,
panel_size = sp_ienv(1); panel_size = sp_ienv(1);
relax = sp_ienv(2); relax = sp_ienv(2);
#if defined(SLU_VERSION_5)
zgstrf(&options, &AC, relax, panel_size, zgstrf(&options, &AC, relax, panel_size, etree,
etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(SLU_VERSION_4)
zgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &stat, &info);
#else
choke_on_me;
#endif
if ( info == 0 ) { if ( info == 0 ) {
Lstore = (SCformat *) L->Store; Lstore = (SCformat *) L->Store;

@ -249,7 +249,7 @@ contains
class(psb_i_base_vect_type), intent(in), optional :: imold class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables ! Local variables
type(psb_cspmat_type) :: atmp type(psb_cspmat_type) :: atmp
type(psb_c_csr_sparse_mat) :: acsr type(psb_c_csc_sparse_mat) :: acsc
type(psb_c_coo_sparse_mat) :: acoo type(psb_c_coo_sparse_mat) :: acoo
integer :: n_row,n_col, nrow_a, nztota integer :: n_row,n_col, nrow_a, nztota
integer :: ictxt,np,me,i, err_act, debug_unit, debug_level integer :: ictxt,np,me,i, err_act, debug_unit, debug_level
@ -272,17 +272,16 @@ contains
call a%cscnv(atmp,info,type='coo') call a%cscnv(atmp,info,type='coo')
call psb_rwextd(n_row,atmp,info,b=b) call psb_rwextd(n_row,atmp,info,b=b)
call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_)
call atmp%mv_to(acsr) nrow_a = atmp%get_nrows()
nrow_a = acsr%get_nrows() call atmp%a%csclip(acoo,info,jmax=nrow_a)
call acsr%csclip(acoo,info,jmax=nrow_a) call acsc%mv_from_coo(acoo,info)
call acsr%mv_from_coo(acoo,info) nztota = acsc%get_nzeros()
nztota = acsr%get_nzeros()
! Fix the entries to call C-base SuperLU ! Fix the entries to call C-base SuperLU
acsr%ja(:) = acsr%ja(:) - 1 acsc%ia(:) = acsc%ia(:) - 1
acsr%irp(:) = acsr%irp(:) - 1 acsc%icp(:) = acsc%icp(:) - 1
info = mld_cslu_fact(nrow_a,nztota,acsr%val,& info = mld_cslu_fact(nrow_a,nztota,acsc%val,&
& acsr%irp,acsr%ja,sv%lufactors) & acsc%icp,acsc%ia,sv%lufactors)
if (info /= psb_success_) then if (info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -291,7 +290,7 @@ contains
goto 9999 goto 9999
end if end if
call acsr%free() call acsc%free()
call atmp%free() call atmp%free()
else else
! ? ! ?

@ -249,7 +249,7 @@ contains
class(psb_i_base_vect_type), intent(in), optional :: imold class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables ! Local variables
type(psb_dspmat_type) :: atmp type(psb_dspmat_type) :: atmp
type(psb_d_csr_sparse_mat) :: acsr type(psb_d_csc_sparse_mat) :: acsc
type(psb_d_coo_sparse_mat) :: acoo type(psb_d_coo_sparse_mat) :: acoo
integer :: n_row,n_col, nrow_a, nztota integer :: n_row,n_col, nrow_a, nztota
integer :: ictxt,np,me,i, err_act, debug_unit, debug_level integer :: ictxt,np,me,i, err_act, debug_unit, debug_level
@ -272,17 +272,16 @@ contains
call a%cscnv(atmp,info,type='coo') call a%cscnv(atmp,info,type='coo')
call psb_rwextd(n_row,atmp,info,b=b) call psb_rwextd(n_row,atmp,info,b=b)
call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_)
call atmp%mv_to(acsr) nrow_a = atmp%get_nrows()
nrow_a = acsr%get_nrows() call atmp%a%csclip(acoo,info,jmax=nrow_a)
call acsr%csclip(acoo,info,jmax=nrow_a) call acsc%mv_from_coo(acoo,info)
call acsr%mv_from_coo(acoo,info) nztota = acsc%get_nzeros()
nztota = acsr%get_nzeros()
! Fix the entries to call C-base SuperLU ! Fix the entries to call C-base SuperLU
acsr%ja(:) = acsr%ja(:) - 1 acsc%ia(:) = acsc%ia(:) - 1
acsr%irp(:) = acsr%irp(:) - 1 acsc%icp(:) = acsc%icp(:) - 1
info = mld_dslu_fact(nrow_a,nztota,acsr%val,& info = mld_dslu_fact(nrow_a,nztota,acsc%val,&
& acsr%irp,acsr%ja,sv%lufactors) & acsc%icp,acsc%ia,sv%lufactors)
if (info /= psb_success_) then if (info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -291,7 +290,7 @@ contains
goto 9999 goto 9999
end if end if
call acsr%free() call acsc%free()
call atmp%free() call atmp%free()
else else
! ? ! ?

@ -249,7 +249,7 @@ contains
class(psb_i_base_vect_type), intent(in), optional :: imold class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables ! Local variables
type(psb_sspmat_type) :: atmp type(psb_sspmat_type) :: atmp
type(psb_s_csr_sparse_mat) :: acsr type(psb_s_csc_sparse_mat) :: acsc
type(psb_s_coo_sparse_mat) :: acoo type(psb_s_coo_sparse_mat) :: acoo
integer :: n_row,n_col, nrow_a, nztota integer :: n_row,n_col, nrow_a, nztota
integer :: ictxt,np,me,i, err_act, debug_unit, debug_level integer :: ictxt,np,me,i, err_act, debug_unit, debug_level
@ -272,17 +272,16 @@ contains
call a%cscnv(atmp,info,type='coo') call a%cscnv(atmp,info,type='coo')
call psb_rwextd(n_row,atmp,info,b=b) call psb_rwextd(n_row,atmp,info,b=b)
call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_)
call atmp%mv_to(acsr) nrow_a = atmp%get_nrows()
nrow_a = acsr%get_nrows() call atmp%a%csclip(acoo,info,jmax=nrow_a)
call acsr%csclip(acoo,info,jmax=nrow_a) call acsc%mv_from_coo(acoo,info)
call acsr%mv_from_coo(acoo,info) nztota = acsc%get_nzeros()
nztota = acsr%get_nzeros()
! Fix the entries to call C-base SuperLU ! Fix the entries to call C-base SuperLU
acsr%ja(:) = acsr%ja(:) - 1 acsc%ia(:) = acsc%ia(:) - 1
acsr%irp(:) = acsr%irp(:) - 1 acsc%icp(:) = acsc%icp(:) - 1
info = mld_sslu_fact(nrow_a,nztota,acsr%val,& info = mld_sslu_fact(nrow_a,nztota,acsc%val,&
& acsr%irp,acsr%ja,sv%lufactors) & acsc%icp,acsc%ia,sv%lufactors)
if (info /= psb_success_) then if (info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -291,7 +290,7 @@ contains
goto 9999 goto 9999
end if end if
call acsr%free() call acsc%free()
call atmp%free() call atmp%free()
else else
! ? ! ?

@ -249,7 +249,7 @@ contains
class(psb_i_base_vect_type), intent(in), optional :: imold class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables ! Local variables
type(psb_zspmat_type) :: atmp type(psb_zspmat_type) :: atmp
type(psb_z_csr_sparse_mat) :: acsr type(psb_z_csc_sparse_mat) :: acsc
type(psb_z_coo_sparse_mat) :: acoo type(psb_z_coo_sparse_mat) :: acoo
integer :: n_row,n_col, nrow_a, nztota integer :: n_row,n_col, nrow_a, nztota
integer :: ictxt,np,me,i, err_act, debug_unit, debug_level integer :: ictxt,np,me,i, err_act, debug_unit, debug_level
@ -272,17 +272,16 @@ contains
call a%cscnv(atmp,info,type='coo') call a%cscnv(atmp,info,type='coo')
call psb_rwextd(n_row,atmp,info,b=b) call psb_rwextd(n_row,atmp,info,b=b)
call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_)
call atmp%mv_to(acsr) nrow_a = atmp%get_nrows()
nrow_a = acsr%get_nrows() call atmp%a%csclip(acoo,info,jmax=nrow_a)
call acsr%csclip(acoo,info,jmax=nrow_a) call acsc%mv_from_coo(acoo,info)
call acsr%mv_from_coo(acoo,info) nztota = acsc%get_nzeros()
nztota = acsr%get_nzeros()
! Fix the entries to call C-base SuperLU ! Fix the entries to call C-base SuperLU
acsr%ja(:) = acsr%ja(:) - 1 acsc%ia(:) = acsc%ia(:) - 1
acsr%irp(:) = acsr%irp(:) - 1 acsc%icp(:) = acsc%icp(:) - 1
info = mld_zslu_fact(nrow_a,nztota,acsr%val,& info = mld_zslu_fact(nrow_a,nztota,acsc%val,&
& acsr%irp,acsr%ja,sv%lufactors) & acsc%icp,acsc%ia,sv%lufactors)
if (info /= psb_success_) then if (info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -291,7 +290,7 @@ contains
goto 9999 goto 9999
end if end if
call acsr%free() call acsc%free()
call atmp%free() call atmp%free()
else else
! ? ! ?

Loading…
Cancel
Save