Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Timo Koch
dune-common
Commits
81b2918c
Commit
81b2918c
authored
10 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
eigenvaluetest handles LAPACK dependency
If LAPACK is not available, it return 77 indicating skipped test
parent
a34702f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/common/test/CMakeLists.txt
+2
-3
2 additions, 3 deletions
dune/common/test/CMakeLists.txt
dune/common/test/eigenvaluestest.cc
+7
-0
7 additions, 0 deletions
dune/common/test/eigenvaluestest.cc
with
9 additions
and
3 deletions
dune/common/test/CMakeLists.txt
+
2
−
3
View file @
81b2918c
...
...
@@ -79,9 +79,7 @@ add_executable("dynvectortest" dynvectortest.cc)
add_executable
(
"eigenvaluestest"
eigenvaluestest.cc
)
target_link_libraries
(
eigenvaluestest dunecommon
)
if
(
LAPACK_FOUND
)
target_link_libraries
(
eigenvaluestest
${
LAPACK_LIBRARIES
}
)
endif
(
LAPACK_FOUND
)
target_link_libraries
(
eigenvaluestest
${
LAPACK_LIBRARIES
}
)
add_executable
(
"diagonalmatrixtest"
diagonalmatrixtest.cc
)
target_link_libraries
(
"diagonalmatrixtest"
"dunecommon"
)
...
...
@@ -172,6 +170,7 @@ endforeach(_TEST)
# treat tests returning code 77 as skipped
set_tests_properties
(
eigenvaluestest
mpicollectivecommunication
PROPERTIES SKIP_RETURN_CODE 77
)
...
...
This diff is collapsed.
Click to expand it.
dune/common/test/eigenvaluestest.cc
+
7
−
0
View file @
81b2918c
...
...
@@ -14,6 +14,7 @@
using
namespace
Dune
;
#if HAVE_LAPACK
/** \brief Test the eigenvalue code with the Rosser test matrix
This matrix was a challenge for many matrix eigenvalue
...
...
@@ -124,14 +125,20 @@ void testSymmetricFieldMatrix()
DUNE_THROW
(
MathError
,
"Values computed by FMatrixHelp::eigenValues are not in ascending order"
);
}
}
#endif // HAVE_LAPACK
int
main
()
try
{
#if HAVE_LAPACK
testRosserMatrix
<
double
>
();
testSymmetricFieldMatrix
<
double
>
();
return
0
;
#else
std
::
cout
<<
"WARNING: eigenvaluetest needs LAPACK, test disabled"
<<
std
::
endl
;
return
77
;
#endif // HAVE_LAPACK
}
catch
(
Exception
exception
)
{
std
::
cerr
<<
exception
<<
std
::
endl
;
...
...
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