Skip to content

Commit

Permalink
fix some C++ calls to SUNContext_Create
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Nov 10, 2023
1 parent b683c61 commit 6ebf949
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/diffusion_2D/main_arkode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/diffusion_2D/main_cvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/diffusion_2D/main_ida.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/arkode/CXX_parallel/ark_heat2D_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/ida/trilinos/idaHeat2D_kry_p_tpetra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6ebf949

Please sign in to comment.