Skip to content

Commit

Permalink
Merge pull request #64 from streeve/unittest_neighbor
Browse files Browse the repository at this point in the history
Add neighbor list unit test
  • Loading branch information
streeve authored Jul 17, 2020
2 parents 6aff9b0 + dd70f51 commit d92e577
Show file tree
Hide file tree
Showing 9 changed files with 394 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmake/FindCLANG_FORMAT.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright (c) 2019 by the Cabana authors #
# Copyright (c) 2020 by the Cabana authors #
# All rights reserved. #
# #
# This file is part of the Cabana library. Cabana is distributed under a #
Expand Down
17 changes: 12 additions & 5 deletions unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ set(gtest_args --gtest_color=yes)
##--------------------------------------------------------------------------##
macro(CabanaMD_add_tests)
cmake_parse_arguments(CABANAMD_UNIT_TEST "MPI" "" "NAMES" ${ARGN})
set(CABANAMD_UNIT_TEST_MPIEXEC_NUMPROCS 1 2)
if(MPIEXEC_MAX_NUMPROCS GREATER 2)
list(APPEND CABANAMD_UNIT_TEST_MPIEXEC_NUMPROCS ${MPIEXEC_MAX_NUMPROCS})
set(CABANAMD_UNIT_TEST_MPIEXEC_NUMPROCS 1)
if(CABANAMD_UNIT_TEST_MPI)
list(APPEND CABANAMD_UNIT_TEST_MPIEXEC_NUMPROCS 2)
if(MPIEXEC_MAX_NUMPROCS GREATER 1)
list(APPEND CABANAMD_UNIT_TEST_MPIEXEC_NUMPROCS ${MPIEXEC_MAX_NUMPROCS})
endif()
endif()
set(CABANAMD_UNIT_TEST_NUMTHREADS 1 2)
set(CABANAMD_UNIT_TEST_MAIN unit_test_main.cpp)

set(CABANAMD_UNIT_TEST_MAIN mpi_unit_test_main.cpp)

foreach(_device SERIAL OPENMP CUDA HIP)
if(Kokkos_ENABLE_${_device})
Expand Down Expand Up @@ -46,4 +50,7 @@ macro(CabanaMD_add_tests)
endforeach()
endmacro()

CabanaMD_add_tests(MPI NAMES Integrator)
CabanaMD_add_tests(NAMES Integrator Neighbor)

# TODO:
#CabanaMD_add_tests(MPI NAMES Comm)
2 changes: 1 addition & 1 deletion unit_test/TestCUDA_Category.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2018-2019 by the Cabana authors *
* Copyright (c) 2018-2020 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
Expand Down
2 changes: 1 addition & 1 deletion unit_test/TestCUDA_UVM_Category.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2018-2019 by the Cabana authors *
* Copyright (c) 2018-2020 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
Expand Down
2 changes: 1 addition & 1 deletion unit_test/TestOPENMP_Category.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2018-2019 by the Cabana authors *
* Copyright (c) 2018-2020 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
Expand Down
2 changes: 1 addition & 1 deletion unit_test/TestSERIAL_Category.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2018-2019 by the Cabana authors *
* Copyright (c) 2018-2020 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2018-2019 by the Cabana authors *
* Copyright (c) 2018-2020 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
Expand Down
2 changes: 1 addition & 1 deletion unit_test/tstIntegrator.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2018-2019 by the Cabana authors *
* Copyright (c) 2018-2020 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
Expand Down
Loading

0 comments on commit d92e577

Please sign in to comment.