Skip to content

Commit

Permalink
Remove deprecated code (#360)
Browse files Browse the repository at this point in the history
Remove deprecated functions

---------

Co-authored-by: Daniel R. Reynolds <[email protected]>
  • Loading branch information
2 people authored and gardner48 committed Dec 18, 2023
1 parent aaeab8d commit 5823879
Show file tree
Hide file tree
Showing 182 changed files with 433 additions and 6,113 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/double-precision.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
name: double precision build and test with GCC+TPLs (no GPUs)
name: Build and Test - Ubuntu/gcc double precision (TPLs, no GPUs)

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extended-precision.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
name: extended precision build and test with GCC+TPLs (no GPUs)
name: Build and Test - Ubuntu/gcc extended precision (TPLs, no GPUs)

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos-latest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MacOS short test
name: Build and Test - MacOS (short)

on:
pull_request:
Expand All @@ -14,7 +14,7 @@ env:
BUILD_TYPE: Release

jobs:
build:
build_and_test:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/single-precision.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
name: single precision build and test with GCC+TPLs (no GPUs)
name: Build and Test - Ubuntu/gcc single precision (TPLs, no GPUs)

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spack-develop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
name: spack@develop build and test with GCC+TPLs (no GPUs)
name: Build and Test - Ubuntu/gcc spack@develop (TPLs, no GPUs)

on:
pull_request:
Expand Down
40 changes: 32 additions & 8 deletions .github/workflows/ubuntu-clang-latest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ubuntu (clang) short test
name: Build - Ubuntu/Clang (no TPLs)

on:
pull_request:
Expand All @@ -14,9 +14,15 @@ env:
BUILD_TYPE: Release

jobs:
build:
build_cycle_log_levels:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# 2 is what all other builds use (its the default), so skip it here
logging_level: [0, 1, 3, 4, 5]

steps:
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
Expand All @@ -28,14 +34,32 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++)
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DSUNDIALS_LOGGING_LEVEL=${{matrix.logging_level}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
build_cycle_profiling:
runs-on: ubuntu-latest

strategy:
matrix:
profiling: ['OFF', 'ON']

steps:
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "14.0"

- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DSUNDIALS_BUILD_WITH_PROFILING=${{matrix.profiling}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
4 changes: 2 additions & 2 deletions .github/workflows/windows-latest-mingw.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows (mingw) short test
name: Build and Test - Windows/mingw (short)

on:
pull_request:
Expand All @@ -14,7 +14,7 @@ env:
BUILD_TYPE: Release

jobs:
build:
buil_and_test:
runs-on: windows-latest

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-latest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows short test
name: Build and Test - Windows/MSVC (short)

on:
pull_request:
Expand All @@ -14,7 +14,7 @@ env:
BUILD_TYPE: Release

jobs:
build:
build_and_test:
runs-on: windows-latest

steps:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# SUNDIALS Changelog


## Changes to SUNDIALS in release X.X.X

**Breaking change**
Functions, types and header files that were previously deprecated have been
removed.

## Changes to SUNDIALS in release 6.7.0

Added the `SUNAdaptController` base class, ported ARKODE's internal
Expand Down
59 changes: 5 additions & 54 deletions benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef struct
#define LOCAL_NLS(NLS) ( GET_NLS_CONTENT(NLS)->local_nls )

/* SUNNonlinearSolver constructor */
SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID);
SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y);


/* --------------------------------------------------------------
Expand All @@ -59,7 +59,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
long int nfe, nfi; /* RHS stats */
long int nni, ncnf; /* nonlinear solver stats */
long int nli, npsol; /* linear solver stats */
FILE* DFID = NULL; /* diagnostics output file */
char fname[MXSTR];

/* Additively split methods should not add the advection and reaction terms */
Expand All @@ -85,16 +84,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
retval = ARKStepSetMaxNumSteps(arkode_mem, 100000);
if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1, udata->myid)) return 1;

/* Open output file for integrator diagnostics */
if (uopt->save)
{
sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid);
DFID = fopen(fname, "w");

retval = ARKStepSetDiagnostics(arkode_mem, DFID);
if (check_retval(&retval, "ARKStepSetDiagnostics", 1, udata->myid)) return 1;
}

/* Create the (non)linear solver */
if (uopt->nls == "newton")
{
Expand All @@ -107,7 +96,7 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down Expand Up @@ -169,9 +158,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
iout++;
} while (iout < uopt->nout);

/* close output stream */
if (uopt->save) fclose(DFID);

/* Get final statistics */
retval = ARKStepGetNumSteps(arkode_mem, &nst);
check_retval(&retval, "ARKStepGetNumSteps", 1, udata->myid);
Expand Down Expand Up @@ -234,7 +220,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
long int nfe, nfi; /* RHS stats */
long int nni, ncnf; /* nonlinear solver stats */
long int nli, npsol; /* linear solver stats */
FILE* DFID = NULL; /* diagnostics output file */
char fname[MXSTR];

/* Additively split methods should not add the advection and reaction terms */
Expand All @@ -260,16 +245,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
retval = ARKStepSetMaxNumSteps(arkode_mem, 100000);
if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1, udata->myid)) return 1;

/* Open output file for integrator diagnostics */
if (uopt->save)
{
sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid);
DFID = fopen(fname, "w");

retval = ARKStepSetDiagnostics(arkode_mem, DFID);
if (check_retval(&retval, "ARKStepSetDiagnostics", 1, udata->myid)) return 1;
}

/* Create the (non)linear solver */
if (uopt->nls == "newton")
{
Expand All @@ -282,7 +257,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx);
LS = SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand All @@ -297,7 +272,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
{
/* The custom task-local nonlinear solver handles the linear solve
as well, so we do not need a SUNLinearSolver. */
NLS = TaskLocalNewton(udata->ctx, y, DFID);
NLS = TaskLocalNewton(udata->ctx, y);
if (check_retval((void *)NLS, "TaskLocalNewton", 0, udata->myid)) return 1;

/* Attach nonlinear solver */
Expand Down Expand Up @@ -355,9 +330,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
iout++;
} while (iout < uopt->nout);

/* close output stream */
if (uopt->save) fclose(DFID);

/* Get final statistics */
retval = ARKStepGetNumSteps(arkode_mem, &nst);
check_retval(&retval, "ARKStepGetNumSteps", 1, udata->myid);
Expand Down Expand Up @@ -415,7 +387,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt)
int iout; /* output counter */
long int nst, nst_a, netf; /* step stats */
long int nfe; /* RHS stats */
FILE* DFID; /* diagnostics output file */
char fname[MXSTR];

/* Additively split methods should not add the advection and reaction terms */
Expand Down Expand Up @@ -445,16 +416,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt)
retval = ERKStepSetFixedStep(arkode_mem, 1e-5);
if (check_retval(&retval, "ERKStepSetFixedStep", 1, udata->myid)) return 1;

/* Open output file for integrator diagnostics */
if (uopt->save)
{
sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid);
DFID = fopen(fname, "w");

retval = ERKStepSetDiagnostics(arkode_mem, DFID);
if (check_retval(&retval, "ERKStepSetDiagnostics", 1, udata->myid)) return 1;
}

/* Output initial condition */
if (uopt->nout > 0)
{
Expand Down Expand Up @@ -490,9 +451,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt)
iout++;
} while (iout < uopt->nout);

/* close output stream */
if (uopt->save) fclose(DFID);

/* Get final statistics */
retval = ERKStepGetNumSteps(arkode_mem, &nst);
check_retval(&retval, "ERKStepGetNumSteps", 1, udata->myid);
Expand Down Expand Up @@ -718,7 +676,7 @@ int TaskLocalNewton_GetNumConvFails(SUNNonlinearSolver NLS,
}


SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID)
SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y)
{
SUNNonlinearSolver NLS;
TaskLocalNewton_Content content;
Expand Down Expand Up @@ -771,12 +729,5 @@ SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID)

content->ncnf = 0;

/* Setup the local nonlinear solver monitoring */
if (DFID != NULL)
{
SUNNonlinSolSetInfoFile_Newton(LOCAL_NLS(NLS), DFID);
SUNNonlinSolSetPrintLevel_Newton(LOCAL_NLS(NLS), 1);
}

return NLS;
}
2 changes: 1 addition & 1 deletion benchmarks/advection_reaction_3D/kokkos/cvode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int EvolveProblemBDF(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "CVodeSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/advection_reaction_3D/kokkos/ida_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int EvolveDAEProblem(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "IDASetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
Loading

0 comments on commit 5823879

Please sign in to comment.