Skip to content
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

Merged
merged 1 commit into from
Apr 16, 2020
Merged

Add unit tests #42

merged 1 commit into from
Apr 16, 2020

Conversation

streeve
Copy link
Member

@streeve streeve commented Mar 31, 2020

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

@streeve streeve mentioned this pull request Mar 31, 2020
@streeve streeve changed the title Add unit tests [WIP] Add unit tests Apr 2, 2020
@streeve streeve force-pushed the unit_test branch 2 times, most recently from c7c62e0 to 7807193 Compare April 3, 2020 23:48
@streeve streeve changed the title [WIP] Add unit tests Add unit tests Apr 3, 2020
@streeve
Copy link
Member Author

streeve commented Apr 3, 2020

Updated this to add only integration test (wait on neighbor tests until those PRs are done) - this is ready for review

@streeve streeve requested a review from sslattery April 3, 2020 23:58
Copy link
Collaborator

@sslattery sslattery left a 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.

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)
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#ifndef CABANA_TEST_PTHREAD_CATEGORY_HPP
#define CABANA_TEST_PTHREAD_CATEGORY_HPP

#define TEST_CATEGORY pthread
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@sslattery sslattery self-requested a review April 16, 2020 19:47
@sslattery sslattery merged commit 0f42aaa into ECP-copa:master Apr 16, 2020
@streeve streeve deleted the unit_test branch April 16, 2020 19:54
@streeve streeve mentioned this pull request Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants