From 6ebf94969357de54940440ad1d374bced3409370 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 10 Nov 2023 13:57:22 -0800 Subject: [PATCH] fix some C++ calls to SUNContext_Create --- .../advection_reaction_3D/kokkos/advection_reaction_3D.cpp | 2 +- benchmarks/advection_reaction_3D/raja/advection_reaction_3D.cpp | 2 +- benchmarks/diffusion_2D/main_arkode.cpp | 2 +- benchmarks/diffusion_2D/main_cvode.cpp | 2 +- benchmarks/diffusion_2D/main_ida.cpp | 2 +- examples/arkode/CXX_parallel/ark_heat2D_p.cpp | 2 +- examples/ida/trilinos/idaHeat2D_kry_p_tpetra.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/advection_reaction_3D/kokkos/advection_reaction_3D.cpp b/benchmarks/advection_reaction_3D/kokkos/advection_reaction_3D.cpp index 188cfd716b..97d639816e 100644 --- a/benchmarks/advection_reaction_3D/kokkos/advection_reaction_3D.cpp +++ b/benchmarks/advection_reaction_3D/kokkos/advection_reaction_3D.cpp @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) MPI_Init(&argc, &argv); /* Create SUNDIALS context */ - SUNContext_Create((void*) &comm, &ctx); + SUNContext_Create(comm, &ctx); /* Initialize Kokkos */ Kokkos::initialize(argc, argv); diff --git a/benchmarks/advection_reaction_3D/raja/advection_reaction_3D.cpp b/benchmarks/advection_reaction_3D/raja/advection_reaction_3D.cpp index 0b1aa0b583..b12c8368f4 100644 --- a/benchmarks/advection_reaction_3D/raja/advection_reaction_3D.cpp +++ b/benchmarks/advection_reaction_3D/raja/advection_reaction_3D.cpp @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) MPI_Init(&argc, &argv); /* Create SUNDIALS context */ - SUNContext_Create((void*) &comm, &ctx); + SUNContext_Create(comm, &ctx); /* Create SUNDIALS memory helper */ #if defined(USE_CUDA) diff --git a/benchmarks/diffusion_2D/main_arkode.cpp b/benchmarks/diffusion_2D/main_arkode.cpp index a1251c64f4..45c3e68068 100644 --- a/benchmarks/diffusion_2D/main_arkode.cpp +++ b/benchmarks/diffusion_2D/main_arkode.cpp @@ -62,7 +62,7 @@ int main(int argc, char* argv[]) SUNContext ctx = NULL; SUNProfiler prof = NULL; - flag = SUNContext_Create((void*) &comm, &ctx); + flag = SUNContext_Create(comm, &ctx); if (check_flag(&flag, "SUNContextCreate", 1)) return 1; flag = SUNContext_GetProfiler(ctx, &prof); diff --git a/benchmarks/diffusion_2D/main_cvode.cpp b/benchmarks/diffusion_2D/main_cvode.cpp index 282a104ab1..3ab714bec7 100644 --- a/benchmarks/diffusion_2D/main_cvode.cpp +++ b/benchmarks/diffusion_2D/main_cvode.cpp @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) SUNContext ctx = NULL; SUNProfiler prof = NULL; - flag = SUNContext_Create((void*) &comm, &ctx); + flag = SUNContext_Create(comm, &ctx); if (check_flag(&flag, "SUNContextCreate", 1)) return 1; flag = SUNContext_GetProfiler(ctx, &prof); diff --git a/benchmarks/diffusion_2D/main_ida.cpp b/benchmarks/diffusion_2D/main_ida.cpp index e0ce26d913..4976fca217 100644 --- a/benchmarks/diffusion_2D/main_ida.cpp +++ b/benchmarks/diffusion_2D/main_ida.cpp @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) SUNContext ctx = NULL; SUNProfiler prof = NULL; - flag = SUNContext_Create((void*) &comm, &ctx); + flag = SUNContext_Create(comm, &ctx); if (check_flag(&flag, "SUNContextCreate", 1)) return 1; flag = SUNContext_GetProfiler(ctx, &prof); diff --git a/examples/arkode/CXX_parallel/ark_heat2D_p.cpp b/examples/arkode/CXX_parallel/ark_heat2D_p.cpp index c0a6e3b29b..4626e28200 100644 --- a/examples/arkode/CXX_parallel/ark_heat2D_p.cpp +++ b/examples/arkode/CXX_parallel/ark_heat2D_p.cpp @@ -296,7 +296,7 @@ int main(int argc, char* argv[]) // Create the SUNDIALS context object for this simulation SUNContext ctx; - flag = SUNContext_Create((void*) &comm_w, &ctx); + flag = SUNContext_Create(comm_w, &ctx); if (check_flag(&flag, "SUNContext_Create", 1)) return 1; // Set output process flag diff --git a/examples/ida/trilinos/idaHeat2D_kry_p_tpetra.cpp b/examples/ida/trilinos/idaHeat2D_kry_p_tpetra.cpp index c005349aca..aa2a49b5aa 100644 --- a/examples/ida/trilinos/idaHeat2D_kry_p_tpetra.cpp +++ b/examples/ida/trilinos/idaHeat2D_kry_p_tpetra.cpp @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) MPI_Comm rawComm = *(mpiComm->getRawMpiComm()); SUNContext ctx; - retval = SUNContext_Create((void*) &rawComm, &ctx); + retval = SUNContext_Create(rawComm, &ctx); if (check_retval(&retval, "SUNContext_Create", 1, thispe)) return -1; /* Allocate and initialize the data structure */