cluster_sparse_solver_set_csr_ptrs
cluster_sparse_solver_set_csr_ptrs
Saves internally-provided pointers to the 3-array CSR data corresponding to the specified name.
Syntax
void
cluster_sparse_solver_set_csr_ptrs
(
_MKL_DSS_HANDLE_t
pt
,
_MKL_DSS_EXPORT_DATA
name
,
MKL_INT
*
rowptr
,
MKL_INT
*
colindx
,
void
*
vals
,
const int
*
comm
,
MKL_INT
*
error
);
Include Files
- mkl_cluster_sparse_solver.h
Description
This routine internally saves the input pointers, ) used in
rowptr
, colindx
, and vals
, of the 3-array CSR data, which correspond to the provided name
. It is assumed that the exported data will be distributed in the same way as the matrix A
(as defined by iparm
[39]cluster_sparse_solver
.The saved pointers can then be used for exporting corresponding data by means of
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 for which CSR data the pointers are provided.
- 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
- rowptr
- Array of length at least (local_nrows+1) wherelocal_nrowsis the local number of rows, which can be obtained by callingcluster_sparse_solver_get_csr_size. This array contains row indices, such thatrowptr[i]-indexingis the first index of rowiin the array'svalsandcolindx. Here, the value ofindexingis 0 for zero-based indexing and 1 for one-based indexing, and must be the same as it was for the matrixAused in the preceding calls tocluster_sparse_solver(also stored iniparm[34]).Refer topointerBarray description in CSR Format for more details.
- colindx
- Array of length at leastrowptr[local_nrows]–rowptr[0]. Indexing (zero- or one-based) must be the same as forrowptr. For one-based indexing, the array contains the column indices plus one for each non-zero element of the matrix which corresponds to thename. For zero-based indexing, the array contains the column indices for each non-zero element of the matrix.
- vals
- Array containing non-zero elements of the matrix which corresponds to thename. Its length is equal to length of thecolindxarray. Refer to values array description in CSR Format for more details.It will be interpreted internally asfloat*/double*(MKL_Complex8*/MKL_Complex16*) depending onmtype(type of the matrixA) andiparm[27](precision) specified in the preceding call tocluster_sparse_solver.
- 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
- 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
- -12
- internal memory error
Refer to
cl_solver_export_c.c
for an example using this functionality.