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