Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/remove deprecated code #360

Merged
merged 52 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d445aa5
remove deprecated arkode code
balos1 Oct 26, 2023
e57f71c
remove direct and spils header files
balos1 Oct 26, 2023
106901b
remove kinsol deprecated code
balos1 Oct 26, 2023
5934bf2
more changes for the removal of spils and direct
balos1 Oct 26, 2023
7091261
remove more deprecated code
balos1 Oct 26, 2023
0388073
update swig
balos1 Oct 26, 2023
b77a568
Apply suggestions from code review
balos1 Oct 27, 2023
bce63fb
Feature: Fortran interface for lapack dense solver (#353)
balos1 Oct 27, 2023
1c76c85
remove implementation of SUNLinsSol and SUNNonlinSol printinfo functions
balos1 Oct 30, 2023
841a6d9
replace use of SetDiagnostics in some arkode examples
balos1 Oct 31, 2023
5179287
make INFO level the default for logging
balos1 Oct 31, 2023
196c32a
change arkode INFO logging to DEBUG
balos1 Nov 2, 2023
e47a8c3
add debugging filename
balos1 Nov 2, 2023
32501fa
clean up use of removed functions
balos1 Nov 3, 2023
3ebc682
clean removed functions in benchmarks
balos1 Nov 3, 2023
1652153
remove _spils and _direct references
balos1 Nov 3, 2023
3841cd5
remove cpodes script
balos1 Nov 3, 2023
b816971
cleanup use of removed PREC_ macro
balos1 Nov 3, 2023
3cd7a85
remove unused flag
balos1 Nov 5, 2023
7764a5b
regen fortran
balos1 Nov 5, 2023
22c9bf3
clean up more use of Diagnostics
balos1 Nov 5, 2023
31d3115
remove sundials_lapack.h from install list
balos1 Nov 6, 2023
2b39a12
remove KINSetInfofile
balos1 Nov 6, 2023
7f6f328
Merge branch 'develop' into feature/remove-deprecated-code
balos1 Nov 6, 2023
1cbfa1f
remove warnings to stdout
balos1 Nov 6, 2023
447eafa
Merge remote-tracking branch 'origin/develop' into feature/remove-dep…
balos1 Nov 7, 2023
d202111
remove DFID
balos1 Nov 7, 2023
f16bc3c
remove KINInfoHandler
balos1 Nov 7, 2023
820a6f6
Merge remote-tracking branch 'origin/develop' into feature/remove-dep…
balos1 Nov 8, 2023
afbc36f
remove unused variable
balos1 Nov 8, 2023
a2be7dc
Merge branch 'develop' into feature/remove-deprecated-code
balos1 Nov 9, 2023
83f2c7c
remove unused variables
balos1 Nov 9, 2023
6fcb7cb
Update examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp
balos1 Nov 9, 2023
4cff0ae
remove delted functions from soruce
balos1 Nov 10, 2023
b601820
remove unused kinsol parts
balos1 Nov 10, 2023
9690f3d
remove use of printfl
balos1 Nov 10, 2023
4a8ad53
change default logging level
balos1 Nov 10, 2023
dbf7f3f
remove more unused stuff in arkode
balos1 Nov 10, 2023
89dcad3
remove uses of ark_mem->report
balos1 Nov 10, 2023
a0502e3
build with different logging levels and profiling on/off
balos1 Nov 10, 2023
4e38f35
remove broken line
balos1 Nov 10, 2023
90b0924
rename GitHub actions CI jobs
balos1 Nov 10, 2023
6e17a61
update log levels cycles through
balos1 Nov 10, 2023
1ef6287
dont automatically include sundials_context.hpp
balos1 Nov 10, 2023
c125409
add recent changes
balos1 Nov 10, 2023
aede7e5
fix indentation
balos1 Nov 10, 2023
4d3ed8f
undo removal of include
balos1 Nov 10, 2023
5224893
dont fail fast
balos1 Nov 10, 2023
3d4661d
fix logging statements in arkode_adapt broken in merge
balos1 Nov 11, 2023
40f5135
fix compiler warning
balos1 Nov 11, 2023
004191f
another spot where we need to supress warning of set but unused
balos1 Nov 11, 2023
8dd9c82
Merge remote-tracking branch 'origin/develop' into feature/remove-dep…
balos1 Nov 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ method `ARKODE_VERNER_16_8_9`.
Changed the `SUNProfiler` so that it does not rely on `MPI_WTime` in any case.
This fixes https://github.com/LLNL/sundials/issues/312.

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

## Changes to SUNDIALS in release 6.6.1

Updated the Tpetra NVector interface to support Trilinos 14.
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
Loading