Skip to content

Commit 02a0b64

Browse files
committed
*: -vpic vestiges
1 parent 62cfb00 commit 02a0b64

8 files changed

Lines changed: 19 additions & 31 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
cmake_minimum_required (VERSION 3.21)
2+
cmake_minimum_required(VERSION 3.21)
33

44
foreach(policy
5-
CMP0074 # CMake 3.12
6-
CMP0104 # CMAKE_CUDA_ARCHITECTURES
7-
)
5+
CMP0074 # CMake 3.12
6+
CMP0104 # CMAKE_CUDA_ARCHITECTURES
7+
)
88
if(POLICY ${policy})
99
cmake_policy(SET ${policy} NEW)
1010
endif()
@@ -27,7 +27,6 @@ endfunction()
2727

2828
set(PSC_GPU "host" CACHE STRING "Build with GPU supoort (host/cuda/hip)")
2929
set_property(CACHE PSC_GPU PROPERTY STRINGS "host;cuda;hip")
30-
option(USE_VPIC "Interface with VPIC" OFF)
3130
option(USE_GTEST_DISCOVER_TESTS "Run tests to discover contained googletest cases" OFF)
3231
psc_option(ADIOS2 "Build with adios2 support" AUTO)
3332
option(PSC_USE_NVTX "Build with NVTX support" OFF)
@@ -37,8 +36,8 @@ option(PSC_USE_PERFETTO "Turn on perfetto-based tracing" OFF)
3736

3837
option(USE_CUDA "Build CUDA components" OFF)
3938

40-
if (USE_CUDA)
41-
set(PSC_GPU "cuda" CACHE STRING "Build with GPU supoort (none/cuda/hip)")
39+
if(USE_CUDA)
40+
set(PSC_GPU "cuda" CACHE STRING "Build with GPU supoort (none/cuda/hip)")
4241
endif()
4342

4443
if(PSC_GPU STREQUAL "cuda")
@@ -56,6 +55,7 @@ elseif(PSC_GPU STREQUAL "hip")
5655
else()
5756
set(USE_CUDA OFF)
5857
endif()
58+
5959
set(GTENSOR_DEVICE "${PSC_GPU}" CACHE STRING "")
6060

6161
CPMAddPackage(
@@ -65,14 +65,14 @@ CPMAddPackage(
6565
VERSION 0.0.0
6666
)
6767

68-
if (BUILD_TESTING)
68+
if(BUILD_TESTING)
6969
CPMAddPackage(
7070
NAME GTest
7171
GITHUB_REPOSITORY google/googletest
7272
VERSION 1.14.0
7373
OPTIONS
74-
"INSTALL_GTEST OFF"
75-
"gtest_force_shared_crt ON"
74+
"INSTALL_GTEST OFF"
75+
"gtest_force_shared_crt ON"
7676
)
7777
include(GoogleTest)
7878
endif()
@@ -86,23 +86,24 @@ if(PSC_USE_ADIOS2 STREQUAL AUTO)
8686
elseif(PSC_USE_ADIOS2)
8787
find_package(ADIOS2 CONFIG REQUIRED)
8888
endif()
89+
8990
if(ADIOS2_FOUND)
9091
set(PSC_HAVE_ADIOS2 1)
9192
endif()
9293

9394
# NVTX
94-
if (PSC_USE_NVTX)
95+
if(PSC_USE_NVTX)
9596
find_package(CUDAToolkit REQUIRED)
9697
set(PSC_HAVE_NVTX 1)
9798
endif()
9899

99100
# RMM
100-
if (PSC_USE_RMM)
101+
if(PSC_USE_RMM)
101102
find_package(rmm 0.18.0 CONFIG REQUIRED)
102103
set(PSC_HAVE_RMM 1)
103104
endif()
104105

105-
if (PSC_USE_PERFETTO)
106+
if(PSC_USE_PERFETTO)
106107
CPMAddPackage("gh:google/perfetto@24.2")
107108
find_package(Threads REQUIRED)
108109
add_library(perfetto STATIC ${perfetto_SOURCE_DIR}/sdk/perfetto.cc)
@@ -113,6 +114,7 @@ endif()
113114

114115
function(GenerateHeaderConfig)
115116
set(PSC_CONFIG_DEFINES)
117+
116118
foreach(OPT IN LISTS ARGN)
117119
string(APPEND PSC_CONFIG_DEFINES "
118120
/* CMake Option: PSC_USE_${OPT}=${PSC_USE_${OPT}} */
@@ -130,11 +132,12 @@ function(GenerateHeaderConfig)
130132
)
131133
endfunction()
132134

133-
# FIXME, unify USE_CUDA, USE_VPIC options / autodetect
135+
# FIXME, unify USE_CUDA options / autodetect
134136
# FIXME, mv helpers into separate file
135137
GenerateHeaderConfig(ADIOS2 NVTX RMM)
136138

137139
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src/include)
140+
138141
# FIXME, this seems too ugly to find mrc_config.h
139142
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src/libmrc/include)
140143

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ $ cat > cmake.sh <<EOF
2828
cmake \
2929
-DCMAKE_BUILD_TYPE=Release \
3030
-DUSE_CUDA=OFF \
31-
-DUSE_VPIC=OFF \
3231
..
3332
EOF
3433
$ . cmake.sh # run cmake (hope for the best)

src/include/PscConfig.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
*/
2222

2323
#cmakedefine USE_CUDA
24-
#cmakedefine USE_VPIC
2524

2625
/* Everything past this line is programatically generated */
2726

src/include/checkpoint.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void write_checkpoint(const Grid_t& grid, Mparticles& mprts,
2323

2424
prof_start(pr);
2525
mpi_printf(grid.comm(), "**** Writing checkpoint...\n");
26-
#if defined(PSC_HAVE_ADIOS2) && !defined(VPIC)
26+
#if defined(PSC_HAVE_ADIOS2)
2727
prof_start(pr_A);
2828
MPI_Barrier(grid.comm()); // not really necessary
2929
prof_stop(pr_A);

src/libpsc/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,6 @@ if(PSC_BOUNDS_CHECK)
7272
target_compile_definitions(psc PUBLIC BOUNDS_CHECK)
7373
endif()
7474

75-
if(USE_VPIC)
76-
add_library(VPIC::VPIC INTERFACE IMPORTED)
77-
set_target_properties(VPIC::VPIC PROPERTIES
78-
INTERFACE_INCLUDE_DIRECTORIES "/Users/kai/build/vpic/src"
79-
INTERFACE_LINK_LIBRARIES "/Users/kai/build/vpic/build/libvpic.a"
80-
)
81-
82-
target_link_libraries(psc PUBLIC VPIC::VPIC)
83-
endif()
84-
8575
if(BUILD_TESTING)
8676
add_subdirectory(tests)
8777
endif()

src/libpsc/tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ add_psc_test(test_push_fields)
3737
add_psc_test(test_moments)
3838
add_psc_test(test_collision)
3939

40-
if(USE_CUDA AND NOT USE_VPIC)
40+
if(USE_CUDA)
4141
add_psc_test(test_collision_cuda)
4242
endif()
4343

src/libpsc/tests/test_mparticles.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,9 @@ TEST(TestSetupParticles, RandomOffsets)
529529
int main(int argc, char** argv)
530530
{
531531
MPI_Init(&argc, &argv);
532-
// #ifdef USE_VPIC FIXME
533532
MPI_Comm_dup(MPI_COMM_WORLD, &psc_comm_world);
534533
MPI_Comm_rank(psc_comm_world, &psc_world_rank);
535534
MPI_Comm_size(psc_comm_world, &psc_world_size);
536-
// #endif
537535

538536
::testing::InitGoogleTest(&argc, argv);
539537
int rc = RUN_ALL_TESTS();

src/libpsc/tests/test_push_particles.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
using PushParticlesTestTypes = ::testing::Types<
1515
TestConfig2ndDoubleYZ, TestConfig1vbec3dSingleYZ, TestConfig1vbec3dSingleXZ,
16-
// TestConfigVpic,
1716
#ifdef USE_CUDA
1817
TestConfig1vbec3dCudaYZ, TestConfig1vbec3dCuda, TestConfig1vbec3dCuda444,
1918
#endif

0 commit comments

Comments
 (0)