Skip to content
Snippets Groups Projects
Commit ea7cc3e5 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[bugfix] Produce a linker error when pardiso lib is not found

If somebody tries to use pardiso despite it not being found,
he should ge t a linker error instead of an exception.
All other bindings handle it that way.

Fixed flyspray/FS#351
parent a1b1f072
No related branches found
No related tags found
1 merge request!4[bugfix] Produce a linker error when pardiso lib is not found
......@@ -24,7 +24,6 @@ extern "C" int F77_FUNC(pardiso)
(void *, int *, int *, int *, int *, int *,
double *, int *, int *, int *, int *, int *,
int *, double *, double *, int *);
#endif
namespace Dune {
......@@ -62,8 +61,6 @@ namespace Dune {
SeqPardiso (const M& A)
: A_(A)
{
#ifdef HAVE_PARDISO
mtype_ = 11;
nrhs_ = 1;
num_procs_ = 1;
......@@ -122,10 +119,6 @@ namespace Dune {
DUNE_THROW(MathError, "Constructor SeqPardiso: Factorization failed. Error code " << error_);
std::cout << "Constructor SeqPardiso: Factorization completed." << std::endl;
#else
DUNE_THROW(NotImplemented, "no Pardiso library available, reconfigure with correct --with-pardiso options");
#endif
}
/*!
......@@ -142,7 +135,6 @@ namespace Dune {
*/
virtual void apply (X& v, const Y& d)
{
#ifdef HAVE_PARDISO
int phase = 33;
iparm_[7] = 1; /* Max numbers of iterative refinement steps. */
......@@ -166,7 +158,6 @@ namespace Dune {
v[i] = x[i];
std::cout << "SeqPardiso: Backsolve completed." << std::endl;
#endif
}
/*!
......@@ -178,7 +169,6 @@ namespace Dune {
~SeqPardiso()
{
#ifdef HAVE_PARDISO
int phase = -1; // Release internal memory.
int idum;
double ddum;
......@@ -189,7 +179,6 @@ namespace Dune {
delete[] a_;
delete[] ia_;
delete[] ja_;
#endif
}
private:
......@@ -214,7 +203,7 @@ namespace Dune {
{
enum { value=true};
};
#endif //HAVE_PARDISO
} // end namespace Dune
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment