Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
amdis
amdis-core
Commits
bd755d6c
Commit
bd755d6c
authored
5 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
added error messages to umfpack error codes
parent
a6444316
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/amdis/linearalgebra/mtl/UmfpackRunner.hpp
+26
-2
26 additions, 2 deletions
src/amdis/linearalgebra/mtl/UmfpackRunner.hpp
with
26 additions
and
2 deletions
src/amdis/linearalgebra/mtl/UmfpackRunner.hpp
+
26
−
2
View file @
bd755d6c
...
...
@@ -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_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment