-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit tests #42
Add unit tests #42
Conversation
c7c62e0
to
7807193
Compare
Updated this to add only integration test (wait on neighbor tests until those PRs are done) - this is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small things.
unit_test/CMakeLists.txt
Outdated
set(_target ${_test}_test_${_uppercase_device}) | ||
add_executable(${_target} ${_file} ${CABANAMD_UNIT_TEST_MAIN}) | ||
target_include_directories(${_target} PRIVATE ${_dir} ${CMAKE_CURRENT_SOURCE_DIR}) | ||
target_link_libraries(${_target} PRIVATE CabanaMD gtest Cabana::cabanacore Kokkos::kokkos MPI::MPI_CXX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have your own CabanaMD target you can link instead? You would likely just need to link that single target instead of the list of targets here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
unit_test/TestTHREADS_Category.hpp
Outdated
#ifndef CABANA_TEST_PTHREAD_CATEGORY_HPP | ||
#define CABANA_TEST_PTHREAD_CATEGORY_HPP | ||
|
||
#define TEST_CATEGORY pthread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have a Threads
device type listed in your CMakeLists.txt
for the unit tests so you probably don't need this file. We haven't been testing against pthreads as everything seems to have moved to OpenMP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
This adds a simple integrator test, with most of the other code copied from Cabana.
The intent is to add tests for at least each of the main classes - this is the first step for #44