Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2_PardisoMKL_def.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Amesos2: Templated Direct Sparse Solver Package
4//
5// Copyright 2011 NTESS and the Amesos2 contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10
19#ifndef AMESOS2_PARDISOMKL_DEF_HPP
20#define AMESOS2_PARDISOMKL_DEF_HPP
21
22#include <map>
23
24#include <Teuchos_Tuple.hpp>
25#include <Teuchos_toString.hpp>
26#include <Teuchos_StandardParameterEntryValidators.hpp>
27
30
31
32namespace Amesos2 {
33
34 namespace PMKL {
35# include <mkl.h>
36# include <mkl_pardiso.h>
37 }
38
39 template <class Matrix, class Vector>
40 PardisoMKL<Matrix,Vector>::PardisoMKL(Teuchos::RCP<const Matrix> A,
41 Teuchos::RCP<Vector> X,
42 Teuchos::RCP<const Vector> B)
43 : SolverCore<Amesos2::PardisoMKL,Matrix,Vector>(A, X, B) // instantiate superclass
44 , n_(Teuchos::as<int_t>(this->globalNumRows_))
45 , perm_(this->globalNumRows_)
46 , nrhs_(0)
47 , is_contiguous_(true)
48 {
49 // set the default matrix type
51
52 PMKL::_INTEGER_t iparm_temp[64];
53 PMKL::_INTEGER_t mtype_temp = mtype_;
54 PMKL::pardisoinit(pt_, &mtype_temp, iparm_temp);
55
56 for( int i = 0; i < 64; ++i ){
57 iparm_[i] = iparm_temp[i];
58 }
59
60 // set single or double precision
61 if constexpr ( std::is_same_v<solver_magnitude_type, PMKL::_REAL_t> ) {
62 iparm_[27] = 1; // single-precision
63 } else {
64 iparm_[27] = 0; // double-precision
65 }
66
67 // Reset some of the default parameters
68 iparm_[34] = 1; // Use zero-based indexing
69#ifdef HAVE_AMESOS2_DEBUG
70 iparm_[26] = 1; // turn the Pardiso matrix checker on
71#endif
72 }
73
74
75 template <class Matrix, class Vector>
77 {
78 /*
79 * Free any memory allocated by the PardisoMKL library functions
80 */
81 int_t error = 0;
82 void *bdummy, *xdummy;
83
84 if( this->root_ ){
85 int_t phase = -1; // release all internal solver memory
86 function_map::pardiso( pt_, const_cast<int_t*>(&maxfct_),
87 const_cast<int_t*>(&mnum_), &mtype_, &phase, &n_,
88 nzvals_view_.data(), rowptr_view_.data(),
89 colind_view_.data(), perm_.getRawPtr(), &nrhs_, iparm_,
90 const_cast<int_t*>(&msglvl_), &bdummy, &xdummy, &error );
91 }
92
93 check_pardiso_mkl_error(Amesos2::CLEAN, error);
94 }
95
96
97 template<class Matrix, class Vector>
98 int
100 {
101 // preOrdering done in PardisoMKL during "Analysis" (aka symbolic
102 // factorization) phase
103
104 return(0);
105 }
106
107
108 template <class Matrix, class Vector>
109 int
111 {
112 int_t error = 0;
113
114 if( this->root_ ){
115#ifdef HAVE_AMESOS2_TIMERS
116 Teuchos::TimeMonitor symbFactTimer( this->timers_.symFactTime_ );
117#endif
118
119 int_t phase = 11;
120 void *bdummy, *xdummy;
121
122 function_map::pardiso( pt_, const_cast<int_t*>(&maxfct_),
123 const_cast<int_t*>(&mnum_), &mtype_, &phase, &n_,
124 nzvals_view_.data(), rowptr_view_.data(),
125 colind_view_.data(), perm_.getRawPtr(), &nrhs_, iparm_,
126 const_cast<int_t*>(&msglvl_), &bdummy, &xdummy, &error );
127 }
128
129 check_pardiso_mkl_error(Amesos2::SYMBFACT, error);
130
131 // Pardiso only lets you retrieve the total number of factor
132 // non-zeros, not for each individually. We should document how
133 // such a situation is reported.
134 this->setNnzLU(iparm_[17]);
135
136 return(0);
137 }
138
139
140 template <class Matrix, class Vector>
141 int
143 {
144 int_t error = 0;
145
146 if( this->root_ ){
147#ifdef HAVE_AMESOS2_TIMERS
148 Teuchos::TimeMonitor numFactTimer( this->timers_.numFactTime_ );
149#endif
150
151 int_t phase = 22;
152 void *bdummy, *xdummy;
153
154 function_map::pardiso( pt_, const_cast<int_t*>(&maxfct_),
155 const_cast<int_t*>(&mnum_), &mtype_, &phase, &n_,
156 nzvals_view_.data(), rowptr_view_.data(),
157 colind_view_.data(), perm_.getRawPtr(), &nrhs_, iparm_,
158 const_cast<int_t*>(&msglvl_), &bdummy, &xdummy, &error );
159 }
160
161 check_pardiso_mkl_error(Amesos2::NUMFACT, error);
162
163 return( 0 );
164 }
165
166
167 template <class Matrix, class Vector>
168 int
170 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const
171 {
172 using Teuchos::as;
173
174 int_t error = 0;
175
176 // Get B data
177 const global_size_type ld_rhs = this->root_ ? X->getGlobalLength() : 0;
178 nrhs_ = as<int_t>(X->getGlobalNumVectors());
179
180 const size_t val_store_size = as<size_t>(ld_rhs * nrhs_);
181 xvals_.resize(val_store_size);
182 bvals_.resize(val_store_size);
183
184 { // Get values from RHS B
185#ifdef HAVE_AMESOS2_TIMERS
186 Teuchos::TimeMonitor mvConvTimer( this->timers_.vecConvTime_ );
187 Teuchos::TimeMonitor redistTimer( this->timers_.vecRedistTime_ );
188#endif
189
192 solver_scalar_type>::do_get(B, bvals_(),
193 as<size_t>(ld_rhs),
194 (is_contiguous_ == true) ? ROOTED : CONTIGUOUS_AND_ROOTED,
195 this->rowIndexBase_);
196 }
197
198 if( this->root_ ){
199#ifdef HAVE_AMESOS2_TIMERS
200 Teuchos::TimeMonitor solveTimer( this->timers_.solveTime_ );
201#endif
202
203 const int_t phase = 33;
204
205 function_map::pardiso( pt_,
206 const_cast<int_t*>(&maxfct_),
207 const_cast<int_t*>(&mnum_),
208 const_cast<int_t*>(&mtype_),
209 const_cast<int_t*>(&phase),
210 const_cast<int_t*>(&n_),
211 const_cast<solver_scalar_type*>(nzvals_view_.data()),
212 const_cast<int_t*>(rowptr_view_.data()),
213 const_cast<int_t*>(colind_view_.data()),
214 const_cast<int_t*>(perm_.getRawPtr()),
215 &nrhs_,
216 const_cast<int_t*>(iparm_),
217 const_cast<int_t*>(&msglvl_),
218 as<void*>(bvals_.getRawPtr()),
219 as<void*>(xvals_.getRawPtr()), &error );
220 }
221
222 check_pardiso_mkl_error(Amesos2::SOLVE, error);
223
224 /* Export X from root to the global space */
225 {
226#ifdef HAVE_AMESOS2_TIMERS
227 Teuchos::TimeMonitor redistTimer(this->timers_.vecRedistTime_);
228#endif
229
232 solver_scalar_type>::do_put(X, xvals_(),
233 as<size_t>(ld_rhs),
234 (is_contiguous_ == true) ? ROOTED : CONTIGUOUS_AND_ROOTED);
235 }
236
237 return( 0 );
238}
239
240
241 template <class Matrix, class Vector>
242 bool
244 {
245 // PardisoMKL supports square matrices
246 return( this->globalNumRows_ == this->globalNumCols_ );
247 }
248
249
250 template <class Matrix, class Vector>
251 void
252 PardisoMKL<Matrix,Vector>::setParameters_impl(const Teuchos::RCP<Teuchos::ParameterList> & parameterList )
253 {
254 using Teuchos::RCP;
255 using Teuchos::getIntegralValue;
256 using Teuchos::ParameterEntryValidator;
257
258 RCP<const Teuchos::ParameterList> valid_params = getValidParameters_impl();
259
260 // Fill-in reordering: 0 = minimum degree, 2 = METIS 4.0.1 (default), 3 = METIS 5.1, 4 = AMD,
261 if( parameterList->isParameter("IPARM(2)") )
262 {
263 RCP<const ParameterEntryValidator> fillin_validator = valid_params->getEntry("IPARM(2)").validator();
264 parameterList->getEntry("IPARM(2)").setValidator(fillin_validator);
265 iparm_[1] = getIntegralValue<int>(*parameterList, "IPARM(2)");
266 }
267
268 // Iterative-direct algorithm
269 if( parameterList->isParameter("IPARM(4)") )
270 {
271 RCP<const ParameterEntryValidator> prec_validator = valid_params->getEntry("IPARM(4)").validator();
272 parameterList->getEntry("IPARM(4)").setValidator(prec_validator);
273 iparm_[3] = getIntegralValue<int>(*parameterList, "IPARM(4)");
274 }
275
276 // Max numbers of iterative refinement steps
277 if( parameterList->isParameter("IPARM(8)") )
278 {
279 RCP<const ParameterEntryValidator> refine_validator = valid_params->getEntry("IPARM(8)").validator();
280 parameterList->getEntry("IPARM(8)").setValidator(refine_validator);
281 iparm_[7] = getIntegralValue<int>(*parameterList, "IPARM(8)");
282 }
283
284 // Perturb the pivot elements
285 if( parameterList->isParameter("IPARM(10)") )
286 {
287 RCP<const ParameterEntryValidator> pivot_perturb_validator = valid_params->getEntry("IPARM(10)").validator();
288 parameterList->getEntry("IPARM(10)").setValidator(pivot_perturb_validator);
289 iparm_[9] = getIntegralValue<int>(*parameterList, "IPARM(10)");
290 }
291
292 // First check if the control object requests a transpose solve.
293 // Then solver specific options can override this.
294 iparm_[11] = this->control_.useTranspose_ ? 2 : 0;
295
296 // Normal solve (0), or a transpose solve (1)
297 if( parameterList->isParameter("IPARM(12)") )
298 {
299 RCP<const ParameterEntryValidator> trans_validator = valid_params->getEntry("IPARM(12)").validator();
300 parameterList->getEntry("IPARM(12)").setValidator(trans_validator);
301 iparm_[11] = getIntegralValue<int>(*parameterList, "IPARM(12)");
302 }
303
304 // (Non-)symmetric matchings : detault 1 for nonsymmetric and 0 for symmetric matrix (default is nonsymmetric)
305 if( parameterList->isParameter("IPARM(13)") )
306 {
307 RCP<const ParameterEntryValidator> trans_validator = valid_params->getEntry("IPARM(13)").validator();
308 parameterList->getEntry("IPARM(13)").setValidator(trans_validator);
309 iparm_[12] = getIntegralValue<int>(*parameterList, "IPARM(13)");
310 }
311
312 // Output: Number of nonzeros in the factor LU
313 if( parameterList->isParameter("IPARM(18)") )
314 {
315 RCP<const ParameterEntryValidator> report_validator = valid_params->getEntry("IPARM(18)").validator();
316 parameterList->getEntry("IPARM(18)").setValidator(report_validator);
317 iparm_[17] = getIntegralValue<int>(*parameterList, "IPARM(18)");
318 }
319
320 // Scheduling method for the parallel numerical factorization
321 if( parameterList->isParameter("IPARM(24)") )
322 {
323 RCP<const ParameterEntryValidator> par_fact_validator = valid_params->getEntry("IPARM(24)").validator();
324 parameterList->getEntry("IPARM(24)").setValidator(par_fact_validator);
325 iparm_[23] = getIntegralValue<int>(*parameterList, "IPARM(24)");
326 }
327
328 // Parallelization scheme for the forward and backward solv
329 if( parameterList->isParameter("IPARM(25)") )
330 {
331 RCP<const ParameterEntryValidator> par_fbsolve_validator = valid_params->getEntry("IPARM(25)").validator();
332 parameterList->getEntry("IPARM(25)").setValidator(par_fbsolve_validator);
333 iparm_[24] = getIntegralValue<int>(*parameterList, "IPARM(25)");
334 }
335
336 // Graph compression scheme for METIS.
337 if( parameterList->isParameter("IPARM(60)") )
338 {
339 RCP<const ParameterEntryValidator> ooc_validator = valid_params->getEntry("IPARM(60)").validator();
340 parameterList->getEntry("IPARM(60)").setValidator(ooc_validator);
341 iparm_[59] = getIntegralValue<int>(*parameterList, "IPARM(60)");
342 }
343
344 if( parameterList->isParameter("IsContiguous") ){
345 is_contiguous_ = parameterList->get<bool>("IsContiguous");
346 }
347 }
348
349
350/*
351 * TODO: It would be nice if the parameters could be expressed as
352 * either all string or as all integers. I see no way of doing this
353 * at present with the standard validators. However, we could create
354 * our own validators or kindly ask the Teuchos team to add some
355 * features for use.
356 *
357 * The issue is that with the current validators we cannot specify
358 * arbitrary sets of numbers that are the only allowed parameters.
359 * For example the IPARM(2) parameter can take only the values 0, 2,
360 * and 3. The EnhancedNumberValidator can take a min value, and max
361 * value, and a step size, but with those options there is no way to
362 * specify the needed set.
363 *
364 * Another missing feature is the ability to give docstrings for such
365 * numbers. For example IPARM(25) can take on the values 0 and 1.
366 * This would be easy enough to accomplish with just a number
367 * validator, but then have no way to document the effect of each
368 * value.
369 */
370template <class Matrix, class Vector>
371Teuchos::RCP<const Teuchos::ParameterList>
373{
374 using std::string;
375 using Teuchos::as;
376 using Teuchos::RCP;
377 using Teuchos::tuple;
378 using Teuchos::toString;
379 using Teuchos::EnhancedNumberValidator;
380 using Teuchos::setStringToIntegralParameter;
381 using Teuchos::anyNumberParameterEntryValidator;
382
383 static Teuchos::RCP<const Teuchos::ParameterList> valid_params;
384
385 if( is_null(valid_params) ){
386 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
387
388 // Use pardisoinit to get some default values;
389 void *pt_dummy[64];
390 PMKL::_INTEGER_t mtype_temp = mtype_;
391 PMKL::_INTEGER_t iparm_temp[64];
392 PMKL::pardisoinit(pt_dummy,
393 const_cast<PMKL::_INTEGER_t*>(&mtype_temp),
394 const_cast<PMKL::_INTEGER_t*>(iparm_temp));
395
396 setStringToIntegralParameter<int>("IPARM(2)", toString(iparm_temp[1]),
397 "Fill-in reducing ordering for the input matrix",
398 tuple<string>("0", "2", "3"),
399 tuple<string>("The minimum degree algorithm",
400 "Nested dissection algorithm from METIS",
401 "OpenMP parallel nested dissection algorithm"),
402 tuple<int>(0, 2, 3),
403 pl.getRawPtr());
404
405 Teuchos::RCP<EnhancedNumberValidator<int> > iparm_4_validator
406 = Teuchos::rcp( new EnhancedNumberValidator<int>() );
407 iparm_4_validator->setMin(0);
408 pl->set("IPARM(4)" , as<int>(iparm_temp[3]) , "Preconditioned CGS/CG",
409 iparm_4_validator);
410
411 setStringToIntegralParameter<int>("IPARM(12)", toString(iparm_temp[11]),
412 "Solve with transposed or conjugate transposed matrix A",
413 tuple<string>("0", "1", "2"),
414 tuple<string>("Non-transposed",
415 "Conjugate-transposed",
416 "Transposed"),
417 tuple<int>(0, 1, 2),
418 pl.getRawPtr());
419
420 setStringToIntegralParameter<int>("IPARM(13)", toString(iparm_temp[12]),
421 "Use weighted matching",
422 tuple<string>("0", "1"),
423 tuple<string>("No matching", "Use matching"),
424 tuple<int>(0, 1),
425 pl.getRawPtr());
426
427 setStringToIntegralParameter<int>("IPARM(24)", toString(iparm_temp[23]),
428 "Parallel factorization control",
429 tuple<string>("0", "1"),
430 tuple<string>("PARDISO uses the previous algorithm for factorization",
431 "PARDISO uses the new two-level factorization algorithm"),
432 tuple<int>(0, 1),
433 pl.getRawPtr());
434
435 setStringToIntegralParameter<int>("IPARM(25)", toString(iparm_temp[24]),
436 "Parallel forward/backward solve control",
437 tuple<string>("0", "1"),
438 tuple<string>("PARDISO uses the parallel algorithm for the solve step",
439 "PARDISO uses the sequential forward and backward solve"),
440 tuple<int>(0, 1),
441 pl.getRawPtr());
442
443 setStringToIntegralParameter<int>("IPARM(60)", toString(iparm_temp[59]),
444 "PARDISO mode (OOC mode)",
445 tuple<string>("0", "2"),
446 tuple<string>("In-core PARDISO",
447 "Out-of-core PARDISO. The OOC PARDISO can solve very "
448 "large problems by holding the matrix factors in files "
449 "on the disk. Hence the amount of RAM required by OOC "
450 "PARDISO is significantly reduced."),
451 tuple<int>(0, 2),
452 pl.getRawPtr());
453
454 Teuchos::AnyNumberParameterEntryValidator::EPreferredType preferred_int =
455 Teuchos::AnyNumberParameterEntryValidator::PREFER_INT;
456
457 Teuchos::AnyNumberParameterEntryValidator::AcceptedTypes accept_int( false );
458 accept_int.allowInt( true );
459
460 pl->set("IPARM(8)" , as<int>(iparm_temp[7]) , "Iterative refinement step",
461 anyNumberParameterEntryValidator(preferred_int, accept_int));
462
463 pl->set("IPARM(10)", as<int>(iparm_temp[9]) , "Pivoting perturbation",
464 anyNumberParameterEntryValidator(preferred_int, accept_int));
465
466 pl->set("IPARM(18)", as<int>(iparm_temp[17]), "Report the number of non-zero elements in the factors",
467 anyNumberParameterEntryValidator(preferred_int, accept_int));
468
469 pl->set("IsContiguous", true, "Whether GIDs contiguous");
470
471 valid_params = pl;
472 }
473
474 return valid_params;
475}
476
477
478
479template <class Matrix, class Vector>
480bool
482{
483#ifdef HAVE_AMESOS2_TIMERS
484 Teuchos::TimeMonitor convTimer(this->timers_.mtxConvTime_);
485#endif
486
487 // PardisoMKL does not need matrix data in the pre-ordering phase
488 if( current_phase == PREORDERING ) return( false );
489
490 if( this->root_ ){
491 Kokkos::resize(nzvals_view_, this->globalNumNonZeros_);
492 Kokkos::resize(colind_view_, this->globalNumNonZeros_);
493 Kokkos::resize(rowptr_view_, this->globalNumRows_ + 1);
494 }
495
496 {
497#ifdef HAVE_AMESOS2_TIMERS
498 Teuchos::TimeMonitor mtxRedistTimer( this->timers_.mtxRedistTime_ );
499#endif
500
501 int_t nnz_ret = 0;
504 host_value_type_array, host_ordinal_type_array, host_size_type_array>::do_get(
505 this->matrixA_.ptr(),
506 nzvals_view_, colind_view_, rowptr_view_, nnz_ret,
507 (is_contiguous_ == true) ? ROOTED : CONTIGUOUS_AND_ROOTED,
509 this->rowIndexBase_);
510 }
511
512 return( true );
513}
514
515
516template <class Matrix, class Vector>
517void
519 int_t error) const
520{
521 int error_i = error;
522 Teuchos::broadcast(*(this->getComm()), 0, &error_i); // We only care about root's value
523
524 if( error == 0 ) return; // No error
525
526 std::string errmsg = "Other error";
527 switch( error ){
528 case -1:
529 errmsg = "PardisoMKL reported error: 'Input inconsistent'";
530 break;
531 case -2:
532 errmsg = "PardisoMKL reported error: 'Not enough memory'";
533 break;
534 case -3:
535 errmsg = "PardisoMKL reported error: 'Reordering problem'";
536 break;
537 case -4:
538 errmsg =
539 "PardisoMKL reported error: 'Zero pivot, numerical "
540 "factorization or iterative refinement problem'";
541 break;
542 case -5:
543 errmsg = "PardisoMKL reported error: 'Unclassified (internal) error'";
544 break;
545 case -6:
546 errmsg = "PardisoMKL reported error: 'Reordering failed'";
547 break;
548 case -7:
549 errmsg = "PardisoMKL reported error: 'Diagonal matrix is singular'";
550 break;
551 case -8:
552 errmsg = "PardisoMKL reported error: '32-bit integer overflow problem'";
553 break;
554 case -9:
555 errmsg = "PardisoMKL reported error: 'Not enough memory for OOC'";
556 break;
557 case -10:
558 errmsg = "PardisoMKL reported error: 'Problems with opening OOC temporary files'";
559 break;
560 case -11:
561 errmsg = "PardisoMKL reported error: 'Read/write problem with OOC data file'";
562 break;
563 }
564
565 TEUCHOS_TEST_FOR_EXCEPTION( true, std::runtime_error, errmsg );
566}
567
568
569template <class Matrix, class Vector>
570void
572{
573 if( mtype == 0 ){
574 if( complex_ ){
575 mtype_ = 13; // complex, unsymmetric
576 } else {
577 mtype_ = 11; // real, unsymmetric
578 }
579 } else {
580 switch( mtype ){
581 case 11:
582 TEUCHOS_TEST_FOR_EXCEPTION( complex_,
583 std::invalid_argument,
584 "Cannot set a real Pardiso matrix type with scalar type complex" );
585 mtype_ = 11; break;
586 case 13:
587 TEUCHOS_TEST_FOR_EXCEPTION( !complex_,
588 std::invalid_argument,
589 "Cannot set a complex Pardiso matrix type with non-complex scalars" );
590 mtype_ = 13; break;
591 default:
592 TEUCHOS_TEST_FOR_EXCEPTION( true,
593 std::invalid_argument,
594 "Symmetric matrices are not yet supported by the Amesos2 interface" );
595 }
596 }
597}
598
599
600template <class Matrix, class Vector>
601const char* PardisoMKL<Matrix,Vector>::name = "PARDISOMKL";
602
603template <class Matrix, class Vector>
604const typename PardisoMKL<Matrix,Vector>::int_t
606
607template <class Matrix, class Vector>
608const typename PardisoMKL<Matrix,Vector>::int_t
610
611template <class Matrix, class Vector>
612const typename PardisoMKL<Matrix,Vector>::int_t
614
615
616} // end namespace Amesos
617
618#endif // AMESOS2_PARDISOMKL_DEF_HPP
A template class that does nothing useful besides show developers what, in general,...
@ ROOTED
Definition Amesos2_TypeDecl.hpp:93
@ CONTIGUOUS_AND_ROOTED
Definition Amesos2_TypeDecl.hpp:94
@ SORTED_INDICES
Definition Amesos2_TypeDecl.hpp:108
A Matrix adapter interface for Amesos2.
Definition Amesos2_MatrixAdapter_decl.hpp:42
Amesos2 interface to the PardisoMKL package.
Definition Amesos2_PardisoMKL_decl.hpp:50
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition Amesos2_PardisoMKL_def.hpp:372
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > &parameterList)
Definition Amesos2_PardisoMKL_def.hpp:252
~PardisoMKL()
Destructor.
Definition Amesos2_PardisoMKL_def.hpp:76
int_t mtype_
The matrix type. We deal only with unsymmetrix matrices.
Definition Amesos2_PardisoMKL_decl.hpp:257
PardisoMKL(Teuchos::RCP< const Matrix > A, Teuchos::RCP< Vector > X, Teuchos::RCP< const Vector > B)
Initialize from Teuchos::RCP.
Definition Amesos2_PardisoMKL_def.hpp:40
int_t iparm_[64]
Definition Amesos2_PardisoMKL_decl.hpp:267
int numericFactorization_impl()
PardisoMKL specific numeric factorization.
Definition Amesos2_PardisoMKL_def.hpp:142
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition Amesos2_PardisoMKL_def.hpp:243
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition Amesos2_PardisoMKL_def.hpp:481
void set_pardiso_mkl_matrix_type(int_t mtype=0)
Definition Amesos2_PardisoMKL_def.hpp:571
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
PardisoMKL specific solve.
Definition Amesos2_PardisoMKL_def.hpp:169
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition Amesos2_PardisoMKL_def.hpp:99
void check_pardiso_mkl_error(EPhase phase, int_t error) const
Throws an appropriate runtime error in the event that error < 0 .
Definition Amesos2_PardisoMKL_def.hpp:518
void * pt_[64]
PardisoMKL internal data address pointer.
Definition Amesos2_PardisoMKL_decl.hpp:255
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using PardisoMKL.
Definition Amesos2_PardisoMKL_def.hpp:110
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers.
Definition Amesos2_SolverCore_decl.hpp:72
EPhase
Used to indicate a phase in the direct solution.
Definition Amesos2_TypeDecl.hpp:31
A templated MultiVector class adapter for Amesos2.
Definition Amesos2_MultiVecAdapter_decl.hpp:142
Helper class for getting 1-D copies of multivectors.
Definition Amesos2_MultiVecAdapter_decl.hpp:233
Similar to get_ccs_helper , but used to get a CRS representation of the given matrix.
Definition Amesos2_Util.hpp:644
Helper class for putting 1-D data arrays into multivectors.
Definition Amesos2_MultiVecAdapter_decl.hpp:339