cluster_sparse_solver_get_csr_size
cluster_sparse_solver_get_csr_size
Computes the (local) number of rows and (local) number of nonzero entries for (distributed) CSR data corresponding to the provided name.
Syntax
void
cluster_sparse_solver_get_csr_size
(
_MKL_DSS_HANDLE_t
pt
,
_MKL_DSS_EXPORT_DATA
name
,
MKL_INT
*
local_nrows
,
MKL_INT
*
local_nnz
,
const int
*
comm
,
MKL_INT
*
error
);
Include Files
- mkl_cluster_sparse_solver.h
Description
This routine uses the internal data created during the factorization phase of
cluster_sparse_solver
for matrix A
. The routine then:- Computes the local number of rows and the local number of nonzeros for CSR data that correspond to the providedname
- Returns the computed values inlocal_nrowsandlocal_nnz
It is assumed that the CSR data defined by the ) used in
name
will be distributed in the same way as the matrix A
(as defined by iparm
[39]cluster_sparse_solver
.The returned values can be used for allocating CSR arrays for factors
L
and U
, and also for allocating arrays for permutations P
and Q
, or scaling matrix D
which can then be used with cluster_sparse_solver_set_csr_ptrs
or cluster_sparse_solver_set_ptr
for exporting corresponding data via cluster_sparse_solver_export
.Only call this routine after the factorization phase () of the
phase
=22cluster_sparse_solver
has been called. Neither pt
, nor iparm
should be changed after the preceding call to cluster_sparse_solver
. Input Parameters
- pt
- Array with size of 64.Handle to internal data structure used in the prior calls tocluster_sparse_solver.Do not modifyptafter the calls tocluster_sparse_solver.
- name
- Specifies CSR data for which the output values are computed.
- SPARSE_PTLUQT_L
- FactorLfrom.P*A*Q=L*U
- SPARSE_PTLUQT_U
- FactorUfrom.P*A*Q=L*U
- SPARSE_DPTLUQT_L
- FactorLfrom.P* (D-1A)*Q=L*U
- SPARSE_DPTLUQT_U
- FactorUfrom.P* (D-1A)*Q=L*U
- local_nrows
- On entry, an array of size 1.
- local_nnz
- On entry, an array of size 1.
- comm
- MPI communicator. The solver uses the Fortran MPI communicator internally. Convert the MPI communicator to Fortran using theMPI_Comm_c2f()function. See the examples in the<install_dir>/examplesdirectory.
Output Parameters
- local_nrows
- On output, the local number of rows for the CSR data which correspond to thename.
- local_nnz
- On output, the local number of nonzero entries for the CSR data which correspond to thename.
- error
- The error indicator:
- error
- Information
- 0
- no error
- -1
- ptis a null pointer
- -2
- invalidpt
- -3
- invalidname
- -4
- unsupportedname
- -9
- unsupported internal code path, consider switching off non-defaultiparmparameters forcluster_sparse_solver
- -10
- unsupported case when the matrixAis distributed among processes with overlap in the preceding calls tocluster_sparse_solver
- -12
- internal memory error
Refer to
cl_solver_export_c.c
for an example using this functionality.