Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

cluster_sparse_solver_set_csr_ptrs

Saves internally-provided pointers to the 3-array CSR data corresponding to the specified name.

Syntax

call cluster_sparse_solver_set_csr_ptrs (pt, name, rowptr, colindx, vals, comm, error)

Include Files

  • mkl_cluster_sparse_solver.f90

Description

This routine internally saves the input pointers, 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(40)) used in cluster_sparse_solver.

The saved pointers can then be used for exporting corresponding data by means of cluster_sparse_solver_export.

NOTE:

Only call this routine after the factorization phase (phase=22) of the cluster_sparse_solver has been called. Neither pt, nor iparm should be changed after the preceding call to cluster_sparse_solver.

Input Parameters

pt

INTEGER*8 for 64-bit architectures

Array with size of 64.

Handle to internal data structure used in the prior calls to cluster_sparse_solver.

CAUTION:

Do not modify pt after the calls to cluster_sparse_solver.

name

INTEGER

Specifies for which CSR data the pointers are provided.

SPARSE_PTLUQT_L

Factor L from P*A*Q=L*U.

SPARSE_PTLUQT_U

Factor U from P*A*Q=L*U.

SPARSE_DPTLUQT_L

Factor L from P* (D-1A)*Q=L*U.

SPARSE_DPTLUQT_U

Factor U from P* (D-1A)*Q=L*U.

rowptr

INTEGER

Array of length at least (local_nrows+1) where local_nrows is the local number of rows, which can be obtained by calling cluster_sparse_solver_get_csr_size. This array contains row indices, such that rowptr[i] - indexing is the first index of row i in the array's vals and colindx. Here, the value of indexing is 0 for zero-based indexing and 1 for one-based indexing, and must be the same as it was for the matrix A used in the preceding calls to cluster_sparse_solver (also stored in iparm(35)).

Refer to pointerB array description in CSR Format for more details.

colindx

INTEGER

Array of length at least rowptr[local_nrows]rowptr[0]. Indexing (zero- or one-based) must be the same as for rowptr. For one-based indexing, the array contains the column indices plus one for each non-zero element of the matrix which corresponds to the name. 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 the name. Its length is equal to length of the colindx array. Refer to values array description in CSR Format for more details.

It is interpreted internally as one of the following depending on mtype (type of the matrix A) and iparm(28) (precision) specified in the preceding call to cluster_sparse_solver.

Fortran:

 

DOUBLE PRECISION

For real types of matrices (mtype=1, 2, -2, and 11) and for double precision (iparm(28) = 0).

REAL

For real types of matrices (mtype=1, 2, -2, and 11) and for single precision (iparm(28) = 1).

DOUBLE COMPLEX

For complex types of matrices (mtype=3, 6, 13, 14, and -4) and for double precision (iparm(28) = 0).

COMPLEX

For complex types of matrices (mtype=3, 6, 13, 14, and -4) and for single precision (iparm(28) = 1).

comm

INTEGER*4

MPI communicator. The solver uses the Fortran MPI communicator internally.

Output Parameters

error

INTEGER

The error indicator:

error
Information
0

no error

-1

pt is a null pointer

-2

invalid pt

-3

invalid name

-4

unsupported name

-9

unsupported internal code path, consider switching off non-default iparm parameters for cluster_sparse_solver

-12

internal memory error

NOTE:
Refer to cl_solver_export_f90.f90 for an example using this functionality.