Skip to content

Commit

Permalink
SUNDIALS Release v5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed May 21, 2020
1 parent c3f44a1 commit 0c83e0b
Show file tree
Hide file tree
Showing 203 changed files with 11,610 additions and 4,378 deletions.
42 changes: 30 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ project(sundials C)
# Set some variables with info on the SUNDIALS project
set(PACKAGE_BUGREPORT "[email protected]")
set(PACKAGE_NAME "SUNDIALS")
set(PACKAGE_STRING "SUNDIALS 5.2.0")
set(PACKAGE_STRING "SUNDIALS 5.3.0")
set(PACKAGE_TARNAME "sundials")

# set SUNDIALS version numbers
# (use "" for the version label if none is needed)
set(PACKAGE_VERSION_MAJOR "5")
set(PACKAGE_VERSION_MINOR "2")
set(PACKAGE_VERSION_MINOR "3")
set(PACKAGE_VERSION_PATCH "0")
set(PACKAGE_VERSION_LABEL "")

Expand All @@ -63,37 +63,37 @@ mark_as_advanced(CLEAR

# Specify the VERSION and SOVERSION for shared libraries

set(arkodelib_VERSION "4.2.0")
set(arkodelib_VERSION "4.3.0")
set(arkodelib_SOVERSION "4")

set(cvodelib_VERSION "5.2.0")
set(cvodelib_VERSION "5.3.0")
set(cvodelib_SOVERSION "5")

set(cvodeslib_VERSION "5.2.0")
set(cvodeslib_VERSION "5.3.0")
set(cvodeslib_SOVERSION "5")

set(idalib_VERSION "5.2.0")
set(idalib_VERSION "5.3.0")
set(idalib_SOVERSION "5")

set(idaslib_VERSION "4.2.0")
set(idaslib_VERSION "4.3.0")
set(idaslib_SOVERSION "4")

set(kinsollib_VERSION "5.2.0")
set(kinsollib_VERSION "5.3.0")
set(kinsollib_SOVERSION "5")

set(cpodeslib_VERSION "0.0.0")
set(cpodeslib_SOVERSION "0")

set(nveclib_VERSION "5.2.0")
set(nveclib_VERSION "5.3.0")
set(nveclib_SOVERSION "5")

set(sunmatrixlib_VERSION "3.2.0")
set(sunmatrixlib_VERSION "3.3.0")
set(sunmatrixlib_SOVERSION "3")

set(sunlinsollib_VERSION "3.2.0")
set(sunlinsollib_VERSION "3.3.0")
set(sunlinsollib_SOVERSION "3")

set(sunnonlinsollib_VERSION "2.2.0")
set(sunnonlinsollib_VERSION "2.3.0")
set(sunnonlinsollib_SOVERSION "2")

# Specify the location of additional CMAKE modules
Expand Down Expand Up @@ -232,6 +232,13 @@ show_variable(SUNDIALS_INDEX_TYPE STRING "${DOCSTR}" "")
mark_as_advanced(SUNDIALS_INDEX_TYPE)
include(SundialsIndexSize)

# ---------------------------------------------------------------
# Option to specify monitoring
# ---------------------------------------------------------------

set(DOCSTR "Build with simulation monitoring capabilities enabled")
sundials_option(SUNDIALS_BUILD_WITH_MONITORING BOOL ${DOCSTR} OFF)

# ---------------------------------------------------------------
# Enable Fortran interface?
# ---------------------------------------------------------------
Expand Down Expand Up @@ -858,6 +865,17 @@ endif(CUDA_ENABLE)
# Now that all languages are setup, we can configure them more.
# ---------------------------------------------------------------

# ---------------------------------------------------------------
# Option to use specialized fused kernels in the packages.
# Currently only available in CVODE.
# ---------------------------------------------------------------

if(CUDA_ENABLE AND CMAKE_CUDA_COMPILER AND BUILD_CVODE)
set(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS FALSE CACHE BOOL "Build specialized fused CUDA kernels")
else()
set(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS FALSE CACHE BOOL "Build specialized fused CUDA kernels" FORCE)
endif()

# ---------------------------------------------------------------
# Decide how to compile MPI codes. We must check for MPI if
# MPI is enabled or if Trilinos is enabled because the Trilinos
Expand Down
Binary file modified INSTALL_GUIDE.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers #
### Version 5.2.0 (Mar 2020) ###
### Version 5.3.0 (May 2020) ###

**Center for Applied Scientific Computing, Lawrence Livermore National Laboratory**

Expand Down
Binary file modified doc/arkode/ark_examples.pdf
Binary file not shown.
Binary file modified doc/arkode/ark_guide.pdf
Binary file not shown.
Binary file modified doc/cvode/cv_examples.pdf
Binary file not shown.
Binary file modified doc/cvode/cv_guide.pdf
Binary file not shown.
Binary file modified doc/cvodes/cvs_examples.pdf
Binary file not shown.
Binary file modified doc/cvodes/cvs_guide.pdf
Binary file not shown.
Binary file modified doc/ida/ida_examples.pdf
Binary file not shown.
Binary file modified doc/ida/ida_guide.pdf
Binary file not shown.
Binary file modified doc/idas/idas_examples.pdf
Binary file not shown.
Binary file modified doc/idas/idas_guide.pdf
Binary file not shown.
Binary file modified doc/kinsol/kin_examples.pdf
Binary file not shown.
Binary file modified doc/kinsol/kin_guide.pdf
Binary file not shown.
68 changes: 42 additions & 26 deletions examples/arkode/C_serial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,33 @@
# CMakeLists.txt file for ARKODE serial examples
# ---------------------------------------------------------------

# Example lists are tuples "name\;type" where the type is
# Example lists are tuples "name\;args\;type" where the type is
# 'develop' for examples excluded from 'make test' in releases

# Examples using SUNDIALS linear solvers
set(ARKODE_examples
"ark_analytic\;"
"ark_analytic_nonlin\;develop"
"ark_brusselator\;develop"
"ark_brusselator_fp\;develop"
"ark_brusselator1D\;develop"
"ark_heat1D\;develop"
"ark_heat1D_adapt\;develop"
"ark_KrylovDemo_prec\;develop"
"ark_robertson\;develop"
"ark_robertson_constraints\;develop"
"ark_robertson_root\;develop"
"ark_brusselator_mri\;develop"
"ark_onewaycouple_mri\;develop"
"ark_twowaycouple_mri\;develop"
"ark_reaction_diffusion_mri\;develop"
"ark_brusselator_1D_mri\;develop"
"ark_analytic\;\;"
"ark_analytic_nonlin\;\;develop"
"ark_brusselator\;\;develop"
"ark_brusselator_fp\;\;develop"
"ark_brusselator1D\;\;develop"
"ark_heat1D\;\;develop"
"ark_heat1D_adapt\;\;develop"
"ark_KrylovDemo_prec\;\;develop"
"ark_robertson\;\;develop"
"ark_robertson_constraints\;\;develop"
"ark_robertson_root\;\;develop"
"ark_brusselator_mri\;\;develop"
"ark_onewaycouple_mri\;\;develop"
"ark_twowaycouple_mri\;\;develop"
"ark_reaction_diffusion_mri\;\;develop"
"ark_brusselator_1D_mri\;\;develop"
)

if(SUNDIALS_BUILD_WITH_MONITORING)
list(APPEND ARKODE_examples "ark_brusselator_fp\;1\;develop")
endif()

# Examples using LAPACK linear solvers
set(ARKODE_examples_BL
)
Expand Down Expand Up @@ -81,22 +85,34 @@ foreach(example_tuple ${ARKODE_examples})

# parse the example tuple
list(GET example_tuple 0 example)
list(GET example_tuple 1 example_type)
list(GET example_tuple 1 example_args)
list(GET example_tuple 2 example_type)

if (NOT TARGET ${example})
# example source files
add_executable(${example} ${example}.c)

# folder for IDEs
set_target_properties(${example} PROPERTIES FOLDER "Examples")

# example source files
add_executable(${example} ${example}.c)
# libraries to link against
target_link_libraries(${example} ${SUNDIALS_LIBS})
endif()

set_target_properties(${example} PROPERTIES FOLDER "Examples")
# check if example args are provided and set the test name
if("${example_args}" STREQUAL "")
set(test_name ${example})
else()
string(REGEX REPLACE " " "_" test_name ${example}_${example_args})
endif()

# add example to regression tests
sundials_add_test(${example} ${example}
sundials_add_test(${test_name} ${example}
TEST_ARGS ${example_args}
ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR}
ANSWER_FILE ${example}.out
ANSWER_FILE ${test_name}.out
EXAMPLE_TYPE ${example_type})

# libraries to link against
target_link_libraries(${example} ${SUNDIALS_LIBS})

# install example source and out files
if(EXAMPLES_INSTALL)
install(FILES ${example}.c ${example}.out
Expand Down
20 changes: 18 additions & 2 deletions examples/arkode/C_serial/ark_brusselator_fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static int fi(realtype t, N_Vector y, N_Vector ydot, void *user_data);
static int check_flag(void *flagvalue, const char *funcname, int opt);

/* Main Program */
int main()
int main(int argc, char *argv[])
{
/* general problem parameters */
realtype T0 = RCONST(0.0); /* initial time */
Expand All @@ -93,17 +93,23 @@ int main()
int maxcor = 10; /* maximum # of nonlinear iterations/step */
realtype a, b, ep, u0, v0, w0;
realtype rdata[3];
int monitor = 0; /* turn on/off monitoring */

/* general problem variables */
int flag; /* reusable error-checking flag */
N_Vector y = NULL; /* empty vector for storing solution */
SUNNonlinearSolver NLS = NULL; /* empty nonlinear solver object */
void *arkode_mem = NULL; /* empty ARKode memory structure */
FILE *UFID;
FILE *UFID, *INFOFID;
realtype t, tout;
int iout;
long int nst, nst_a, nfe, nfi, nni, ncfn, netf;

/* read inputs */
if (argc == 2) {
monitor = atoi(argv[1]);
}

/* set up the test problem according to the desired test */
if (test == 1) {
u0 = RCONST(3.9);
Expand Down Expand Up @@ -134,6 +140,9 @@ int main()
printf(" problem parameters: a = %"GSYM", b = %"GSYM", ep = %"GSYM"\n",a,b,ep);
printf(" reltol = %.1"ESYM", abstol = %.1"ESYM"\n\n",reltol,abstol);

/* Open up info output file */
if (monitor) INFOFID = fopen("ark_brusselator_fp-info.txt","w");

/* Initialize data structures */
rdata[0] = a; /* set user data */
rdata[1] = b;
Expand All @@ -153,6 +162,12 @@ int main()
/* Initialize fixed-point nonlinear solver and attach to ARKStep */
NLS = SUNNonlinSol_FixedPoint(y, fp_m);
if (check_flag((void *)NLS, "SUNNonlinSol_FixedPoint", 0)) return 1;
if (monitor) {
flag = SUNNonlinSolSetPrintLevel_FixedPoint(NLS, 1);
if (check_flag(&flag, "SUNNonlinSolSetPrintLevel_Newton", 1)) return(1);
flag = SUNNonlinSolSetInfoFile_FixedPoint(NLS, INFOFID);
if (check_flag(&flag, "SUNNonlinSolSetPrintLevel_Newton", 1)) return(1);
}
flag = ARKStepSetNonlinearSolver(arkode_mem, NLS);
if (check_flag(&flag, "ARKStepSetNonlinearSolver", 1)) return 1;

Expand Down Expand Up @@ -196,6 +211,7 @@ int main()
}
printf(" ----------------------------------------------\n");
fclose(UFID);
if (monitor) fclose(INFOFID);

/* Print some final statistics */
flag = ARKStepGetNumSteps(arkode_mem, &nst);
Expand Down
27 changes: 27 additions & 0 deletions examples/arkode/C_serial/ark_brusselator_fp_1.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

Brusselator ODE test problem, fixed-point solver:
initial conditions: u0 = 3, v0 = 3, w0 = 3.5
problem parameters: a = 0.5, b = 3, ep = 0.0005
reltol = 1.0e-06, abstol = 1.0e-10

t u v w
----------------------------------------------
1.000000 1.897255 1.274939 2.997155
2.000000 0.346125 2.366448 2.999481
3.000000 0.147442 2.862061 2.999781
4.000000 0.140733 3.226731 2.999788
5.000000 0.142659 3.583206 2.999788
6.000000 0.145095 3.936910 2.999782
7.000000 0.147720 4.287893 2.999780
8.000000 0.150542 4.635957 2.999775
9.000000 0.153590 4.980863 2.999768
10.000000 0.156901 5.322330 2.999763
----------------------------------------------

Final Solver Statistics:
Internal solver steps = 729 (attempted = 730)
Total RHS evals: Fe = 4383, Fi = 18793
Total number of fixed-point iterations = 14410
Total number of nonlinear solver convergence failures = 0
Total number of error test failures = 1

8 changes: 8 additions & 0 deletions examples/cvode/C_mpimanyvector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ else()
set(NVECP_LIB sundials_nvecmpimanyvector_shared sundials_nvecparallel_shared)
endif()

if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
list(APPEND CVODE_LIB
sundials_cvode_fused_stubs_${LINK_LIBRARY_TYPE})
endif()

# Set-up linker flags and link libraries
set(SUNDIALS_LIBS ${CVODE_LIB} ${NVECP_LIB} ${EXTRA_LINK_LIBS})

Expand Down Expand Up @@ -87,6 +92,9 @@ if(EXAMPLES_INSTALL)
# Prepare substitution variables for Makefile and/or CMakeLists templates
set(SOLVER "CVODE")
set(SOLVER_LIB "sundials_cvode")
if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}")
endif()

examples2string(CVODE_examples EXAMPLES)

Expand Down
8 changes: 8 additions & 0 deletions examples/cvode/C_openmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ else()
set(NVECOMP_LIB sundials_nvecopenmp_shared)
endif()

if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
list(APPEND CVODE_LIB
sundials_cvode_fused_stubs_${LINK_LIBRARY_TYPE})
endif()

# Set-up linker flags and link libraries
set(SUNDIALS_LIBS ${CVODE_LIB} ${NVECOMP_LIB} ${EXTRA_LINK_LIBS})

Expand Down Expand Up @@ -81,6 +86,9 @@ if(EXAMPLES_INSTALL)
# Prepare substitution variables for Makefile and/or CMakeLists templates
set(SOLVER "CVODE")
set(SOLVER_LIB "sundials_cvode")
if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}")
endif()

examples2string(CVODE_examples EXAMPLES)

Expand Down
8 changes: 8 additions & 0 deletions examples/cvode/C_openmpdev/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ else()
set(NVECOMP_LIB sundials_nvecopenmpdev_shared)
endif()

if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
list(APPEND CVODE_LIB
sundials_cvode_fused_stubs_${LINK_LIBRARY_TYPE})
endif()

# Set-up linker flags and link libraries
set(SUNDIALS_LIBS ${CVODE_LIB} ${NVECOMP_LIB} ${EXTRA_LINK_LIBS})

Expand Down Expand Up @@ -81,6 +86,9 @@ if(EXAMPLES_INSTALL)
# Prepare substitution variables for Makefile and/or CMakeLists templates
set(SOLVER "CVODE")
set(SOLVER_LIB "sundials_cvode")
if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}")
endif()

examples2string(CVODE_examples EXAMPLES)

Expand Down
9 changes: 9 additions & 0 deletions examples/cvode/F2003_serial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ else()
set(CVODE_LIB sundials_fcvode_mod_shared)
endif()

if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
list(APPEND CVODE_LIB
sundials_cvode_${LINK_LIBRARY_TYPE}
sundials_cvode_fused_stubs_${LINK_LIBRARY_TYPE})
endif()

# Set-up linker flags and link libraries
set(SUNDIALS_LIBS ${CVODE_LIB} ${EXTRA_LINK_LIBS})

Expand Down Expand Up @@ -139,6 +145,9 @@ if(EXAMPLES_INSTALL)
set(SOLVER_FLIB "sundials_fcvode_mod")
set(NVEC_LIB "sundials_nvecserial")
set(NVEC_FLIB "sundials_fnvecserial_mod")
if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS)
set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}")
endif()

examples2string(FCVODE_examples EXAMPLES)

Expand Down
Loading

0 comments on commit 0c83e0b

Please sign in to comment.