From c4b2a20740edc93177bda2dfeaf6cccc387cc2d7 Mon Sep 17 00:00:00 2001 From: "Gardner, David James" Date: Tue, 26 Mar 2019 13:18:36 -0700 Subject: [PATCH] Merge pull request #192 in SUNDIALS/sunrepo from sync-develop-with-master to develop Squashed commit of the following: commit 874479f300ba22884d0d4dfd32df65353c0b3f40 Merge: 9172e4fb1 301463fc7 Author: David J. Gardner Date: Tue Mar 26 11:47:41 2019 -0700 Merge branch 'master' into sync-develop-with-master commit 301463fc781e75a500b4491279a0e7c5b82a55e5 Author: Gardner, David James Date: Mon Mar 11 14:49:05 2019 -0700 Merge pull request #191 in SUNDIALS/sunrepo from bugfix/find-raja to master Squashed commit of the following: commit b78cb05c7a2d4b36e7814f44b6a2e98d62a9ba85 Author: Balos, Cody Joe Date: Wed Mar 6 14:00:01 2019 -0800 use RAJA_DIR as a suggested path in find_package call commit fce846f91c46f2d8fd09bb0ffa134a63806373ca Author: Gardner, David James Date: Thu Feb 28 09:35:21 2019 -0800 Merge pull request #188 in SUNDIALS/sunrepo from bugfix/github-PR-13 to master Squashed commit of the following: commit 7384b357af3b4357ddf9cb41506b995a5a7c59a4 Author: Timothy Bourke Date: Fri Feb 15 09:19:57 2019 +0100 NLS Solve: check for required callbacks Signed-off-by: Timothy Bourke Signed-off-by: Balos, Cody Joe commit 881083722e6140c96c6381b196da6258b97862bc Merge: 74643f65b 8b5206f2e Author: Gardner, David James Date: Wed Feb 13 14:04:59 2019 -0800 Merge pull request #185 in SUNDIALS/sunrepo from develop to master * commit '8b5206f2ec03c924d5126a3b4e8440238a800704': Merge pull request #184 in SUNDIALS/sunrepo from release-4.1.0 to develop Merge pull request #183 in SUNDIALS/sunrepo from bugfix/github-PR-12 to develop Merge pull request #181 in SUNDIALS/sunrepo from feature/apply-github-pr-as-a-patch to develop Merge pull request #182 in SUNDIALS/sunrepo from bugfix/cmake-trilinos-directory to develop Merge pull request #180 in SUNDIALS/sunrepo from bugfix/ug-typos to develop Merge pull request #179 in SUNDIALS/sunrepo from bugfix/arkstep-fullrhs-error-message to develop Merge pull request #171 in SUNDIALS/sunrepo from feature/make-test-no-python to develop Merge pull request #174 in SUNDIALS/sunrepo from bugfix/print-butcher-table to develop Merge pull request #169 in SUNDIALS/sunrepo from feature/SUNDIALS-185-src-directory-restructure to develop Merge pull request #172 in SUNDIALS/sunrepo from feature/dont-install-impl-files to develop Merge pull request #168 in SUNDIALS/sunrepo from bugfix/double-free-nls to develop Merge pull request #173 in SUNDIALS/sunrepo from bugfix/fix-example-memory-leaks to develop Merge pull request #139 in SUNDIALS/sunrepo from Feature/Trilinos to develop --- CMakeLists.txt | 2 +- src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c | 4 ++++ src/sunnonlinsol/newton/sunnonlinsol_newton.c | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df9d599354..9641e2f4c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -896,7 +896,7 @@ endif() if(RAJA_ENABLE) # Look for CMake configuration file in RAJA installation - find_package(RAJA) + find_package(RAJA CONFIG PATHS ${RAJA_DIR} ${RAJA_DIR}/share/raja/cmake) if (RAJA_FOUND) include_directories(${RAJA_INCLUDE_DIR}) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ${RAJA_NVCC_FLAGS}) diff --git a/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c b/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c index a27719e5e3..d16ece3262 100644 --- a/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c +++ b/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c @@ -200,6 +200,10 @@ int SUNNonlinSolSolve_FixedPoint(SUNNonlinearSolver NLS, N_Vector y0, if ( (NLS == NULL) || (y0 == NULL) || (y == NULL) || (w == NULL) || (mem == NULL) ) return(SUN_NLS_MEM_NULL); + /* check that all required function pointers have been set */ + if ( (FP_CONTENT(NLS)->Sys == NULL) || (FP_CONTENT(NLS)->CTest == NULL) ) + return(SUN_NLS_MEM_NULL); + /* set local shortcut variables */ yprev = FP_CONTENT(NLS)->yprev; gy = FP_CONTENT(NLS)->gy; diff --git a/src/sunnonlinsol/newton/sunnonlinsol_newton.c b/src/sunnonlinsol/newton/sunnonlinsol_newton.c index 677f6ede19..df704fd658 100644 --- a/src/sunnonlinsol/newton/sunnonlinsol_newton.c +++ b/src/sunnonlinsol/newton/sunnonlinsol_newton.c @@ -200,6 +200,14 @@ int SUNNonlinSolSolve_Newton(SUNNonlinearSolver NLS, (mem == NULL) ) return(SUN_NLS_MEM_NULL); + /* check that all required function pointers have been set */ + if ( (NEWTON_CONTENT(NLS)->Sys == NULL) || + (NEWTON_CONTENT(NLS)->LSolve == NULL) || + (callLSetup && (NEWTON_CONTENT(NLS)->LSetup == NULL)) || + (NEWTON_CONTENT(NLS)->CTest == NULL) ) { + return(SUN_NLS_MEM_NULL); + } + /* set local shortcut variables */ delta = NEWTON_CONTENT(NLS)->delta;