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

Container Tests Refactoring #301

Merged
merged 87 commits into from
Feb 20, 2020
Merged

Conversation

HobbyProgrammer
Copy link
Contributor

@HobbyProgrammer HobbyProgrammer commented Jul 9, 2019

Description

Refactors the tests of the containers to remove duplicate code.

TODO:

  • Pull together common tests for all containers
  • Write generic ContainerVersusContainer test and use it for all versus tests.
  • Check globals in TraversalComparison
  • Check halo particles
  • Check slight moves
  • Cell size factors

not done

  • Pull together common tests for all Verlet lists containers
  • Check that Verlet-like containers need at most as many flops as others these tests have now actually been removed.

Fixes

  • fixes incorrect calculation of globals when using the ClusterFunctor.
  • fixes incorrect calculation of globals when using the LJFunctorCudaGlobals and more than 64 particles per cell.
  • fixes C01CudaTraversal claiming to be applicable for cellLengths < interactionLength, see also cellsize support < 1.0 for C01CudaTraversal #417
  • fixes incorrect calculation of energy in LJFunctorCudaGlobals. only bodyBodyFN3, i.e., cell pairs and newton3 and interactions with halo particles.
  • fixes misplaced __syncthreads() in SoAFunctorN3Pair() of LJFunctorCuda(Globals).cu

hotfixes

Related Pull Requests

None

Resolved Issues

How Has This Been Tested?

This adds lots of tests.

Notes

The gtest_discover_tests does now take more than a minute. I have submitted a merge request to fix this:
https://gitlab.kitware.com/cmake/cmake/merge_requests/4371

The old tests that are fully replaced by the new tests are deleted. testIsContainerUpdateNeeded() has a partially replacement, but since it is not fully replacable, the old tests remain.
@HobbyProgrammer
Copy link
Contributor Author

For the generic ContainerVersusContainer test:

  • Should this be run for all traversals or only for the containers?
  • How should the kernel call and distance calculation count checks be build into these generic tests, as there are several exceptions depending on the traversal or container?

@HobbyProgrammer
Copy link
Contributor Author

For the common tests for all containers:

  • How much can isContainerUpdateNeeded() be tested generically? Is there something else than testing than a container update is needed if a particle moves to halo?

@Garfield96
Copy link
Contributor

As far as I know, @SteffenSeckler wants to extend the AutoPasInterfaceTest to test 2 containers against each other. A basic version is already there.

@HobbyProgrammer
Copy link
Contributor Author

As far as I know, @SteffenSeckler wants to extend the AutoPasInterfaceTest to test 2 containers against each other. A basic version is already there.

I think these tests will only test the containers with very few particles against each other. Correct me if I am wrong @SteffenSeckler.

@Garfield96 Garfield96 mentioned this pull request Jul 18, 2019
2 tasks
# Conflicts:
#	src/autopas/containers/linkedCells/traversals/C04SoACellHandler.h
#	tests/testAutopas/tests/containers/directSum/DirectSumContainerTest.cpp
#	tests/testAutopas/tests/containers/linkedCells/LinkedCellsTest.cpp
#	tests/testAutopas/tests/containers/linkedCells/traversals/C04SoATraversalTest.cpp
Jenkinsfile Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
src/autopas/containers/ParticleContainerInterface.h Outdated Show resolved Hide resolved
src/autopas/containers/ParticleContainerInterface.h Outdated Show resolved Hide resolved
tests/testAutopas/tests/containers/TraversalComparison.cpp Outdated Show resolved Hide resolved
tests/testAutopas/tests/containers/TraversalComparison.cpp Outdated Show resolved Hide resolved
tests/testAutopas/tests/containers/TraversalComparison.cpp Outdated Show resolved Hide resolved
tests/testAutopas/tests/containers/TraversalComparison.cpp Outdated Show resolved Hide resolved
src/autopas/LogicHandler.h Outdated Show resolved Hide resolved
Co-Authored-By: FG-TUM <FG-TUM@users.noreply.github.com>
@SteffenSeckler SteffenSeckler merged commit 981c734 into master Feb 20, 2020
@SteffenSeckler SteffenSeckler deleted the container-tests-refactoring branch February 20, 2020 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C04SoA Traversal is not compared with others in tests
4 participants