Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
f5c04c79
Commit
f5c04c79
authored
Aug 28, 2019
by
Praetorius, Simon
Browse files
Merge branch 'feature/umfpack_error_codes' into 'master'
added error messages to umfpack error codes See merge request
!91
parents
a6444316
bd755d6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/linearalgebra/mtl/UmfpackRunner.hpp
View file @
f5c04c79
...
...
@@ -52,7 +52,7 @@ namespace AMDiS
try
{
solver_
.
reset
(
new
SolverType
(
matrix
,
symmetricStrategy_
,
allocInit_
));
}
catch
(
mtl
::
mat
::
umfpack
::
error
const
&
e
)
{
error_exit
(
"
UMFPACK_ERROR(factorize, {}) = {}"
,
e
.
code
,
e
.
what
()
);
umfpack_
error_exit
(
"
factorize"
,
e
.
code
);
}
}
...
...
@@ -68,7 +68,7 @@ namespace AMDiS
try
{
code
=
(
*
solver_
)(
x
,
b
);
}
catch
(
mtl
::
mat
::
umfpack
::
error
&
e
)
{
error_exit
(
"
UMFPACK_ERROR(solve, {}) = {}"
,
e
.
code
,
e
.
what
()
);
umfpack_
error_exit
(
"
solve"
,
e
.
code
);
}
auto
r
=
Vector
(
b
);
...
...
@@ -81,6 +81,30 @@ namespace AMDiS
return
code
;
}
static
void
umfpack_error_exit
(
std
::
string
solutionPhase
,
int
code
)
{
static
std
::
map
<
int
,
std
::
string
>
error_message
=
{
{
UMFPACK_OK
,
"UMFPACK was successful"
},
{
UMFPACK_WARNING_singular_matrix
,
"Matrix is singular. There are exact zeros on the diagonal."
},
{
UMFPACK_WARNING_determinant_underflow
,
"The determinant is nonzero, but smaller in magnitude than the smallest positive floating-point number."
},
{
UMFPACK_WARNING_determinant_overflow
,
"The determinant is larger in magnitude than the largest positive floating-point number (IEEE Inf)."
},
{
UMFPACK_ERROR_out_of_memory
,
"Not enough memory. The ANSI C malloc or realloc routine failed."
},
{
UMFPACK_ERROR_invalid_Numeric_object
,
"Invalid Numeric object."
},
{
UMFPACK_ERROR_invalid_Symbolic_object
,
"Invalid Symbolic object."
},
{
UMFPACK_ERROR_argument_missing
,
"Some required arguments are missing."
},
{
UMFPACK_ERROR_n_nonpositive
,
"The number of rows or columns of the matrix must be greater than zero."
},
{
UMFPACK_ERROR_invalid_matrix
,
"The matrix is invalid."
},
{
UMFPACK_ERROR_different_pattern
,
"The pattern of the matrix has changed between the symbolic and numeric factorization."
},
{
UMFPACK_ERROR_invalid_system
,
"The sys argument provided to one of the solve routines is invalid."
},
{
UMFPACK_ERROR_invalid_permutation
,
"The permutation vector provided as input is invalid."
},
{
UMFPACK_ERROR_file_IO
,
"Error in file IO"
},
{
UMFPACK_ERROR_ordering_failed
,
"The ordering method failed."
},
{
UMFPACK_ERROR_internal_error
,
"An internal error has occurred, of unknown cause."
}
};
error_exit
(
"UMFPACK_ERROR({}, {}) = {}"
,
solutionPhase
,
code
,
error_message
[
code
]);
}
protected:
std
::
shared_ptr
<
SolverType
>
solver_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment