Developer Reference

  • 0.10
  • 10/21/2020
  • Public Content
Contents

dcg

Computes the approximate solution vector.

Syntax

void
dcg
(
const
MKL_INT
*n
,
double
*x
,
const
double
*b
,
MKL_INT
*RCI_request
,
MKL_INT
*ipar
,
double
*dpar
,
double
*tmp
);
Include Files
  • mkl.h
Description
The
dcg
routine computes the approximate solution vector using the CG method [Young71]. The routine
dcg
uses the vector in the array
x
before the first call as an initial approximation to the solution. The parameter
RCI_request
gives you information about the task completion and requests results of certain operations that are required by the solver.
Note that lengths of all vectors must be defined in a previous call to the
dcg_init
routine.
Input Parameters
n
Sets the size of the problem.
x
Array of size
n
. Contains the initial approximation to the solution vector.
b
Array of size
n
. Contains the right-hand side vector.
tmp
Array of size
(
n
*
4). Refer to the CG Common Parameters.
Output Parameters
RCI_request
Gives information about result of work of the routine.
x
Array of size
n
. Contains the updated approximation to the solution vector.
ipar
Array of size
128
. Refer to the CG Common Parameters.
dpar
Array of size
128
. Refer to the CG Common Parameters.
tmp
Array of size
(
n
*
4)
. Refer to the CG Common Parameters.
Return Values
RCI_request
=0
Indicates that the task completed normally and the solution is found and stored in the vector
x
. This occurs only if the stopping tests are fully automatic. For the user defined stopping tests, see the description of the
RCI_request
= 2
.
RCI_request
=-1
Indicates that the routine was interrupted because the maximum number of iterations was reached, but the relative stopping criterion was not met. This situation occurs only if you request both tests.
RCI_request
=-2
Indicates that the routine was interrupted because of an attempt to divide by zero. This situation happens if the matrix is non-positive definite or almost non-positive definite.
RCI_request
=- 10
Indicates that the routine was interrupted because the residual norm is invalid. This usually happens because the value
dpar
[5]
was altered outside of the routine, or the
dcg_check
routine was not called.
RCI_request
=-11
Indicates that the routine was interrupted because it enters the infinite cycle. This usually happens because the values
ipar
[7]
,
ipar
[8]
,
ipar
[9]
were altered outside of the routine, or the
dcg_check
routine was not called.
RCI_request
= 1
Indicates that you must multiply the matrix by
tmp
[0:
n
- 1]
, put the result in the
tmp
[
n
:2*
n
- 1]
, and return control back to the routine
dcg
.
RCI_request
= 2
Indicates that you must perform the stopping tests. If they fail, return control back to the
dcg
routine. Otherwise, the solution is found and stored in the vector
x
.
RCI_request
= 3
Indicates that you must apply the preconditioner to
[2*
n
:3*
n
- 1]
, put the result in the
[3*
n
:4*
n
- 1]
, and return control back to the routine
dcg
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserverd for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804