Visible to Intel only — GUID: GUID-FFB4E4BD-2EB7-43EF-9522-79710A21315B
Visible to Intel only — GUID: GUID-FFB4E4BD-2EB7-43EF-9522-79710A21315B
dcgmrhs
Computes the approximate solution vectors.
Syntax
dcgmrhs(n, x, nrhs, b, RCI_request, ipar, dpar, tmp)
Include Files
- Fortran: mkl_rci.fi, mkl_rci.f90
Description
The routine dcgmrhs computes approximate solution vectors using the CG with multiple right-hand sides (MRHS) method [Young71]. The routine dcgmrhs uses the value that was in the x before the first call as an initial approximation to the solution. The parameter RCI_request gives information about task completion status and requests results of certain operations that are required by the solver.
Note that lengths of all vectors are assumed to have been defined in a previous call to the dcgmrhs_init routine.
Input Parameters
- n
-
INTEGER. Sets the size of the problem, and the sizes of arrays x and b.
- x
-
DOUBLE PRECISION. Array of size n*nrhs. Contains the initial approximation to the solution vectors.
- nrhs
-
INTEGER. Sets the number of right-hand sides.
- b
-
DOUBLE PRECISION. Array of size n*nrhs. Contains the right-hand side vectors.
- tmp
-
DOUBLE PRECISION. Array of size (n, 3+nrhs). Refer to the CG Common Parameters.
Output Parameters
- RCI_request
-
INTEGER. Gives information about result of work of the routine.
- x
-
DOUBLE PRECISION. Array of size (n by nrhs). Contains the updated approximation to the solution vectors.
- ipar
-
INTEGER. Array of size (128+2*nrhs). Refer to the CG Common Parameters.
- dpar
-
DOUBLE PRECISION. Array of size (128+2*nrhs). Refer to the CG Common Parameters.
- tmp
-
DOUBLE PRECISION. Array of size (n, (3+nrhs)). 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 both tests are requested by the user.
- RCI_request=-2
-
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(6) 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(8), ipar(9), ipar(10) 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(1:n,1), put the result in the tmp(1:n,2), 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 tmp(:, 3), put the result in the tmp(:, 4), and return control back to the routine dcg.