Skip to content

Commit 98565b7

Browse files
authored
Merge pull request #401 from JamesMcClung/pr/vpic-cleanup
Remove VPIC
2 parents 2f0a5e7 + 4f0f4b7 commit 98565b7

95 files changed

Lines changed: 59 additions & 11395 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎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/include/grid/domain.hxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <mrc_common.h>
44
#include <iostream>
5-
#include "../libpsc/vpic/psc_vpic_bits.h"
5+
#include "../libpsc/bits.hxx"
66

77
namespace psc
88
{

‎src/include/input_params.hxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <mpi.h>
1010

11-
#include "../libpsc/vpic/psc_vpic_bits.h"
11+
#include "../libpsc/bits.hxx"
1212

1313
namespace
1414
{

‎src/include/mfields_hydro.hxx‎

Lines changed: 0 additions & 121 deletions
This file was deleted.

‎src/include/psc.hxx‎

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <particles.hxx>
88
#include <setup_particles.hxx>
99

10-
#include "../libpsc/vpic/fields_item_vpic.hxx"
1110
#include "gauss_corrector_base.hxx"
1211
#include "diagnostic_base.hxx"
1312
#include "injector_base.hxx"
@@ -636,53 +635,3 @@ void setupParticles(SetupParticles& setup_particles, Mparticles& mprts,
636635
mpi_printf(MPI_COMM_WORLD, "**** Setting up particles...\n");
637636
setup_particles.setupParticles(mprts, init_np);
638637
}
639-
640-
// ======================================================================
641-
// VPIC-like stuff
642-
643-
// ----------------------------------------------------------------------
644-
// define_periodic_grid
645-
646-
void define_periodic_grid(const double xl[3], const double xh[3],
647-
const int gdims[3], const int np[3])
648-
{}
649-
650-
// ----------------------------------------------------------------------
651-
// set_domain_field_bc
652-
653-
void set_domain_field_bc(Int3 bnd, int bc) {}
654-
655-
// ----------------------------------------------------------------------
656-
// set_domain_particle_bc
657-
658-
void set_domain_particle_bc(Int3 bnd, int bc) {}
659-
660-
void grid_setup_communication() {}
661-
662-
// ----------------------------------------------------------------------
663-
// vpic_define_grid
664-
665-
void vpic_define_grid(const Grid_t& grid) {}
666-
667-
// ----------------------------------------------------------------------
668-
// vpic_define_material
669-
670-
static void vpic_define_material(MaterialList& material_list, const char* name,
671-
double eps, double mu = 1., double sigma = 0.,
672-
double zeta = 0.)
673-
{}
674-
675-
// ----------------------------------------------------------------------
676-
// vpic_define_fields
677-
678-
void vpic_define_fields(const Grid_t& grid) {}
679-
680-
// ----------------------------------------------------------------------
681-
// vpic_create_diagnotics
682-
683-
void vpic_create_diagnostics(int interval) {}
684-
685-
// ----------------------------------------------------------------------
686-
// vpic_setup_diagnostics
687-
688-
void vpic_setup_perform_diagnostics() {}

‎src/include/rngpool_iface.h‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎src/libmrc/include/mrc_io_private.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ extern struct diagsrv_srv_ops ds_srv_ops;
6464
extern struct diagsrv_srv_ops ds_srv_cache_ops;
6565

6666
extern struct mrc_io_ops mrc_io_ascii_ops;
67-
extern struct mrc_io_ops mrc_io_vpic_ops;
6867
extern struct mrc_io_ops mrc_io_xdmf_ops;
6968
extern struct mrc_io_ops mrc_io_xdmf_serial_ops;
7069
extern struct mrc_io_ops mrc_io_xdmf_to_one_ops;

0 commit comments

Comments
 (0)