diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ad41a8ba..488b538603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,73 @@ installed without setting the `SUPERLUMT_WORKS` option to `TRUE`. ### Deprecation Notices +Several CMake options have been deprecated in favor of namespaced versions +prefixed with `SUNDIALS_` to avoid naming collisions in applications that +include SUNDIALS directly within their CMake builds. Additionally, a consistent +naming convention (`SUNDIALS_ENABLE`) is now used for all boolean options. The +table below lists the old CMake option names and the new replacements. + +| Old Option | New Option | +|----------------------------------------|------------------------------------------------| +| `BUILD_ARKODE` | `SUNDIALS_ENABLE_ARKODE` | +| `BUILD_CVODE` | `SUNDIALS_ENABLE_CVODE` | +| `BUILD_CVODES` | `SUNDIALS_ENABLE_CVODES` | +| `BUILD_IDA` | `SUNDIALS_ENABLE_IDA` | +| `BUILD_IDAS` | `SUNDIALS_ENABLE_IDAS` | +| `BUILD_KINSOL` | `SUNDIALS_ENABLE_KINSOL` | +| `ENABLE_MPI` | `SUNDIALS_ENABLE_MPI` | +| `ENABLE_OPENMP` | `SUNDIALS_ENABLE_OPENMP` | +| `ENABLE_OPENMP_DEVICE` | `SUNDIALS_ENABLE_OPENMP_DEVICE` | +| `OPENMP_DEVICE_WORKS` | `SUNDIALS_ENABLE_OPENMP_DEVICE_CHECKS` | +| `ENABLE_PTHREAD` | `SUNDIALS_ENABLE_PTHREAD` | +| `ENABLE_CUDA` | `SUNDIALS_ENABLE_CUDA` | +| `ENABLE_HIP` | `SUNDIALS_ENABLE_HIP` | +| `ENABLE_SYCL` | `SUNDIALS_ENABLE_SYCL` | +| `ENABLE_LAPACK` | `SUNDIALS_ENABLE_LAPACK` | +| `LAPACK_WORKS` | `SUNDIALS_ENABLE_LAPACK_CHECKS` | +| `ENABLE_GINKGO` | `SUNDIALS_ENABLE_GINKGO` | +| `GINKGO_WORKS` | `SUNDIALS_ENABLE_GINKGO_CHECKS` | +| `ENABLE_MAGMA` | `SUNDIALS_ENABLE_MAGMA` | +| `MAGMA_WORKS` | `SUNDIALS_ENABLE_MAGMA_CHECKS` | +| `ENABLE_SUPERLUDIST` | `SUNDIALS_ENABLE_SUPERLUDIST` | +| `SUPERLUDIST_WORKS` | `SUNDIALS_ENABLE_SUPERLUDIST_CHECKS` | +| `ENABLE_SUPERLUMT` | `SUNDIALS_ENABLE_SUPERLUMT` | +| `SUPERLUMT_WORKS` | `SUNDIALS_ENABLE_SUPERLUMT_CHECKS` | +| `ENABLE_KLU` | `SUNDIALS_ENABLE_KLU` | +| `KLU_WORKS` | `SUNDIALS_ENABLE_KLU_CHECKS` | +| `ENABLE_HYPRE` | `SUNDIALS_ENABLE_HYPRE` | +| `HYPRE_WORKS` | `SUNDIALS_ENABLE_HYPRE_CHECKS` | +| `ENABLE_PETSC` | `SUNDIALS_ENABLE_PETSC` | +| `PETSC_WORKS` | `SUNDIALS_ENABLE_PETSC_CHECKS` | +| `ENABLE_TRILINOS` | `SUNDIALS_ENABLE_TRILINOS` | +| `ENABLE_RAJA` | `SUNDIALS_ENABLE_RAJA` | +| `ENABLE_XBRAID` | `SUNDIALS_ENABLE_XBRAID` | +| `XBRAID_WORKS` | `SUNDIALS_ENABLE_XBRAID_CHECKS` | +| `ENABLE_ONEMKL` | `SUNDIALS_ENABLE_ONEMKL` | +| `ONEMKL_WORKS` | `SUNDIALS_ENABLE_ONEMKL_CHECKS` | +| `ENABLE_CALIPER` | `SUNDIALS_ENABLE_CALIPER` | +| `ENABLE_ADIAK` | `SUNDIALS_ENABLE_ADIAK` | +| `ENABLE_KOKKOS` | `SUNDIALS_ENABLE_KOKKOS` | +| `KOKKOS_WORKS` | `SUNDIALS_ENABLE_KOKKOS_CHECKS` | +| `ENABLE_KOKKOS_KERNELS` | `SUNDIALS_ENABLE_KOKKOS_KERNELS` | +| `KOKKOS_KERNELS_WORKS` | `SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS` | +| `SUNDIALS_BUILD_WITH_MONITORING` | `SUNDIALS_ENABLE_MONITORING` | +| `SUNDIALS_BUILD_WITH_PROFILING` | `SUNDIALS_ENABLE_PROFILING` | +| `BUILD_BENCHMARKS` | `SUNDIALS_ENABLE_BENCHMARKS` | +| `BENCHMARKS_INSTALL_PATH` | `SUNDIALS_BENCHMARKS_INSTALL_PATH` | +| `ENABLE_ALL_WARNINGS` | `SUNDIALS_ENABLE_ALL_WARNINGS` | +| `ENABLE_WARNINGS_AS_ERRORS` | `CMAKE_COMPILE_WARNING_AS_ERROR` | +| `ENABLE_ADDRESS_SANITIZER` | `SUNDIALS_ENABLE_ADDRESS_SANITIZER` | +| `ENABLE_MEMORY_SANITIZER` | `SUNDIALS_ENABLE_MEMORY_SANITIZER` | +| `ENABLE_LEAK_SANITIZER` | `SUNDIALS_ENABLE_LEAK_SANITIZER` | +| `ENABLE_UNDEFINED_BEHAVIOR_SANITIZER` | `SUNDIALS_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER` | +| `EXAMPLES_ENABLE_C` | `SUNDIALS_EXAMPLES_ENABLE_C` | +| `EXAMPLES_ENABLE_CXX` | `SUNDIALS_EXAMPLES_ENABLE_CXX` | +| `EXAMPLES_ENABLE_F2003` | `SUNDIALS_EXAMPLES_ENABLE_FORTRAN` | +| `EXAMPLES_INSTALL` | `SUNDIALS_EXAMPLES_ENABLE_INSTALL` | +| `EXAMPLES_INSTALL_PATH` | `SUNDIALS_EXAMPLES_INSTALL_PATH` | +| `SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS` | `SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS` | + ## Changes to SUNDIALS in release 7.6.0 ### Major Features diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e11f28e03..bd51cf636e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -229,7 +229,7 @@ if(_BUILD_EXAMPLES) endif() # Add benchmarks to the build -if(BUILD_BENCHMARKS) +if(SUNDIALS_ENABLE_BENCHMARKS) include(SundialsSetupBenchmarks) add_subdirectory(benchmarks) endif() @@ -260,7 +260,7 @@ install(FILES "${PROJECT_BINARY_DIR}/include/sundials/sundials_config.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials") # install shared Fortran 2003 modules -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) # While the .mod files get generated for static and shared libraries, they are # identical. So only install one set of the .mod files. if(BUILD_STATIC_LIBS) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 7390e64b2d..107d68f3f1 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -26,7 +26,7 @@ endif() sundials_option(BENCHMARK_NVECTOR BOOL "NVector benchmarks are on" ON) # Disable some warnings for benchmarks -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-unused-function") set(CMAKE_CXX_FLAGS @@ -37,7 +37,7 @@ endif() # Add specific benchmarks # ---------------------------------------- -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) add_subdirectory(diffusion_2D) add_subdirectory(advection_reaction_3D) endif() diff --git a/benchmarks/advection_reaction_3D/CMakeLists.txt b/benchmarks/advection_reaction_3D/CMakeLists.txt index 7cecbd41b2..fca8ab1884 100644 --- a/benchmarks/advection_reaction_3D/CMakeLists.txt +++ b/benchmarks/advection_reaction_3D/CMakeLists.txt @@ -15,10 +15,10 @@ # SUNDIALS Copyright End # --------------------------------------------------------------- -if(ENABLE_RAJA) +if(SUNDIALS_ENABLE_RAJA) add_subdirectory(raja) endif() -if(ENABLE_KOKKOS AND BUILD_NVECTOR_KOKKOS) +if(SUNDIALS_ENABLE_KOKKOS AND SUNDIALS_ENABLE_NVECTOR_KOKKOS) add_subdirectory(kokkos) endif() diff --git a/benchmarks/advection_reaction_3D/kokkos/CMakeLists.txt b/benchmarks/advection_reaction_3D/kokkos/CMakeLists.txt index c955be838f..3fc5c43f37 100644 --- a/benchmarks/advection_reaction_3D/kokkos/CMakeLists.txt +++ b/benchmarks/advection_reaction_3D/kokkos/CMakeLists.txt @@ -16,9 +16,9 @@ # --------------------------------------------------------------- # Add the build targets for each backend -if(BUILD_ARKODE - AND BUILD_CVODE - AND BUILD_IDA) +if(SUNDIALS_ENABLE_ARKODE + AND SUNDIALS_ENABLE_CVODE + AND SUNDIALS_ENABLE_IDA) foreach(backend ${KOKKOS_EXAMPLES_BACKENDS}) # set benchmark target name @@ -56,12 +56,14 @@ if(BUILD_ARKODE install( TARGETS ${benchmark_target} - DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/kokkos") + DESTINATION + "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/kokkos") install( FILES README.md ../scripts/compare_error.py ../scripts/compute_error.py ../scripts/pickle_solution_output.py - DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/kokkos") + DESTINATION + "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/kokkos") endforeach() endif() diff --git a/benchmarks/advection_reaction_3D/raja/CMakeLists.txt b/benchmarks/advection_reaction_3D/raja/CMakeLists.txt index d0e1afdbff..26007ce56f 100644 --- a/benchmarks/advection_reaction_3D/raja/CMakeLists.txt +++ b/benchmarks/advection_reaction_3D/raja/CMakeLists.txt @@ -16,9 +16,9 @@ # SUNDIALS Copyright End # --------------------------------------------------------------- -if(BUILD_ARKODE - AND BUILD_CVODE - AND BUILD_IDA) +if(SUNDIALS_ENABLE_ARKODE + AND SUNDIALS_ENABLE_CVODE + AND SUNDIALS_ENABLE_IDA) if((RAJA_BACKENDS MATCHES "TARGET_OPENMP") OR (RAJA_BACKENDS MATCHES "OPENMP" )) @@ -66,12 +66,16 @@ if(BUILD_ARKODE ${MPI_CXX_LIBRARIES} ${OTHER_LIBS}) - install(TARGETS advection_reaction_3D_raja - DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja") + install( + TARGETS advection_reaction_3D_raja + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja" + ) - install(FILES README.md ../scripts/compare_error.py - ../scripts/compute_error.py ../scripts/pickle_solution_output.py - DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja") + install( + FILES README.md ../scripts/compare_error.py ../scripts/compute_error.py + ../scripts/pickle_solution_output.py + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja" + ) foreach(benchmark_tuple ${BENCHMARK_VAR}) list(GET benchmark_tuple 0 benchmark_args) @@ -89,7 +93,7 @@ if(BUILD_ARKODE # MPI + CUDA # ---------------------------------------------------------------------------- - if(BUILD_NVECTOR_CUDA) + if(SUNDIALS_ENABLE_NVECTOR_CUDA) set_source_files_properties(advection_reaction_3D.cpp PROPERTIES LANGUAGE CUDA) @@ -130,8 +134,10 @@ if(BUILD_ARKODE target_compile_definitions(advection_reaction_3D_raja_mpicuda PRIVATE USE_CUDA_NVEC) - install(TARGETS advection_reaction_3D_raja_mpicuda - DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja") + install( + TARGETS advection_reaction_3D_raja_mpicuda + DESTINATION + "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja") foreach(benchmark_tuple ${BENCHMARK_VAR}) list(GET benchmark_tuple 0 benchmark_args) @@ -150,7 +156,7 @@ if(BUILD_ARKODE # MPI + HIP # ---------------------------------------------------------------------------- - if(BUILD_NVECTOR_HIP) + if(SUNDIALS_ENABLE_NVECTOR_HIP) sundials_add_executable( advection_reaction_3D_raja_mpihip @@ -183,8 +189,10 @@ if(BUILD_ARKODE target_compile_definitions(advection_reaction_3D_raja_mpihip PRIVATE USE_HIP_NVEC) - install(TARGETS advection_reaction_3D_raja_mpihip - DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja") + install( + TARGETS advection_reaction_3D_raja_mpihip + DESTINATION + "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/raja") foreach(benchmark_tuple ${BENCHMARK_VAR}) list(GET benchmark_tuple 0 benchmark_args) diff --git a/benchmarks/diffusion_2D/CMakeLists.txt b/benchmarks/diffusion_2D/CMakeLists.txt index f47f9baa51..0a12eaea6c 100644 --- a/benchmarks/diffusion_2D/CMakeLists.txt +++ b/benchmarks/diffusion_2D/CMakeLists.txt @@ -15,9 +15,9 @@ # SUNDIALS Copyright End # ------------------------------------------------------------------------------ -if(BUILD_ARKODE - OR BUILD_CVODE - OR BUILD_IDA) +if(SUNDIALS_ENABLE_ARKODE + OR SUNDIALS_ENABLE_CVODE + OR SUNDIALS_ENABLE_IDA) # Shared sources set(shared_sources diffusion_2D.hpp diffusion_2D.cpp @@ -32,10 +32,11 @@ if(BUILD_ARKODE add_subdirectory(mpi_serial) # MPI + CUDA/HIP - if(BUILD_NVECTOR_CUDA OR BUILD_NVECTOR_HIP) + if(SUNDIALS_ENABLE_NVECTOR_CUDA OR SUNDIALS_ENABLE_NVECTOR_HIP) add_subdirectory(mpi_gpu) endif() - install(FILES README.md DESTINATION "${BENCHMARKS_INSTALL_PATH}/diffusion_2D") + install(FILES README.md + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/diffusion_2D") endif() diff --git a/benchmarks/diffusion_2D/README.md b/benchmarks/diffusion_2D/README.md index 21a18796ee..ed4bbd9159 100644 --- a/benchmarks/diffusion_2D/README.md +++ b/benchmarks/diffusion_2D/README.md @@ -92,7 +92,7 @@ installation guide for more details on configuring, building, and installing. ## Running Based on the configuration, executables for each integrator and backend option -are built and installed in `/diffusion_2D`. The +are built and installed in `/diffusion_2D`. The executables follow the naming convention `_diffusion_2D_` where `` is `arkode`, `cvode`, or `ida` and `` is `mpi` for MPI only parallelism, `mpicuda` for MPI + CUDA, and `mpihip` for MPI + HIP. diff --git a/benchmarks/diffusion_2D/mpi_gpu/CMakeLists.txt b/benchmarks/diffusion_2D/mpi_gpu/CMakeLists.txt index 633d4dfdd5..0f343e1680 100644 --- a/benchmarks/diffusion_2D/mpi_gpu/CMakeLists.txt +++ b/benchmarks/diffusion_2D/mpi_gpu/CMakeLists.txt @@ -18,29 +18,29 @@ # list of tests set(tests) -if(BUILD_ARKODE) - if(BUILD_NVECTOR_CUDA) +if(SUNDIALS_ENABLE_ARKODE) + if(SUNDIALS_ENABLE_NVECTOR_CUDA) list(APPEND tests "arkode\;BENCHMARK_ODE\;USE_CUDA") endif() - if(BUILD_NVECTOR_HIP) + if(SUNDIALS_ENABLE_NVECTOR_HIP) list(APPEND tests "arkode\;BENCHMARK_ODE\;USE_HIP") endif() endif() -if(BUILD_CVODE) - if(BUILD_NVECTOR_CUDA) +if(SUNDIALS_ENABLE_CVODE) + if(SUNDIALS_ENABLE_NVECTOR_CUDA) list(APPEND tests "cvode\;BENCHMARK_ODE\;USE_CUDA") endif() - if(BUILD_NVECTOR_HIP) + if(SUNDIALS_ENABLE_NVECTOR_HIP) list(APPEND tests "cvode\;BENCHMARK_ODE\;USE_HIP") endif() endif() -if(BUILD_IDA) - if(BUILD_NVECTOR_CUDA) +if(SUNDIALS_ENABLE_IDA) + if(SUNDIALS_ENABLE_NVECTOR_CUDA) list(APPEND tests "ida\;BENCHMARK_DAE\;USE_CUDA") endif() - if(BUILD_NVECTOR_HIP) + if(SUNDIALS_ENABLE_NVECTOR_HIP) list(APPEND tests "ida\;BENCHMARK_DAE\;USE_HIP") endif() endif() @@ -113,6 +113,6 @@ foreach(test_tuple ${tests}) target_link_libraries(${target} PRIVATE ${MPI_CXX_LIBRARIES}) install(TARGETS ${target} - DESTINATION "${BENCHMARKS_INSTALL_PATH}/diffusion_2D") + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/diffusion_2D") endforeach() diff --git a/benchmarks/diffusion_2D/mpi_serial/CMakeLists.txt b/benchmarks/diffusion_2D/mpi_serial/CMakeLists.txt index f50a54bee8..531f337231 100644 --- a/benchmarks/diffusion_2D/mpi_serial/CMakeLists.txt +++ b/benchmarks/diffusion_2D/mpi_serial/CMakeLists.txt @@ -18,15 +18,15 @@ # list of tests set(tests) -if(BUILD_ARKODE) +if(SUNDIALS_ENABLE_ARKODE) list(APPEND tests "arkode\;BENCHMARK_ODE") endif() -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) list(APPEND tests "cvode\;BENCHMARK_ODE") endif() -if(BUILD_IDA) +if(SUNDIALS_ENABLE_IDA) list(APPEND tests "ida\;BENCHMARK_DAE") endif() @@ -57,14 +57,14 @@ foreach(test_tuple ${tests}) target_link_libraries(${target} PRIVATE sundials_${package} sundials_nvecparallel MPI::MPI_CXX) - if(BUILD_SUNLINSOL_SUPERLUDIST) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUDIST) target_compile_definitions(${target} PRIVATE USE_SUPERLU_DIST) target_link_libraries(${target} PRIVATE sundials_sunlinsolsuperludist sundials_sunmatrixslunrloc) endif() install(TARGETS ${target} - DESTINATION "${BENCHMARKS_INSTALL_PATH}/diffusion_2D") + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/diffusion_2D") sundials_add_benchmark(${target} ${target} diffusion_2D NUM_CORES ${SUNDIALS_BENCHMARK_NUM_CPUS}) diff --git a/benchmarks/nvector/CMakeLists.txt b/benchmarks/nvector/CMakeLists.txt index dce1aeb351..7d4b1236d4 100644 --- a/benchmarks/nvector/CMakeLists.txt +++ b/benchmarks/nvector/CMakeLists.txt @@ -19,51 +19,51 @@ add_subdirectory(serial) -if(BUILD_NVECTOR_PARALLEL) +if(SUNDIALS_ENABLE_NVECTOR_PARALLEL) add_subdirectory(parallel) endif() -if(BUILD_NVECTOR_MPIPLUSX) +if(SUNDIALS_ENABLE_NVECTOR_MPIPLUSX) add_subdirectory(mpiplusx) endif() -if(BUILD_NVECTOR_PARHYP) +if(SUNDIALS_ENABLE_NVECTOR_PARHYP) add_subdirectory(parhyp) endif() -if(BUILD_NVECTOR_PTHREADS) +if(SUNDIALS_ENABLE_NVECTOR_PTHREADS) add_subdirectory(pthreads) endif() -if(BUILD_NVECTOR_OPENMP) +if(SUNDIALS_ENABLE_NVECTOR_OPENMP) add_subdirectory(openmp) endif() -if(BUILD_NVECTOR_OPENMPDEV) +if(SUNDIALS_ENABLE_NVECTOR_OPENMPDEV) add_subdirectory(openmpdev) endif() -if(BUILD_NVECTOR_PETSC) +if(SUNDIALS_ENABLE_NVECTOR_PETSC) add_subdirectory(petsc) endif() -if(BUILD_NVECTOR_CUDA) +if(SUNDIALS_ENABLE_NVECTOR_CUDA) add_subdirectory(cuda) endif() -if(BUILD_NVECTOR_HIP) +if(SUNDIALS_ENABLE_NVECTOR_HIP) add_subdirectory(hip) endif() -if(BUILD_NVECTOR_RAJA) +if(SUNDIALS_ENABLE_NVECTOR_RAJA) add_subdirectory(raja) endif() -if(BUILD_NVECTOR_SYCL) +if(SUNDIALS_ENABLE_NVECTOR_SYCL) add_subdirectory(sycl) endif() -if(BUILD_NVECTOR_KOKKOS) +if(SUNDIALS_ENABLE_NVECTOR_KOKKOS) add_subdirectory(kokkos) endif() diff --git a/benchmarks/nvector/kokkos/CMakeLists.txt b/benchmarks/nvector/kokkos/CMakeLists.txt index 0044218d13..c2f565041f 100644 --- a/benchmarks/nvector/kokkos/CMakeLists.txt +++ b/benchmarks/nvector/kokkos/CMakeLists.txt @@ -27,6 +27,6 @@ foreach(backend ${KOKKOS_EXAMPLES_BACKENDS}) PRIVATE USE_${backend}) install(TARGETS test_nvector_performance_kokkos.${backend} - DESTINATION "${BENCHMARKS_INSTALL_PATH}/") + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/") endforeach() diff --git a/benchmarks/nvector/openmpdev/CMakeLists.txt b/benchmarks/nvector/openmpdev/CMakeLists.txt index c573971f80..21c03fb73c 100644 --- a/benchmarks/nvector/openmpdev/CMakeLists.txt +++ b/benchmarks/nvector/openmpdev/CMakeLists.txt @@ -39,4 +39,4 @@ target_include_directories(test_nvector_performance_openmpdev PRIVATE ..) target_link_libraries(test_nvector_performance_openmpdev ${SUNDIALS_LIBS}) install(TARGETS test_nvector_performance_openmpdev - DESTINATION "${BENCHMARKS_INSTALL_PATH}/nvector/openmpdev") + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/nvector/openmpdev") diff --git a/benchmarks/nvector/raja/CMakeLists.txt b/benchmarks/nvector/raja/CMakeLists.txt index 06d5a4a72b..3e2976a54a 100644 --- a/benchmarks/nvector/raja/CMakeLists.txt +++ b/benchmarks/nvector/raja/CMakeLists.txt @@ -55,7 +55,8 @@ foreach(backend ${SUNDIALS_RAJA_BACKENDS}) target_link_libraries(${example_target} PRIVATE OpenMP::OpenMP_CXX) endif() - install(TARGETS ${example_target} - DESTINATION "${BENCHMARKS_INSTALL_PATH}/benchmarks/nvector/raja") + install( + TARGETS ${example_target} + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/benchmarks/nvector/raja") endforeach() diff --git a/bindings/sundials4py/CMakeLists.txt b/bindings/sundials4py/CMakeLists.txt index 61ae963b6b..106bcc152b 100644 --- a/bindings/sundials4py/CMakeLists.txt +++ b/bindings/sundials4py/CMakeLists.txt @@ -14,10 +14,10 @@ # --------------------------------------------------------------- if(NOT - (BUILD_ARKODE - AND BUILD_CVODES - AND BUILD_IDAS - AND BUILD_KINSOL)) + (SUNDIALS_ENABLE_ARKODE + AND SUNDIALS_ENABLE_CVODES + AND SUNDIALS_ENABLE_IDAS + AND SUNDIALS_ENABLE_KINSOL)) message( FATAL_ERROR "sundials4py requires ARKODE, CVODES, IDAS, and KINSOL to be enabled") diff --git a/cmake/SUNDIALSConfig.cmake.in b/cmake/SUNDIALSConfig.cmake.in index 16a16b89c4..26850c7a8f 100644 --- a/cmake/SUNDIALSConfig.cmake.in +++ b/cmake/SUNDIALSConfig.cmake.in @@ -58,42 +58,42 @@ endforeach() ### ------- Create TPL imported targets -if("@ENABLE_MPI@" AND NOT TARGET MPI::MPI_C) +if("@SUNDIALS_ENABLE_MPI@" AND NOT TARGET MPI::MPI_C) set(MPI_C_COMPILER "@MPI_C_COMPILER@") find_dependency(MPI) endif() -if("@ENABLE_OPENMP@" AND NOT TARGET OpenMP::OpenMP_C) +if("@SUNDIALS_ENABLE_OPENMP@" AND NOT TARGET OpenMP::OpenMP_C) find_dependency(OpenMP) endif() -if("@ENABLE_CALIPER@" AND NOT TARGET caliper) +if("@SUNDIALS_ENABLE_CALIPER@" AND NOT TARGET caliper) find_dependency(CALIPER PATHS "@CALIPER_DIR@") endif() -if("@ENABLE_ADIAK@" AND NOT TARGET adiak::adiak) +if("@SUNDIALS_ENABLE_ADIAK@" AND NOT TARGET adiak::adiak) find_dependency(adiak PATHS "@adiak_DIR@") endif() -if("@ENABLE_CUDA@" AND NOT (TARGET CUDA::cudart AND TARGET CUDA::cublas +if("@SUNDIALS_ENABLE_CUDA@" AND NOT (TARGET CUDA::cudart AND TARGET CUDA::cublas AND TARGET CUDA::cusparse AND TARGET CUDA::cusolver)) find_dependency(CUDAToolkit) endif() -if("@ENABLE_GINKGO@" AND NOT TARGET Ginkgo::ginkgo) +if("@SUNDIALS_ENABLE_GINKGO@" AND NOT TARGET Ginkgo::ginkgo) if(NOT TARGET hwloc AND NOT HWLOC_DIR) set(HWLOC_DIR "@HWLOC_DIR@") endif() find_dependency(Ginkgo PATHS "@Ginkgo_DIR@") endif() -if("@ENABLE_HYPRE@" AND NOT TARGET SUNDIALS::HYPRE) +if("@SUNDIALS_ENABLE_HYPRE@" AND NOT TARGET SUNDIALS::HYPRE) add_library(SUNDIALS::HYPRE INTERFACE IMPORTED) target_link_libraries(SUNDIALS::HYPRE INTERFACE "@HYPRE_LIBRARIES@") set_target_properties(SUNDIALS::HYPRE PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@HYPRE_INCLUDE_DIR@") endif() -if("@ENABLE_KLU@" AND NOT TARGET SUNDIALS::KLU) +if("@SUNDIALS_ENABLE_KLU@" AND NOT TARGET SUNDIALS::KLU) if("@KLU_SUITESPARSE_TARGET@") find_dependency(KLU) else() @@ -103,15 +103,15 @@ if("@ENABLE_KLU@" AND NOT TARGET SUNDIALS::KLU) endif() endif() -if("@ENABLE_KOKKOS@" AND NOT TARGET Kokkos::kokkos) +if("@SUNDIALS_ENABLE_KOKKOS@" AND NOT TARGET Kokkos::kokkos) find_dependency(Kokkos PATHS "@Kokkos_DIR@") endif() -if("@ENABLE_KOKKOS_KERNELS@" AND NOT TARGET Kokkos::kokkoskernels) +if("@SUNDIALS_ENABLE_KOKKOS_KERNELS@" AND NOT TARGET Kokkos::kokkoskernels) find_dependency(KokkosKernels PATHS "@KokkosKernels_DIR@") endif() -if("@ENABLE_LAPACK@" AND NOT TARGET LAPACK::LAPACK) +if("@SUNDIALS_ENABLE_LAPACK@" AND NOT TARGET LAPACK::LAPACK) # For some reason find_dependency does not find the libraries if the variables # below are internal rather than CACHE variables set(BLAS_LIBRARIES "@BLAS_LIBRARIES@" CACHE "FILEPATH" "BLAS libraries") @@ -121,7 +121,7 @@ if("@ENABLE_LAPACK@" AND NOT TARGET LAPACK::LAPACK) find_dependency(LAPACK) endif() -if("@ENABLE_PETSC@" AND NOT TARGET SUNDIALS::PETSC) +if("@SUNDIALS_ENABLE_PETSC@" AND NOT TARGET SUNDIALS::PETSC) add_library(SUNDIALS::PETSC INTERFACE IMPORTED) target_link_libraries(SUNDIALS::PETSC INTERFACE "@PETSC_LIBRARIES@") set_target_properties(SUNDIALS::PETSC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@PETSC_INCLUDE_DIRS@") @@ -145,40 +145,40 @@ if("@ENABLE_PETSC@" AND NOT TARGET SUNDIALS::PETSC) endif() endif() -if("@ENABLE_MAGMA@" AND NOT TARGET SUNDIALS::MAGMA) +if("@SUNDIALS_ENABLE_MAGMA@" AND NOT TARGET SUNDIALS::MAGMA) add_library(SUNDIALS::MAGMA INTERFACE IMPORTED) target_link_libraries(SUNDIALS::MAGMA INTERFACE "@MAGMA_LIBRARIES@") set_target_properties(SUNDIALS::MAGMA PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@MAGMA_INCLUDE_DIR@") endif() -if("@ENABLE_ONEMKL@" AND NOT TARGET MKL) +if("@SUNDIALS_ENABLE_ONEMKL@" AND NOT TARGET MKL) find_dependency(MKL PATHS "@ONEMKL_DIR@") endif() -if("@ENABLE_SUPERLUDIST@" AND NOT TARGET SUNDIALS::SUPERLUDIST) +if("@SUNDIALS_ENABLE_SUPERLUDIST@" AND NOT TARGET SUNDIALS::SUPERLUDIST) add_library(SUNDIALS::SUPERLUDIST INTERFACE IMPORTED) target_link_libraries(SUNDIALS::SUPERLUDIST INTERFACE "@SUPERLUDIST_LINK_LIBRARIES@") set_target_properties(SUNDIALS::SUPERLUDIST PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@SUPERLUDIST_INCLUDE_DIRS@") endif() -if("@ENABLE_SUPERLUMT@" AND NOT TARGET SUNDIALS::SUPERLUMT) +if("@SUNDIALS_ENABLE_SUPERLUMT@" AND NOT TARGET SUNDIALS::SUPERLUMT) add_library(SUNDIALS::SUPERLUMT INTERFACE IMPORTED) target_link_libraries(SUNDIALS::SUPERLUMT INTERFACE "@SUPERLUMT_LIBRARIES@") set_target_properties(SUNDIALS::SUPERLUMT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@SUPERLUMT_INCLUDE_DIR@") endif() -if("@ENABLE_RAJA@" AND NOT TARGET RAJA) +if("@SUNDIALS_ENABLE_RAJA@" AND NOT TARGET RAJA) if(NOT TARGET camp AND NOT camp_DIR) set(camp_DIR "@camp_DIR@") endif() find_dependency(RAJA PATHS "@RAJA_DIR@") endif() -if("@ENABLE_TRILINOS@" AND NOT TARGET Tpetra::all_libs) +if("@SUNDIALS_ENABLE_TRILINOS@" AND NOT TARGET Tpetra::all_libs) find_dependency(Trilinos COMPONENTS Tpetra PATHS "@Trilinos_DIR@") endif() -if("@ENABLE_XBRAID@" AND NOT TARGET SUNDIALS::XBRAID) +if("@SUNDIALS_ENABLE_XBRAID@" AND NOT TARGET SUNDIALS::XBRAID) add_library(SUNDIALS::XBRAID INTERFACE IMPORTED) target_link_libraries(SUNDIALS::XBRAID INTERFACE "@XBRAID_LIBRARIES@") set_target_properties(SUNDIALS::XBRAID PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@XBRAID_INCLUDE_DIR@") diff --git a/cmake/SundialsBuildOptionsPost.cmake b/cmake/SundialsBuildOptionsPost.cmake index 690760f9fb..da57ab6583 100644 --- a/cmake/SundialsBuildOptionsPost.cmake +++ b/cmake/SundialsBuildOptionsPost.cmake @@ -23,280 +23,295 @@ # available in CVODE. # --------------------------------------------------------------- -if(ENABLE_CUDA OR ENABLE_HIP) +if(SUNDIALS_ENABLE_CUDA OR SUNDIALS_ENABLE_HIP) set(CUDA_OR_HIP TRUE) else() set(CUDA_OR_HIP FALSE) endif() sundials_option( - SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS BOOL + SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS BOOL "Build specialized fused GPU kernels" OFF - DEPENDS_ON BUILD_CVODE CUDA_OR_HIP - DEPENDS_ON_THROW_ERROR) + DEPENDS_ON SUNDIALS_ENABLE_CVODE CUDA_OR_HIP + DEPENDS_ON_THROW_ERROR DEPRECATED_NAMES SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) # --------------------------------------------------------------- # Options to enable/disable build for NVECTOR modules. # --------------------------------------------------------------- # required modules are in the build list, but cannot be disabled -set(BUILD_NVECTOR_SERIAL TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_SERIAL") +set(SUNDIALS_ENABLE_NVECTOR_SERIAL TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_SERIAL") sundials_option( - BUILD_NVECTOR_CUDA BOOL "Build the NVECTOR_CUDA module (requires CUDA)" ON - DEPENDS_ON ENABLE_CUDA CMAKE_CUDA_COMPILER - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_CUDA") + SUNDIALS_ENABLE_NVECTOR_CUDA BOOL + "Build the NVECTOR_CUDA module (requires CUDA)" ON + DEPENDS_ON SUNDIALS_ENABLE_CUDA CMAKE_CUDA_COMPILER + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_CUDA) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_CUDA") sundials_option( - BUILD_NVECTOR_HIP BOOL "Build the NVECTOR_HIP module (requires HIP)" ON - DEPENDS_ON ENABLE_HIP - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_HIP") + SUNDIALS_ENABLE_NVECTOR_HIP BOOL "Build the NVECTOR_HIP module (requires HIP)" + ON + DEPENDS_ON SUNDIALS_ENABLE_HIP + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_HIP) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_HIP") sundials_option( - BUILD_NVECTOR_SYCL BOOL "Build the NVECTOR_SYCL module (requires SYCL)" ON - DEPENDS_ON ENABLE_SYCL - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_SYCL") + SUNDIALS_ENABLE_NVECTOR_SYCL BOOL + "Build the NVECTOR_SYCL module (requires SYCL)" ON + DEPENDS_ON SUNDIALS_ENABLE_SYCL + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_SYCL) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_SYCL") -sundials_option(BUILD_NVECTOR_MANYVECTOR BOOL - "Build the NVECTOR_MANYVECTOR module" ON ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_MANYVECTOR") +sundials_option( + SUNDIALS_ENABLE_NVECTOR_MANYVECTOR + BOOL + "Build the NVECTOR_MANYVECTOR module" + ON + ADVANCED + DEPRECATED_NAMES + BUILD_NVECTOR_MANYVECTOR) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_MANYVECTOR") sundials_option( - BUILD_NVECTOR_MPIMANYVECTOR BOOL + SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR BOOL "Build the NVECTOR_MPIMANYVECTOR module (requires MPI)" ON - DEPENDS_ON ENABLE_MPI MPI_C_FOUND - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_MPIMANYVECTOR") + DEPENDS_ON SUNDIALS_ENABLE_MPI MPI_C_FOUND + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_MPIMANYVECTOR) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR") sundials_option( - BUILD_NVECTOR_MPIPLUSX BOOL "Build the NVECTOR_MPIPLUSX module (requires MPI)" - ON - DEPENDS_ON ENABLE_MPI MPI_C_FOUND BUILD_NVECTOR_MPIMANYVECTOR - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_MPIPLUSX") + SUNDIALS_ENABLE_NVECTOR_MPIPLUSX BOOL + "Build the NVECTOR_MPIPLUSX module (requires MPI)" ON + DEPENDS_ON SUNDIALS_ENABLE_MPI MPI_C_FOUND + SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_MPIPLUSX) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_MPIPLUSX") sundials_option( - BUILD_NVECTOR_PARALLEL BOOL "Build the NVECTOR_PARALLEL module (requires MPI)" - ON - DEPENDS_ON ENABLE_MPI MPI_C_FOUND - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_PARALLEL") + SUNDIALS_ENABLE_NVECTOR_PARALLEL BOOL + "Build the NVECTOR_PARALLEL module (requires MPI)" ON + DEPENDS_ON SUNDIALS_ENABLE_MPI MPI_C_FOUND + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_PARALLEL) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_PARALLEL") sundials_option( - BUILD_NVECTOR_OPENMP BOOL "Build the NVECTOR_OPENMP module" ON - DEPENDS_ON ENABLE_OPENMP - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_OPENMP") + SUNDIALS_ENABLE_NVECTOR_OPENMP BOOL "Build the NVECTOR_OPENMP module" ON + DEPENDS_ON SUNDIALS_ENABLE_OPENMP + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_OPENMP) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_OPENMP") sundials_option( - BUILD_NVECTOR_OPENMPDEV BOOL "Build the NVECTOR_OPENMPDEV module" ON - DEPENDS_ON ENABLE_OPENMP_DEVICE OPENMP_SUPPORTS_DEVICE_OFFLOADING - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_OPENMPDEV") + SUNDIALS_ENABLE_NVECTOR_OPENMPDEV BOOL "Build the NVECTOR_OPENMPDEV module" ON + DEPENDS_ON SUNDIALS_ENABLE_OPENMP_DEVICE OPENMP_SUPPORTS_DEVICE_OFFLOADING + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_OPENMPDEV) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_OPENMPDEV") sundials_option( - BUILD_NVECTOR_PARHYP BOOL "Build the NVECTOR_PARHYP module (requires hypre)" - ON - DEPENDS_ON ENABLE_HYPRE - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_PARHYP") + SUNDIALS_ENABLE_NVECTOR_PARHYP BOOL + "Build the NVECTOR_PARHYP module (requires hypre)" ON + DEPENDS_ON SUNDIALS_ENABLE_HYPRE + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_PARHYP) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_PARHYP") sundials_option( - BUILD_NVECTOR_PETSC BOOL "Build the NVECTOR_PETSC module (requires PETSc)" ON - DEPENDS_ON ENABLE_PETSC - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_PETSC") + SUNDIALS_ENABLE_NVECTOR_PETSC BOOL + "Build the NVECTOR_PETSC module (requires PETSc)" ON + DEPENDS_ON SUNDIALS_ENABLE_PETSC + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_PETSC) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_PETSC") sundials_option( - BUILD_NVECTOR_PTHREADS BOOL "Build the NVECTOR_PTHREADS module" ON - DEPENDS_ON ENABLE_PTHREAD - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_PTHREADS") + SUNDIALS_ENABLE_NVECTOR_PTHREADS BOOL "Build the NVECTOR_PTHREADS module" ON + DEPENDS_ON SUNDIALS_ENABLE_PTHREAD + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_PTHREADS) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_PTHREADS") sundials_option( - BUILD_NVECTOR_RAJA BOOL "Build the NVECTOR_RAJA module (requires RAJA)" ON - DEPENDS_ON ENABLE_RAJA - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_RAJA") + SUNDIALS_ENABLE_NVECTOR_RAJA BOOL + "Build the NVECTOR_RAJA module (requires RAJA)" ON + DEPENDS_ON SUNDIALS_ENABLE_RAJA + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_RAJA) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_RAJA") sundials_option( - BUILD_NVECTOR_TRILINOS BOOL + SUNDIALS_ENABLE_NVECTOR_TRILINOS BOOL "Build the NVECTOR_TRILINOS module (requires Trilinos)" ON - DEPENDS_ON ENABLE_TRILINOS - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_TRILINOS") + DEPENDS_ON SUNDIALS_ENABLE_TRILINOS + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_TRILINOS) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_TRILINOS") sundials_option( - BUILD_NVECTOR_KOKKOS BOOL "Build the NVECTOR_KOKKOS module (requires Kokkos)" - ON - DEPENDS_ON ENABLE_KOKKOS - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_KOKKOS") + SUNDIALS_ENABLE_NVECTOR_KOKKOS BOOL + "Build the NVECTOR_KOKKOS module (requires Kokkos)" ON + DEPENDS_ON SUNDIALS_ENABLE_KOKKOS + ADVANCED DEPRECATED_NAMES BUILD_NVECTOR_KOKKOS) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_NVECTOR_KOKKOS") # --------------------------------------------------------------- # Options to enable/disable build for SUNMATRIX modules. # --------------------------------------------------------------- # required modules are in the build list, but cannot be disabled -set(BUILD_SUNMATRIX_BAND TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_BAND") -set(BUILD_SUNMATRIX_DENSE TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_DENSE") -set(BUILD_SUNMATRIX_SPARSE TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_SPARSE") +set(SUNDIALS_ENABLE_SUNMATRIX_BAND TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_BAND") +set(SUNDIALS_ENABLE_SUNMATRIX_DENSE TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_DENSE") +set(SUNDIALS_ENABLE_SUNMATRIX_SPARSE TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_SPARSE") set(_COMPATIBLE_INDEX_SIZE FALSE) if(SUNDIALS_INDEX_SIZE MATCHES "32") set(_COMPATIBLE_INDEX_SIZE TRUE) endif() sundials_option( - BUILD_SUNMATRIX_CUSPARSE BOOL + SUNDIALS_ENABLE_SUNMATRIX_CUSPARSE BOOL "Build the SUNMATRIX_CUSPARSE module (requires CUDA and 32-bit indexing)" ON - DEPENDS_ON ENABLE_CUDA CMAKE_CUDA_COMPILER _COMPATIBLE_INDEX_SIZE - BUILD_NVECTOR_CUDA - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_CUSPARSE") + DEPENDS_ON SUNDIALS_ENABLE_CUDA CMAKE_CUDA_COMPILER _COMPATIBLE_INDEX_SIZE + SUNDIALS_ENABLE_NVECTOR_CUDA + ADVANCED DEPRECATED_NAMES BUILD_SUNMATRIX_CUSPARSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_CUSPARSE") sundials_option( - BUILD_SUNMATRIX_GINKGO BOOL + SUNDIALS_ENABLE_SUNMATRIX_GINKGO BOOL "Build the SUNMATRIX_GINKGO module (requires Ginkgo)" ON - DEPENDS_ON ENABLE_GINKGO - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_GINKGO") + DEPENDS_ON SUNDIALS_ENABLE_GINKGO + ADVANCED DEPRECATED_NAMES BUILD_SUNMATRIX_GINKGO) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_GINKGO") sundials_option( - BUILD_SUNMATRIX_KOKKOSDENSE BOOL "Build the SUNMATRIX_KOKKOSDENSE module" ON - DEPENDS_ON ENABLE_KOKKOS ENABLE_KOKKOS_KERNELS - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_KOKKOSDENSE") + SUNDIALS_ENABLE_SUNMATRIX_KOKKOSDENSE BOOL + "Build the SUNMATRIX_KOKKOSDENSE module" ON + DEPENDS_ON SUNDIALS_ENABLE_KOKKOS SUNDIALS_ENABLE_KOKKOS_KERNELS + ADVANCED DEPRECATED_NAMES BUILD_SUNMATRIX_KOKKOSDENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_KOKKOSDENSE") sundials_option( - BUILD_SUNMATRIX_MAGMADENSE BOOL + SUNDIALS_ENABLE_SUNMATRIX_MAGMADENSE BOOL "Build the SUNMATRIX_MAGMADENSE module (requires MAGMA)" ON - DEPENDS_ON ENABLE_MAGMA - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_MAGMADENSE") + DEPENDS_ON SUNDIALS_ENABLE_MAGMA + ADVANCED DEPRECATED_NAMES BUILD_SUNMATRIX_MAGMADENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_MAGMADENSE") sundials_option( - BUILD_SUNMATRIX_ONEMKLDENSE BOOL + SUNDIALS_ENABLE_SUNMATRIX_ONEMKLDENSE BOOL "Build the SUNMATRIX_ONEMKLDENSE module (requires oneMKL)" ON - DEPENDS_ON ENABLE_ONEMKL - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_ONEMKLDENSE") + DEPENDS_ON SUNDIALS_ENABLE_ONEMKL + ADVANCED DEPRECATED_NAMES BUILD_SUNMATRIX_ONEMKLDENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_ONEMKLDENSE") sundials_option( - BUILD_SUNMATRIX_SLUNRLOC BOOL + SUNDIALS_ENABLE_SUNMATRIX_SLUNRLOC BOOL "Build the SUNMATRIX_SLUNRLOC module (requires SuperLU_DIST)" ON - DEPENDS_ON ENABLE_SUPERLUDIST - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNMATRIX_SLUNRLOC") + DEPENDS_ON SUNDIALS_ENABLE_SUPERLUDIST + ADVANCED DEPRECATED_NAMES BUILD_SUNMATRIX_SLUNRLOC) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNMATRIX_SLUNRLOC") # --------------------------------------------------------------- # Options to enable/disable build for SUNLINSOL modules. # --------------------------------------------------------------- # required modules are in the build list, but cannot be disabled -set(BUILD_SUNLINSOL_BAND TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_BAND") -set(BUILD_SUNLINSOL_DENSE TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_DENSE") -set(BUILD_SUNLINSOL_PCG TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_PCG") -set(BUILD_SUNLINSOL_SPBCGS TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_SPBCGS") -set(BUILD_SUNLINSOL_SPFGMR TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_SPFGMR") -set(BUILD_SUNLINSOL_SPGMR TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_SPGMR") -set(BUILD_SUNLINSOL_SPTFQMR TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_SPTFQMR") - -sundials_option( - BUILD_SUNLINSOL_CUSOLVERSP BOOL +set(SUNDIALS_ENABLE_SUNLINSOL_BAND TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_BAND") +set(SUNDIALS_ENABLE_SUNLINSOL_DENSE TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_DENSE") +set(SUNDIALS_ENABLE_SUNLINSOL_PCG TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_PCG") +set(SUNDIALS_ENABLE_SUNLINSOL_SPBCGS TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_SPBCGS") +set(SUNDIALS_ENABLE_SUNLINSOL_SPFGMR TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_SPFGMR") +set(SUNDIALS_ENABLE_SUNLINSOL_SPGMR TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_SPGMR") +set(SUNDIALS_ENABLE_SUNLINSOL_SPTFQMR TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_SPTFQMR") + +sundials_option( + SUNDIALS_ENABLE_SUNLINSOL_CUSOLVERSP BOOL "Build the SUNLINSOL_CUSOLVERSP module (requires CUDA and 32-bit indexing)" ON - DEPENDS_ON ENABLE_CUDA CMAKE_CUDA_COMPILER BUILD_NVECTOR_CUDA - BUILD_SUNMATRIX_CUSPARSE - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_CUSOLVERSP") + DEPENDS_ON SUNDIALS_ENABLE_CUDA CMAKE_CUDA_COMPILER + SUNDIALS_ENABLE_NVECTOR_CUDA SUNDIALS_ENABLE_SUNMATRIX_CUSPARSE + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_CUSOLVERSP) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_CUSOLVERSP") sundials_option( - BUILD_SUNLINSOL_GINKGO BOOL + SUNDIALS_ENABLE_SUNLINSOL_GINKGO BOOL "Build the SUNLINSOL_GINKGO module (requires Ginkgo)" ON - DEPENDS_ON ENABLE_GINKGO - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_GINKGO") + DEPENDS_ON SUNDIALS_ENABLE_GINKGO + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_GINKGO) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_GINKGO") sundials_option( - BUILD_SUNLINSOL_KLU BOOL "Build the SUNLINSOL_KLU module (requires KLU)" ON - DEPENDS_ON ENABLE_KLU - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_KLU") + SUNDIALS_ENABLE_SUNLINSOL_KLU BOOL + "Build the SUNLINSOL_KLU module (requires KLU)" ON + DEPENDS_ON SUNDIALS_ENABLE_KLU + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_KLU) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_KLU") sundials_option( - BUILD_SUNLINSOL_KOKKOSDENSE BOOL "Build the SUNLINSOL_KOKKOSDENSE module" ON - DEPENDS_ON ENABLE_KOKKOS ENABLE_KOKKOS_KERNELS - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_KOKKOSDENSE") + SUNDIALS_ENABLE_SUNLINSOL_KOKKOSDENSE BOOL + "Build the SUNLINSOL_KOKKOSDENSE module" ON + DEPENDS_ON SUNDIALS_ENABLE_KOKKOS SUNDIALS_ENABLE_KOKKOS_KERNELS + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_KOKKOSDENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_KOKKOSDENSE") sundials_option( - BUILD_SUNLINSOL_LAPACKBAND BOOL + SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND BOOL "Build the SUNLINSOL_LAPACKBAND module (requires LAPACK)" ON - DEPENDS_ON ENABLE_LAPACK - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_LAPACKBAND") + DEPENDS_ON SUNDIALS_ENABLE_LAPACK + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_LAPACKBAND) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND") sundials_option( - BUILD_SUNLINSOL_LAPACKDENSE BOOL + SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE BOOL "Build the SUNLINSOL_LAPACKDENSE module (requires LAPACK)" ON - DEPENDS_ON ENABLE_LAPACK - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_LAPACKDENSE") + DEPENDS_ON SUNDIALS_ENABLE_LAPACK + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_LAPACKDENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE") sundials_option( - BUILD_SUNLINSOL_MAGMADENSE BOOL + SUNDIALS_ENABLE_SUNLINSOL_MAGMADENSE BOOL "Build the SUNLINSOL_MAGMADENSE module (requires MAGMA)" ON - DEPENDS_ON ENABLE_MAGMA - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_MAGMADENSE") + DEPENDS_ON SUNDIALS_ENABLE_MAGMA + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_MAGMADENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_MAGMADENSE") sundials_option( - BUILD_SUNLINSOL_ONEMKLDENSE BOOL + SUNDIALS_ENABLE_SUNLINSOL_ONEMKLDENSE BOOL "Build the SUNLINSOL_ONEMKLDENSE module (requires oneMKL)" ON - DEPENDS_ON ENABLE_ONEMKL - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_ONEMKLDENSE") + DEPENDS_ON SUNDIALS_ENABLE_ONEMKL + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_ONEMKLDENSE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_ONEMKLDENSE") sundials_option( - BUILD_SUNLINSOL_SUPERLUDIST BOOL + SUNDIALS_ENABLE_SUNLINSOL_SUPERLUDIST BOOL "Build the SUNLINSOL_SUPERLUDIST module (requires SUPERLUDIST)" ON - DEPENDS_ON ENABLE_SUPERLUDIST BUILD_SUNMATRIX_SLUNRLOC - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_SUPERLUDIST") + DEPENDS_ON SUNDIALS_ENABLE_SUPERLUDIST SUNDIALS_ENABLE_SUNMATRIX_SLUNRLOC + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_SUPERLUDIST) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_SUPERLUDIST") sundials_option( - BUILD_SUNLINSOL_SUPERLUMT BOOL + SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT BOOL "Build the SUNLINSOL_SUPERLUMT module (requires SUPERLUMT)" ON - DEPENDS_ON ENABLE_SUPERLUMT - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_SUPERLUMT") + DEPENDS_ON SUNDIALS_ENABLE_SUPERLUMT + ADVANCED DEPRECATED_NAMES BUILD_SUNLINSOL_SUPERLUMT) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT") # --------------------------------------------------------------- # Options to enable/disable build for SUNNONLINSOL modules. # --------------------------------------------------------------- # required modules are in the build list, but cannot be disabled -set(BUILD_SUNNONLINSOL_NEWTON TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNNONLINSOL_NEWTON") -set(BUILD_SUNNONLINSOL_FIXEDPOINT TRUE) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNNONLINSOL_FIXEDPOINT") +set(SUNDIALS_ENABLE_SUNNONLINSOL_NEWTON TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNNONLINSOL_NEWTON") +set(SUNDIALS_ENABLE_SUNNONLINSOL_FIXEDPOINT TRUE) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNNONLINSOL_FIXEDPOINT") sundials_option( - BUILD_SUNNONLINSOL_PETSCSNES BOOL + SUNDIALS_ENABLE_SUNNONLINSOL_PETSCSNES BOOL "Build the SUNNONLINSOL_PETSCSNES module (requires PETSc)" ON - DEPENDS_ON ENABLE_PETSC PETSC_FOUND - ADVANCED) -list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNNONLINSOL_PETSCSNES") + DEPENDS_ON SUNDIALS_ENABLE_PETSC PETSC_FOUND + ADVANCED DEPRECATED_NAMES BUILD_SUNNONLINSOL_PETSCSNES) +list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_SUNNONLINSOL_PETSCSNES") diff --git a/cmake/SundialsBuildOptionsPre.cmake b/cmake/SundialsBuildOptionsPre.cmake index 2306199cd4..a1708b03ee 100644 --- a/cmake/SundialsBuildOptionsPre.cmake +++ b/cmake/SundialsBuildOptionsPre.cmake @@ -71,16 +71,18 @@ set(SUNDIALS_COUNTER_TYPE # --------------------------------------------------------------- set(DOCSTR "Build with simulation monitoring capabilities enabled") -sundials_option(SUNDIALS_BUILD_WITH_MONITORING BOOL "${DOCSTR}" OFF) +sundials_option(SUNDIALS_ENABLE_MONITORING BOOL "${DOCSTR}" OFF + DEPRECATED_NAMES SUNDIALS_BUILD_WITH_MONITORING) # --------------------------------------------------------------- # Option to enable profiling # --------------------------------------------------------------- set(DOCSTR "Build with simulation profiling capabilities enabled") -sundials_option(SUNDIALS_BUILD_WITH_PROFILING BOOL "${DOCSTR}" OFF) +sundials_option(SUNDIALS_ENABLE_PROFILING BOOL "${DOCSTR}" OFF DEPRECATED_NAMES + SUNDIALS_BUILD_WITH_PROFILING) -if(SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_PROFILING) message( WARNING "SUNDIALS built with profiling turned on, performance may be affected.") @@ -162,45 +164,51 @@ endif() # the user the option of enabling/disabling it. if(IS_DIRECTORY "${SUNDIALS_SOURCE_DIR}/src/arkode") - sundials_option(BUILD_ARKODE BOOL "Build the ARKODE library" ON) - list(APPEND SUNDIALS_BUILD_LIST "BUILD_ARKODE") + sundials_option(SUNDIALS_ENABLE_ARKODE BOOL "Enable the ARKODE library" ON + DEPRECATED_NAMES BUILD_ARKODE) + list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_ARKODE") else() - set(BUILD_ARKODE OFF) + set(SUNDIALS_ENABLE_ARKODE OFF) endif() if(IS_DIRECTORY "${SUNDIALS_SOURCE_DIR}/src/cvode") - sundials_option(BUILD_CVODE BOOL "Build the CVODE library" ON) - list(APPEND SUNDIALS_BUILD_LIST "BUILD_CVODE") + sundials_option(SUNDIALS_ENABLE_CVODE BOOL "Enable the CVODE library" ON + DEPRECATED_NAMES BUILD_CVODE) + list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_CVODE") else() - set(BUILD_CVODE OFF) + set(SUNDIALS_ENABLE_CVODE OFF) endif() if(IS_DIRECTORY "${SUNDIALS_SOURCE_DIR}/src/cvodes") - sundials_option(BUILD_CVODES BOOL "Build the CVODES library" ON) - list(APPEND SUNDIALS_BUILD_LIST "BUILD_CVODES") + sundials_option(SUNDIALS_ENABLE_CVODES BOOL "Build the CVODES library" ON + DEPRECATED_NAMES BUILD_CVODES) + list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_CVODES") else() - set(BUILD_CVODES OFF) + set(SUNDIALS_ENABLE_CVODES OFF) endif() if(IS_DIRECTORY "${SUNDIALS_SOURCE_DIR}/src/ida") - sundials_option(BUILD_IDA BOOL "Build the IDA library" ON) - list(APPEND SUNDIALS_BUILD_LIST "BUILD_IDA") + sundials_option(SUNDIALS_ENABLE_IDA BOOL "Build the IDA library" ON + DEPRECATED_NAMES BUILD_IDA) + list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_IDA") else() - set(BUILD_IDA OFF) + set(SUNDIALS_ENABLE_IDA OFF) endif() if(IS_DIRECTORY "${SUNDIALS_SOURCE_DIR}/src/idas") - sundials_option(BUILD_IDAS BOOL "Build the IDAS library" ON) - list(APPEND SUNDIALS_BUILD_LIST "BUILD_IDAS") + sundials_option(SUNDIALS_ENABLE_IDAS BOOL "Build the IDAS library" ON + DEPRECATED_NAMES BUILD_IDAS) + list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_IDAS") else() - set(BUILD_IDAS OFF) + set(SUNDIALS_ENABLE_IDAS OFF) endif() if(IS_DIRECTORY "${SUNDIALS_SOURCE_DIR}/src/kinsol") - sundials_option(BUILD_KINSOL BOOL "Build the KINSOL library" ON) - list(APPEND SUNDIALS_BUILD_LIST "BUILD_KINSOL") + sundials_option(SUNDIALS_ENABLE_KINSOL BOOL "Build the KINSOL library" ON + DEPRECATED_NAMES BUILD_KINSOL) + list(APPEND SUNDIALS_BUILD_LIST "SUNDIALS_ENABLE_KINSOL") else() - set(BUILD_KINSOL OFF) + set(SUNDIALS_ENABLE_KINSOL OFF) endif() # --------------------------------------------------------------- @@ -209,9 +217,16 @@ endif() # Fortran 2003 interface is disabled by default set(DOCSTR "Enable Fortran 2003 modules") -sundials_option(BUILD_FORTRAN_MODULE_INTERFACE BOOL "${DOCSTR}" OFF) - -if(BUILD_FORTRAN_MODULE_INTERFACE) +sundials_option( + SUNDIALS_ENABLE_FORTRAN + BOOL + "${DOCSTR}" + OFF + DEPRECATED_NAMES + F2003_INTERFACE_ENABLE + BUILD_FORTRAN_MODULE_INTERFACE) + +if(SUNDIALS_ENABLE_FORTRAN) # F2003 interface only supports double precision if(NOT (SUNDIALS_PRECISION MATCHES "DOUBLE")) message( @@ -240,17 +255,6 @@ endif() set(DOCSTR "Enable Python interfaces") sundials_option(SUNDIALS_ENABLE_PYTHON BOOL "${DOCSTR}" OFF) -# --------------------------------------------------------------- -# Options for benchmark suite -# --------------------------------------------------------------- - -sundials_option(BUILD_BENCHMARKS BOOL "Build the SUNDIALS benchmark suite" OFF) - -sundials_option( - BENCHMARKS_INSTALL_PATH PATH - "Output directory for installing benchmark executables" - "${CMAKE_INSTALL_PREFIX}/benchmarks") - # --------------------------------------------------------------- # Options for CMake config installation # --------------------------------------------------------------- @@ -263,14 +267,60 @@ sundials_option(SUNDIALS_INSTALL_CMAKEDIR STRING "${DOCSTR}" # Options to enable compiler warnings, address sanitizer # --------------------------------------------------------------- -sundials_option(ENABLE_ALL_WARNINGS BOOL "Enable all compiler warnings" OFF - ADVANCED) +sundials_option( + SUNDIALS_ENABLE_ALL_WARNINGS + BOOL + "Enable all compiler warnings" + OFF + ADVANCED + DEPRECATED_NAMES + ENABLE_ALL_WARNINGS) + +# CMake 3.24 added the native option, CMAKE_COMPILE_WARNING_AS_ERROR +sundials_option( + CMAKE_COMPILE_WARNING_AS_ERROR + BOOL + "Treat compiler warnings as errors" + OFF + ADVANCED + DEPRECATED_NAMES + ENABLE_WARNINGS_AS_ERRORS) -sundials_option(ENABLE_WARNINGS_AS_ERRORS BOOL - "Enable compiler warnings as errors" OFF ADVANCED) +sundials_option( + SUNDIALS_ENABLE_ADDRESS_SANITIZER + BOOL + "Enable address sanitizer" + OFF + ADVANCED + DEPRECATED_NAMES + ENABLE_ADDRESS_SANITIZER) -sundials_option(ENABLE_ADDRESS_SANITIZER BOOL "Enable address sanitizer" OFF - ADVANCED) +sundials_option( + SUNDIALS_ENABLE_MEMORY_SANITIZER + BOOL + "Enable memory sanitizer" + OFF + ADVANCED + DEPRECATED_NAMES + ENABLE_MEMORY_SANITIZER) + +sundials_option( + SUNDIALS_ENABLE_LEAK_SANITIZER + BOOL + "Enable leak sanitizer" + OFF + ADVANCED + DEPRECATED_NAMES + ENABLE_LEAK_SANITIZER) + +sundials_option( + SUNDIALS_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER + BOOL + "Enable undefined behavior sanitizer" + OFF + ADVANCED + DEPRECATED_NAMES + ENABLE_UNDEFINED_BEHAVIOR_SANITIZER) # --------------------------------------------------------------- # Options to enable SUNDIALS debugging @@ -300,13 +350,13 @@ sundials_option( sundials_option( SUNDIALS_DEBUG_CUDA_LASTERROR BOOL "Enable CUDA last error checks when debugging" OFF - DEPENDS_ON SUNDIALS_DEBUG ENABLE_CUDA + DEPENDS_ON SUNDIALS_DEBUG SUNDIALS_ENABLE_CUDA ADVANCED) sundials_option( SUNDIALS_DEBUG_HIP_LASTERROR BOOL "Enable HIP last error checks when debugging" OFF - DEPENDS_ON SUNDIALS_DEBUG ENABLE_HIP + DEPENDS_ON SUNDIALS_DEBUG SUNDIALS_ENABLE_HIP ADVANCED) sundials_option( @@ -340,11 +390,23 @@ endif() # Options for SUNDIALS testing # --------------------------------------------------------------- -sundials_option(SUNDIALS_TEST_ENABLE_DEV_TESTS BOOL "Include development tests" - OFF ADVANCED) +sundials_option( + SUNDIALS_TEST_ENABLE_DEV_TESTS + BOOL + "Enable development tests" + OFF + ADVANCED + DEPRECATED_NAMES + SUNDIALS_TEST_DEVTESTS) -sundials_option(SUNDIALS_TEST_ENABLE_UNIT_TESTS BOOL "Include unit tests" OFF - ADVANCED) +sundials_option( + SUNDIALS_TEST_ENABLE_UNIT_TESTS + BOOL + "Enable unit tests" + OFF + ADVANCED + DEPRECATED_NAMES + SUNDIALS_TEST_UNITTESTS) if(SUNDIALS_TEST_ENABLE_UNIT_TESTS) set(_default_gtest ON) @@ -375,9 +437,14 @@ else() endif() sundials_option( - SUNDIALS_TEST_ENABLE_DIFF_OUTPUT BOOL - "Compare test output with saved answer files" ${_default_diff_output} - ADVANCED) + SUNDIALS_TEST_ENABLE_DIFF_OUTPUT + BOOL + "Compare test output with saved answer files" + ${_default_diff_output} + ADVANCED + DEPRECATED_NAMES + SUNDIALS_TEST_NODIFF + NEGATE_DEPRECATED) if((SUNDIALS_TEST_ENABLE_DEV_TESTS OR SUNDIALS_TEST_ENABLE_UNIT_TESTS) AND NOT SUNDIALS_TEST_ENABLE_DIFF_OUTPUT) @@ -409,8 +476,14 @@ if(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT AND NOT SUNDIALS_TEST_ANSWER_DIR) "failures due to hardware or round-off differences.") endif() -sundials_option(SUNDIALS_TEST_ENABLE_PROFILING BOOL "Profile tests" OFF - ADVANCED) +sundials_option( + SUNDIALS_TEST_ENABLE_PROFILING + BOOL + "Profile tests" + OFF + ADVANCED + DEPRECATED_NAMES + SUNDIALS_TEST_PROFILE) sundials_option( SUNDIALS_TEST_CALIPER_OUTPUT_DIR PATH "Location to write test Caliper files" @@ -445,6 +518,15 @@ sundials_option(SUNDIALS_DEV_CLANG_TIDY BOOL "Enable clang-tidy" OFF ADVANCED) # Options for SUNDIALS benchmarks # --------------------------------------------------------------- +sundials_option( + SUNDIALS_ENABLE_BENCHMARKS BOOL "Build the SUNDIALS benchmark suite" OFF + DEPRECATED_NAMES BUILD_BENCHMARKS) + +sundials_option( + SUNDIALS_BENCHMARKS_INSTALL_PATH PATH + "Output directory for installing benchmark executables" + "${CMAKE_INSTALL_PREFIX}/benchmarks" DEPRECATED_NAMES BENCHMARKS_INSTALL_PATH) + sundials_option( SUNDIALS_SCHEDULER_COMMAND STRING "Job scheduler command to use to launch SUNDIALS MPI tests" "" ADVANCED) diff --git a/cmake/SundialsDeprecated.cmake b/cmake/SundialsDeprecated.cmake index 6464df4359..14e3917a2d 100644 --- a/cmake/SundialsDeprecated.cmake +++ b/cmake/SundialsDeprecated.cmake @@ -15,96 +15,29 @@ # SUNDIALS Copyright End # --------------------------------------------------------------- -# -# Deprecated Fortran options -# - -if(DEFINED F2003_INTERFACE_ENABLE) - message(DEPRECATION "The CMake option F2003_INTERFACE_ENABLE is deprecated. " - "Use BUILD_FORTRAN_MODULE_INTERFACE instead.") - set(BUILD_FORTRAN_MODULE_INTERFACE - ${F2003_INTERFACE_ENABLE} - CACHE BOOL "Enable Fortran 2003 module interfaces") -endif() - -unset(F2003_INTERFACE_ENABLE CACHE) - -# -# Deprecated TPL options -# - -if(DEFINED MPI_ENABLE) - message(DEPRECATION "The CMake option MPI_ENABLE is deprecated. " - "Use ENABLE_MPI instead.") - set(ENABLE_MPI - ${MPI_ENABLE} - CACHE BOOL "Enable MPI support" FORCE) - unset(MPI_ENABLE CACHE) -endif() - -if(DEFINED OPENMP_ENABLE) - message(DEPRECATION "The CMake option OPENMP_ENABLE is deprecated. " - "Use ENABLE_OPENMP instead.") - set(ENABLE_OPENMP - ${OPENMP_ENABLE} - CACHE BOOL "Enable OpenMP support" FORCE) - unset(OPENMP_ENABLE CACHE) -endif() - -if(DEFINED OPENMP_DEVICE_ENABLE) - message(DEPRECATION "The CMake option OPENMP_DEVICE_ENABLE is deprecated. " - "Use ENABLE_OPENMP_DEVICE instead.") - set(ENABLE_OPENMP_DEVICE - ${OPENMP_DEVICE_ENABLE} - CACHE BOOL "Enable OpenMP device offloading support" FORCE) - unset(OPENMP_DEVICE_ENABLE CACHE) -endif() - -if(DEFINED SKIP_OPENMP_DEVICE_CHECK) - message( - DEPRECATION "The CMake option SKIP_OPENMP_DEVICE_CHECK is deprecated. " - "Use OPENMP_DEVICE_WORKS instead.") - set(OPENMP_DEVICE_WORKS - ${SKIP_OPENMP_DEVICE_CHECK} - CACHE BOOL "Skip the compiler check for OpenMP device offloading" FORCE) - unset(SKIP_OPENMP_DEVICE_CHECK CACHE) -endif() +# --------------------------------------------------------------- +# Option for testing CI deprecated options +# --------------------------------------------------------------- -if(DEFINED PTHREAD_ENABLE) - message(DEPRECATION "The CMake option PTHREAD_ENABLE is deprecated. " - "Use ENABLE_PTHREAD instead") - set(ENABLE_PTHREAD - ${PTHREAD_ENABLE} - CACHE BOOL "Enable Pthreads support" FORCE) - unset(PTHREAD_ENABLE CACHE) +if(DEFINED ENV{SUNDIALS_ENABLE_UNSET_DEPRECATED}) + set(_sundials_enable_unset_deprecated_default + "$ENV{SUNDIALS_ENABLE_UNSET_DEPRECATED}") +else() + set(_sundials_enable_unset_deprecated_default OFF) endif() -if(DEFINED CUDA_ENABLE) - message(DEPRECATION "The CMake option CUDA_ENABLE is deprecated. " - "Use ENABLE_CUDA instead.") - set(ENABLE_CUDA - ${CUDA_ENABLE} - CACHE BOOL "Enable CUDA support" FORCE) - unset(CUDA_ENABLE CACHE) -endif() +sundials_option( + SUNDIALS_ENABLE_UNSET_DEPRECATED BOOL "Unset deprecated CMake options" + ${_sundials_enable_unset_deprecated_default} ADVANCED) -if(DEFINED LAPACK_ENABLE) - message(DEPRECATION "The CMake option LAPACK_ENABLE is deprecated. " - "Use ENABLE_LAPACK instead.") - set(ENABLE_LAPACK - ${LAPACK_ENABLE} - CACHE BOOL "Enable LAPACK support" FORCE) - unset(LAPACK_ENABLE CACHE) +if(SUNDIALS_ENABLE_UNSET_DEPRECATED) + message(WARNING "Unsetting deprecated SUNDIALS options.") endif() -if(DEFINED SUPERLUDIST_ENABLE) - message(DEPRECATION "The CMake option SUPERLUDIST_ENABLE is deprecated. " - "Use ENABLE_SUPERLUDIST instead.") - set(ENABLE_SUPERLUDIST - ${SUPERLUDIST_ENABLE} - CACHE BOOL "Enable SuperLU_DIST support" FORCE) - unset(SUPERLUDIST_ENABLE CACHE) -endif() +# --------------------------------------------------------------- +# Deprecated options that can not use the DEPRECATED_NAMES option to +# sundials_option +# --------------------------------------------------------------- # Deprecated with SUNDIALS 6.4.0 if(DEFINED SUPERLUDIST_LIBRARY_DIR) @@ -113,75 +46,12 @@ if(DEFINED SUPERLUDIST_LIBRARY_DIR) set(SUPERLUDIST_DIR "${SUPERLUDIST_LIBRARY_DIR}/../" CACHE BOOL "SuperLU_DIST root directory" FORCE) - unset(SUPERLUDIST_LIBRARY_DIR CACHE) -endif() -if(DEFINED SUPERLUDIST_INCLUDE_DIR) - message(DEPRECATION "The CMake option SUPERLUDIST_INCLUDE_DIR is deprecated. " - "Use SUPERLUDIST_INCLUDE_DIRS instead.") - set(SUPERLUDIST_INCLUDE_DIRS - "${SUPERLUDIST_INCLUDE_DIR}" - CACHE BOOL "SuperLU_DIST include directoroes" FORCE) - unset(SUPERLUDIST_INCLUDE_DIR CACHE) -endif() - -if(DEFINED SUPERLUMT_ENABLE) - message(DEPRECATION "The CMake option SUPERLUMT_ENABLE is deprecated. " - "Use ENABLE_SUPERLUMT instead.") - set(ENABLE_SUPERLUMT - ${SUPERLUMT_ENABLE} - CACHE BOOL "Enable SuperLU_MT support" FORCE) - unset(SUPERLUMT_ENABLE CACHE) -endif() - -if(DEFINED KLU_ENABLE) - message(DEPRECATION "The CMake option KLU_ENABLE is deprecated. " - "Use ENABLE_KLU instead.") - set(ENABLE_KLU - ${KLU_ENABLE} - CACHE BOOL "Enable KLU support" FORCE) - unset(KLU_ENABLE CACHE) -endif() - -if(DEFINED HYPRE_ENABLE) - message(DEPRECATION "The CMake option HYPRE_ENABLE is deprecated. " - "Use ENABLE_HYPRE instead.") - set(ENABLE_HYPRE - ${HYPRE_ENABLE} - CACHE BOOL "Enable HYPRE support" FORCE) - unset(HYPRE_ENABLE CACHE) -endif() - -if(DEFINED PETSC_ENABLE) - message(DEPRECATION "The CMake option PETSC_ENABLE is deprecated. " - "Use ENABLE_PETSC instead.") - set(ENABLE_PETSC - ${PETSC_ENABLE} - CACHE BOOL "Enable PETSC support" FORCE) - unset(PETSC_ENABLE CACHE) -endif() - -if(DEFINED Trilinos_ENABLE) - message(DEPRECATION "The CMake option Trilinos_ENABLE is deprecated. " - "Use ENABLE_TRILINOS instead.") - set(ENABLE_TRILINOS - ${Trilinos_ENABLE} - CACHE BOOL "Enable Trilinos support" FORCE) - unset(Trilinos_ENABLE CACHE) -endif() - -if(DEFINED RAJA_ENABLE) - message(DEPRECATION "The CMake option RAJA_ENABLE is deprecated. " - "Use ENABLE_RAJA instead.") - set(ENABLE_RAJA - ${RAJA_ENABLE} - CACHE BOOL "Enable RAJA support" FORCE) - unset(RAJA_ENABLE CACHE) + if(SUNDIALS_ENABLE_UNSET_DEPRECATED) + unset(SUPERLUDIST_LIBRARY_DIR CACHE) + endif() endif() -# # Deprecated CUDA_ARCH option -# - if(DEFINED CUDA_ARCH) message(DEPRECATION "The CMake option CUDA_ARCH is deprecated. " "Use CMAKE_CUDA_ARCHITECTURES instead.") @@ -190,53 +60,9 @@ if(DEFINED CUDA_ARCH) set(CMAKE_CUDA_ARCHITECTURES ${arch_name} CACHE STRING "CUDA Architectures" FORCE) - unset(CUDA_ARCH) -endif() - -# -# Deprecated Testing Options -# - -if(SUNDIALS_TEST_PROFILE) - message(DEPRECATION "The CMake option SUNDIALS_TEST_PROFILE is deprecated. " - "Use SUNDIALS_TEST_ENABLE_PROFILING instead.") - set(SUNDIALS_TEST_ENABLE_PROFILING - ${SUNDIALS_TEST_PROFILE} - CACHE BOOL "Profile tests" FORCE) - unset(SUNDIALS_TEST_PROFILE) -endif() - -if(SUNDIALS_TEST_NODIFF) - message(DEPRECATION "The CMake option SUNDIALS_TEST_NODIFF is deprecated. " - "Use SUNDIALS_TEST_ENABLE_DIFF_OUTPUT instead.") - if(SUNDIALS_TEST_NODIFF) - set(_new_value OFF) - else() - set(_new_value ON) + if(SUNDIALS_ENABLE_UNSET_DEPRECATED) + unset(CUDA_ARCH) endif() - set(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT - ${_new_value} - CACHE BOOL "Compare test output with saved answer files" FORCE) - unset(SUNDIALS_TEST_NODIFF) - unset(_new_value) -endif() - -if(SUNDIALS_TEST_DEVTESTS) - message(DEPRECATION "The CMake option SUNDIALS_TEST_DEVTESTS is deprecated. " - "Use SUNDIALS_TEST_ENABLE_DEV_TESTS instead.") - set(SUNDIALS_TEST_ENABLE_DEV_TESTS - ${SUNDIALS_TEST_DEVTESTS} - CACHE BOOL "Include development tests" FORCE) - unset(SUNDIALS_TEST_DEVTESTS) -endif() - -if(SUNDIALS_TEST_UNITTESTS) - message(DEPRECATION "The CMake option SUNDIALS_TEST_UNITTESTS is deprecated. " - "Use SUNDIALS_TEST_ENABLE_UNIT_TESTS instead.") - set(SUNDIALS_TEST_ENABLE_UNIT_TESTS - ${SUNDIALS_TEST_UNITTESTS} - CACHE BOOL "Include units tests" FORCE) - unset(SUNDIALS_TEST_UNITTESTS) endif() if(SUNDIALS_CALIPER_OUTPUT_DIR) @@ -251,5 +77,7 @@ if(SUNDIALS_CALIPER_OUTPUT_DIR) set(SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR} CACHE PATH "Location to write benchmark caliper files" FORCE) - unset(SUNDIALS_CALIPER_OUTPUT_DIR) + if(SUNDIALS_ENABLE_UNSET_DEPRECATED) + unset(SUNDIALS_CALIPER_OUTPUT_DIR) + endif() endif() diff --git a/cmake/SundialsExampleOptions.cmake b/cmake/SundialsExampleOptions.cmake index 2f1f5836d5..62ae62389b 100644 --- a/cmake/SundialsExampleOptions.cmake +++ b/cmake/SundialsExampleOptions.cmake @@ -21,86 +21,71 @@ # Options for C/C++ examples # ----------------------------------------------------------------------------- -sundials_option(EXAMPLES_ENABLE_C BOOL "Build SUNDIALS C examples" ON) +sundials_option(SUNDIALS_EXAMPLES_ENABLE_C BOOL "Build SUNDIALS C examples" ON + DEPRECATED_NAMES EXAMPLES_ENABLE_C) # Some TPLs only have C++ examples. Default the C++ examples to ON if any of # these are enabled on the initial configuration pass. -if(ENABLE_TRILINOS - OR ENABLE_SUPERLUDIST - OR ENABLE_XBRAID - OR ENABLE_HIP - OR ENABLE_MAGMA - OR ENABLE_SYCL - OR ENABLE_ONEMKL - OR ENABLE_RAJA - OR ENABLE_GINKGO - OR ENABLE_KOKKOS) - sundials_option(EXAMPLES_ENABLE_CXX BOOL "Build SUNDIALS C++ examples" ON) +if(SUNDIALS_ENABLE_TRILINOS + OR SUNDIALS_ENABLE_SUPERLUDIST + OR SUNDIALS_ENABLE_XBRAID + OR SUNDIALS_ENABLE_HIP + OR SUNDIALS_ENABLE_MAGMA + OR SUNDIALS_ENABLE_SYCL + OR SUNDIALS_ENABLE_ONEMKL + OR SUNDIALS_ENABLE_RAJA + OR SUNDIALS_ENABLE_GINKGO + OR SUNDIALS_ENABLE_KOKKOS) + sundials_option( + SUNDIALS_EXAMPLES_ENABLE_CXX BOOL "Build SUNDIALS C++ examples" ON + DEPRECATED_NAMES EXAMPLES_ENABLE_CXX) else() - sundials_option(EXAMPLES_ENABLE_CXX BOOL "Build SUNDIALS C++ examples" OFF) + sundials_option( + SUNDIALS_EXAMPLES_ENABLE_CXX BOOL "Build SUNDIALS C++ examples" OFF + DEPRECATED_NAMES EXAMPLES_ENABLE_CXX) endif() # ----------------------------------------------------------------------------- # Options for Fortran Examples # ----------------------------------------------------------------------------- -# F2003 examples (on by default) are an option only if the Fortran 2003 -# interface is enabled. -set(DOCSTR "Build SUNDIALS Fortran 2003 examples") -if(BUILD_FORTRAN_MODULE_INTERFACE) - set(EXAMPLES_ENABLE_F2003 - ON - CACHE BOOL "${DOCSTR}") - - # Fortran 2003 examples only support double precision - if(EXAMPLES_ENABLE_F2003 AND (NOT (SUNDIALS_PRECISION MATCHES "DOUBLE"))) - message( - WARNING - "F2003 examples are not compatible with ${SUNDIALS_PRECISION} precision. " - "Setting EXAMPLES_ENABLE_F2003 to OFF.") - set(EXAMPLES_ENABLE_F2003 - OFF - CACHE BOOL "${DOCSTR}" FORCE) - endif() +if(SUNDIALS_ENABLE_FORTRAN) + sundials_option( + SUNDIALS_EXAMPLES_ENABLE_FORTRAN BOOL "Build SUNDIALS Fortran examples" ON + DEPENDS_ON SUNDIALS_ENABLE_FORTRAN DEPRECATED_NAMES EXAMPLES_ENABLE_F2003) else() - - # set back to OFF (in case it was ON) - if(EXAMPLES_ENABLE_F2003) - message( - WARNING - "EXAMPLES_ENABLE_F2003 is ON but BUILD_FORTRAN_MODULE_INTERFACE is OFF. " - "Setting EXAMPLES_ENABLE_F2003 to OFF.") - set(EXAMPLES_ENABLE_F2003 - OFF - CACHE BOOL "${DOCSTR}" FORCE) - endif() - + sundials_option( + SUNDIALS_EXAMPLES_ENABLE_FORTRAN BOOL "Build SUNDIALS Fortran examples" OFF + DEPENDS_ON SUNDIALS_ENABLE_FORTRAN DEPRECATED_NAMES EXAMPLES_ENABLE_F2003) endif() # ----------------------------------------------------------------------------- # Options for CUDA Examples # ----------------------------------------------------------------------------- -sundials_option(EXAMPLES_ENABLE_CUDA BOOL "Build SUNDIALS CUDA examples" ON - DEPENDS_ON ENABLE_CUDA) +sundials_option( + SUNDIALS_EXAMPLES_ENABLE_CUDA BOOL "Build SUNDIALS CUDA examples" ON + DEPENDS_ON SUNDIALS_ENABLE_CUDA DEPRECATED_NAMES EXAMPLES_ENABLE_CUDA) # ----------------------------------------------------------------------------- # Options for installing examples # ----------------------------------------------------------------------------- # Enable installing examples by default -sundials_option(EXAMPLES_INSTALL BOOL "Install SUNDIALS examples" ON) +sundials_option(SUNDIALS_EXAMPLES_ENABLE_INSTALL BOOL + "Install SUNDIALS examples" ON) sundials_option( - EXAMPLES_INSTALL_PATH PATH "Output directory for installing example files" + SUNDIALS_EXAMPLES_INSTALL_PATH PATH + "Output directory for installing example files" "${CMAKE_INSTALL_PREFIX}/examples") # If examples are to be exported, check where we should install them. -if(EXAMPLES_INSTALL AND NOT EXAMPLES_INSTALL_PATH) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL AND NOT SUNDIALS_EXAMPLES_INSTALL_PATH) message( WARNING "The example installation path is empty. Example installation " "path was reset to its default value") - set(EXAMPLES_INSTALL_PATH + set(SUNDIALS_EXAMPLES_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/examples" CACHE STRING "Output directory for installing example files" FORCE) endif() @@ -109,10 +94,10 @@ endif() # Internal variables. # ----------------------------------------------------------------------------- -if(EXAMPLES_ENABLE_C - OR EXAMPLES_ENABLE_CXX - OR EXAMPLES_ENABLE_CUDA - OR EXAMPLES_ENABLE_F2003) +if(SUNDIALS_EXAMPLES_ENABLE_C + OR SUNDIALS_EXAMPLES_ENABLE_CXX + OR SUNDIALS_EXAMPLES_ENABLE_CUDA + OR SUNDIALS_EXAMPLES_ENABLE_FORTRAN) set(_BUILD_EXAMPLES TRUE CACHE INTERNAL "") diff --git a/cmake/SundialsSetupBenchmarks.cmake b/cmake/SundialsSetupBenchmarks.cmake index 4bb4208889..9e9d130cce 100644 --- a/cmake/SundialsSetupBenchmarks.cmake +++ b/cmake/SundialsSetupBenchmarks.cmake @@ -40,7 +40,7 @@ if(NOT EXISTS ${SUNDIALS_BENCHMARK_OUTPUT_DIR}) endif() message(STATUS "Benchmark output directory: ${SUNDIALS_BENCHMARK_OUTPUT_DIR}") -if(ENABLE_CALIPER) +if(SUNDIALS_ENABLE_CALIPER) message(STATUS "Enabled benchmark profiling with Caliper") if(NOT EXISTS ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR}) file(MAKE_DIRECTORY ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR}) diff --git a/cmake/SundialsSetupCXX.cmake b/cmake/SundialsSetupCXX.cmake index 34aa894f28..416730b35f 100644 --- a/cmake/SundialsSetupCXX.cmake +++ b/cmake/SundialsSetupCXX.cmake @@ -32,8 +32,8 @@ sundials_option(CMAKE_CXX_STANDARD_REQUIRED BOOL "Require C++ standard version" ON) if(SUNDIALS_ENABLE_PYTHON - OR ENABLE_SYCL - OR ENABLE_GINKGO) + OR SUNDIALS_ENABLE_SYCL + OR SUNDIALS_ENABLE_GINKGO) set(DOCSTR "The C++ standard to use if C++ is enabled (17, 20, 23)") sundials_option(CMAKE_CXX_STANDARD STRING "${DOCSTR}" "17" OPTIONS "17;20;23") else() @@ -55,8 +55,10 @@ if(SUNDIALS_ENABLE_PYTHON AND (CMAKE_CXX_STANDARD LESS "17")) endif() # SYCL requires C++17 -if(ENABLE_SYCL AND (CMAKE_CXX_STANDARD LESS "17")) - message(FATAL_ERROR "CMAKE_CXX_STANDARD must be >= 17 because ENABLE_SYCL=ON") +if(SUNDIALS_ENABLE_SYCL AND (CMAKE_CXX_STANDARD LESS "17")) + message( + FATAL_ERROR + "CMAKE_CXX_STANDARD must be >= 17 because SUNDIALS_ENABLE_SYCL=ON") endif() # Ginkgo requires C++17 diff --git a/cmake/SundialsSetupCompilers.cmake b/cmake/SundialsSetupCompilers.cmake index 4bbbb73852..260b0f4370 100644 --- a/cmake/SundialsSetupCompilers.cmake +++ b/cmake/SundialsSetupCompilers.cmake @@ -79,7 +79,7 @@ endif() # TODO(DJG): Set flags based on CMAKE__COMPILER_ID # =============================================================== -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) message(STATUS "Enabling all compiler warnings") # Some warning flags are not supported by all compilers so ignore unknown @@ -104,7 +104,7 @@ if(ENABLE_ALL_WARNINGS) endif() # Avoid numerous warnings from SWIG generated functions - if(NOT BUILD_FORTRAN_MODULE_INTERFACE) + if(NOT SUNDIALS_ENABLE_FORTRAN) set(WARNING_FLAGS "-Wmissing-declarations -Wcast-qual ${WARNING_FLAGS}") endif() @@ -128,7 +128,7 @@ if(ENABLE_ALL_WARNINGS) ) endif() -if(ENABLE_WARNINGS_AS_ERRORS) +if(CMAKE_COMPILE_WARNING_AS_ERROR) message(STATUS "Enabling compiler warnings as errors") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") @@ -140,7 +140,7 @@ endif() # With clang it is not possible to combine the -fsanitize=address and # -fsanitize=memory checkers. -if(ENABLE_ADDRESS_SANITIZER) +if(SUNDIALS_ENABLE_ADDRESS_SANITIZER) message(STATUS "Enabling address sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") @@ -148,7 +148,7 @@ if(ENABLE_ADDRESS_SANITIZER) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fsanitize=address") endif() -if(ENABLE_MEMORY_SANITIZER) +if(SUNDIALS_ENABLE_MEMORY_SANITIZER) message(STATUS "Enabling memory sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory") @@ -156,7 +156,7 @@ if(ENABLE_MEMORY_SANITIZER) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fsanitize=memory") endif() -if(ENABLE_LEAK_SANITIZER) +if(SUNDIALS_ENABLE_LEAK_SANITIZER) message(STATUS "Enabling leak sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=leak") @@ -164,7 +164,7 @@ if(ENABLE_LEAK_SANITIZER) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fsanitize=leak") endif() -if(ENABLE_UNDEFINED_BEHAVIOR_SANITIZER) +if(SUNDIALS_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER) message(STATUS "Enabling undefined behavior sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined") @@ -321,7 +321,7 @@ check_c_source_compiles( # When LAPACK is enabled we will need a Fortran compiler to infer the # name-mangling scheme if it is not set by the user -if(ENABLE_LAPACK) +if(SUNDIALS_ENABLE_LAPACK) set(NEED_FORTRAN_NAME_MANGLING TRUE) endif() @@ -417,7 +417,7 @@ if(SUNDIALS_LAPACK_CASE AND SUNDIALS_LAPACK_UNDERSCORES) endif() # Do we need a Fortran compiler? -if(BUILD_FORTRAN_MODULE_INTERFACE OR NEED_FORTRAN_NAME_MANGLING) +if(SUNDIALS_ENABLE_FORTRAN OR NEED_FORTRAN_NAME_MANGLING) include(SundialsSetupFortran) endif() @@ -425,20 +425,20 @@ endif() # C++ settings # =============================================================== -if(BUILD_BENCHMARKS +if(SUNDIALS_ENABLE_BENCHMARKS OR SUNDIALS_ENABLE_PYTHON OR SUNDIALS_TEST_ENABLE_UNIT_TESTS - OR EXAMPLES_ENABLE_CXX - OR ENABLE_CUDA - OR ENABLE_HIP - OR ENABLE_SYCL - OR ENABLE_RAJA - OR ENABLE_TRILINOS - OR ENABLE_SUPERLUDIST - OR ENABLE_MAGMA - OR ENABLE_GINKGO - OR ENABLE_KOKKOS - OR ENABLE_ADIAK) + OR SUNDIALS_EXAMPLES_ENABLE_CXX + OR SUNDIALS_ENABLE_CUDA + OR SUNDIALS_ENABLE_HIP + OR SUNDIALS_ENABLE_SYCL + OR SUNDIALS_ENABLE_RAJA + OR SUNDIALS_ENABLE_TRILINOS + OR SUNDIALS_ENABLE_SUPERLUDIST + OR SUNDIALS_ENABLE_MAGMA + OR SUNDIALS_ENABLE_GINKGO + OR SUNDIALS_ENABLE_KOKKOS + OR SUNDIALS_ENABLE_ADIAK) include(SundialsSetupCXX) endif() @@ -446,7 +446,7 @@ endif() # CUDA settings # =============================================================== -if(ENABLE_CUDA) +if(SUNDIALS_ENABLE_CUDA) include(SundialsSetupCuda) # we treat CUDA as both a TPL and a language list(APPEND SUNDIALS_TPL_LIST "CUDA") @@ -456,7 +456,7 @@ endif() # HIP settings # =============================================================== -if(ENABLE_HIP) +if(SUNDIALS_ENABLE_HIP) include(SundialsSetupHIP) # we treat HIP as both a TPL and a language list(APPEND SUNDIALS_TPL_LIST "HIP") @@ -501,7 +501,7 @@ endforeach() # =============================================================== foreach(lang ${_SUNDIALS_ENABLED_LANGS}) - if(ENABLE_MPI) + if(SUNDIALS_ENABLE_MPI) if(DEFINED MPI_${lang}_COMPILER) set(_EXAMPLES_${lang}_COMPILER "${MPI_${lang}_COMPILER}" diff --git a/cmake/SundialsSetupConfig.cmake b/cmake/SundialsSetupConfig.cmake index c7ea170a2b..1bf49bee9d 100644 --- a/cmake/SundialsSetupConfig.cmake +++ b/cmake/SundialsSetupConfig.cmake @@ -56,7 +56,7 @@ endif() set(SUNDIALS_CONFIGH_BUILDS "") foreach(_item ${SUNDIALS_BUILD_LIST}) if(${${_item}}) - string(REPLACE "BUILD_" "" _module ${_item}) + string(REPLACE "SUNDIALS_ENABLE_" "" _module ${_item}) string(APPEND SUNDIALS_CONFIGH_BUILDS "#define SUNDIALS_${_module} 1\n") endif() endforeach() @@ -68,7 +68,7 @@ foreach(tpl ${SUNDIALS_TPL_LIST}) endforeach() # prepare substitution variable SUNDIALS_TRILINOS_HAVE_MPI for sundials_config.h -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) set(SUNDIALS_TRILINOS_HAVE_MPI TRUE) endif() diff --git a/cmake/SundialsSetupCuda.cmake b/cmake/SundialsSetupCuda.cmake index cad3ebcdaa..e3b84853d7 100644 --- a/cmake/SundialsSetupCuda.cmake +++ b/cmake/SundialsSetupCuda.cmake @@ -97,7 +97,7 @@ message( # Configure compiler for installed examples # =============================================================== -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) set(_EXAMPLES_CUDA_HOST_COMPILER "${MPI_CXX_COMPILER}" CACHE INTERNAL "${lang} compiler for installed examples") diff --git a/cmake/SundialsSetupFortran.cmake b/cmake/SundialsSetupFortran.cmake index b78de21130..c0efc45c8a 100644 --- a/cmake/SundialsSetupFortran.cmake +++ b/cmake/SundialsSetupFortran.cmake @@ -34,7 +34,7 @@ set(CMAKE_Fortran_PREPROCESS ON) # ----------------------------------------------------------------------------- # Check if Fortran 2003 is supported # ----------------------------------------------------------------------------- -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) if(NOT F2003_FOUND) message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports F2003") @@ -86,7 +86,7 @@ if(BUILD_FORTRAN_MODULE_INTERFACE) message("${COMPILE_OUTPUT}") message( FATAL_ERROR - "BUILD_FORTRAN_MODULE_INTERFACE is set to ON, but the CMAKE_Fortran_COMPILER does not support F2003" + "SUNDIALS_ENABLE_FORTRAN is set to ON, but the CMAKE_Fortran_COMPILER does not support F2003" ) endif() else() diff --git a/cmake/SundialsSetupTPLs.cmake b/cmake/SundialsSetupTPLs.cmake index 5abcf2ed2f..44b60d26ee 100644 --- a/cmake/SundialsSetupTPLs.cmake +++ b/cmake/SundialsSetupTPLs.cmake @@ -26,7 +26,7 @@ # Find MPI # --------------------------------------------------------------- -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) include(SundialsMPI) list(APPEND SUNDIALS_TPL_LIST "MPI") endif() @@ -35,7 +35,7 @@ endif() # Find OpenMP # --------------------------------------------------------------- -if(ENABLE_OPENMP) +if(SUNDIALS_ENABLE_OPENMP) include(SundialsOpenMP) list(APPEND SUNDIALS_TPL_LIST "OPENMP") endif() @@ -44,7 +44,7 @@ endif() # Find OpenMP with device offloading # -------------------------------------------------------------- -if(ENABLE_OPENMP_DEVICE) +if(SUNDIALS_ENABLE_OPENMP_DEVICE) include(SundialsOpenMP) list(APPEND SUNDIALS_TPL_LIST "OPENMP_DEVICE") endif() @@ -57,7 +57,7 @@ endif() # Find (and test) the Adiak libraries # --------------------------------------------------------------- -if(ENABLE_ADIAK) +if(SUNDIALS_ENABLE_ADIAK) include(SundialsAdiak) list(APPEND SUNDIALS_TPL_LIST "ADIAK") endif() @@ -66,7 +66,7 @@ endif() # Find (and test) the Caliper libraries # --------------------------------------------------------------- -if(ENABLE_CALIPER) +if(SUNDIALS_ENABLE_CALIPER) include(SundialsCaliper) list(APPEND SUNDIALS_TPL_LIST "CALIPER") endif() @@ -75,7 +75,7 @@ endif() # Find (and test) the Ginkgo libraries # --------------------------------------------------------------- -if(ENABLE_GINKGO) +if(SUNDIALS_ENABLE_GINKGO) include(SundialsGinkgo) list(APPEND SUNDIALS_TPL_LIST "GINKGO") endif() @@ -84,7 +84,7 @@ endif() # Find (and test) the hypre libraries # --------------------------------------------------------------- -if(ENABLE_HYPRE) +if(SUNDIALS_ENABLE_HYPRE) include(SundialsHypre) list(APPEND SUNDIALS_TPL_LIST "HYPRE") endif() @@ -93,7 +93,7 @@ endif() # Find (and test) Kokkos # --------------------------------------------------------------- -if(ENABLE_KOKKOS) +if(SUNDIALS_ENABLE_KOKKOS) include(SundialsKokkos) list(APPEND SUNDIALS_TPL_LIST "KOKKOS") endif() @@ -102,7 +102,7 @@ endif() # Find (and test) Kokkos Kernels # --------------------------------------------------------------- -if(ENABLE_KOKKOS_KERNELS) +if(SUNDIALS_ENABLE_KOKKOS_KERNELS) include(SundialsKokkosKernels) list(APPEND SUNDIALS_TPL_LIST "KOKKOS_KERNELS") endif() @@ -111,7 +111,7 @@ endif() # Find (and test) the KLU libraries # --------------------------------------------------------------- -if(ENABLE_KLU) +if(SUNDIALS_ENABLE_KLU) include(SundialsKLU) list(APPEND SUNDIALS_TPL_LIST "KLU") endif() @@ -120,7 +120,7 @@ endif() # Find (and test) the LAPACK and BLAS libraries # --------------------------------------------------------------- -if(ENABLE_LAPACK) +if(SUNDIALS_ENABLE_LAPACK) include(SundialsLapack) list(APPEND SUNDIALS_TPL_LIST "BLAS_LAPACK") endif() @@ -129,7 +129,7 @@ endif() # Find (and test) the MAGMA libraries # --------------------------------------------------------------- -if(ENABLE_MAGMA) +if(SUNDIALS_ENABLE_MAGMA) include(SundialsMAGMA) list(APPEND SUNDIALS_TPL_LIST "MAGMA") endif() @@ -138,7 +138,7 @@ endif() # Find (and test) the oneMKL libraries # --------------------------------------------------------------- -if(ENABLE_ONEMKL) +if(SUNDIALS_ENABLE_ONEMKL) include(SundialsONEMKL) list(APPEND SUNDIALS_TPL_LIST "ONEMKL") endif() @@ -147,7 +147,7 @@ endif() # Find (and test) the PETSc libraries # --------------------------------------------------------------- -if(ENABLE_PETSC) +if(SUNDIALS_ENABLE_PETSC) include(SundialsPETSC) list(APPEND SUNDIALS_TPL_LIST "PETSC") endif() @@ -156,7 +156,7 @@ endif() # Find PThreads # --------------------------------------------------------------- -if(ENABLE_PTHREAD) +if(SUNDIALS_ENABLE_PTHREAD) include(SundialsPthread) list(APPEND SUNDIALS_TPL_LIST "PTHREAD") endif() @@ -165,7 +165,7 @@ endif() # Find (and test) RAJA # ------------------------------------------------------------- -if(ENABLE_RAJA) +if(SUNDIALS_ENABLE_RAJA) include(SundialsRAJA) list(APPEND SUNDIALS_TPL_LIST "RAJA") endif() @@ -174,7 +174,7 @@ endif() # Find (and test) the SuperLUDIST libraries # --------------------------------------------------------------- -if(ENABLE_SUPERLUDIST) +if(SUNDIALS_ENABLE_SUPERLUDIST) include(SundialsSuperLUDIST) list(APPEND SUNDIALS_TPL_LIST "SUPERLUDIST") endif() @@ -183,7 +183,7 @@ endif() # Find (and test) the SUPERLUMT libraries # --------------------------------------------------------------- -if(ENABLE_SUPERLUMT) +if(SUNDIALS_ENABLE_SUPERLUMT) include(SundialsSuperLUMT) list(APPEND SUNDIALS_TPL_LIST "SUPERLUMT") endif() @@ -192,7 +192,7 @@ endif() # Find (and test) Trilinos # ------------------------------------------------------------- -if(ENABLE_TRILINOS) +if(SUNDIALS_ENABLE_TRILINOS) include(SundialsTrilinos) list(APPEND SUNDIALS_TPL_LIST "TRILINOS") endif() @@ -201,7 +201,7 @@ endif() # Find (and test) XBraid # ------------------------------------------------------------- -if(ENABLE_XBRAID) +if(SUNDIALS_ENABLE_XBRAID) include(SundialsXBRAID) list(APPEND SUNDIALS_TPL_LIST "XBRAID") endif() diff --git a/cmake/SundialsSetupTesting.cmake b/cmake/SundialsSetupTesting.cmake index d5d4dab51d..a03006fe99 100644 --- a/cmake/SundialsSetupTesting.cmake +++ b/cmake/SundialsSetupTesting.cmake @@ -24,7 +24,7 @@ include(CTest) # Check if the test runner is needed # if(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT OR (SUNDIALS_TEST_ENABLE_PROFILING - AND ENABLE_CALIPER)) + AND SUNDIALS_ENABLE_CALIPER)) set(SUNDIALS_TEST_USE_RUNNER TRUE) # Python is needed to use the test runner find_package(Python3 REQUIRED) @@ -74,7 +74,7 @@ endif() # # Print Caliper profiling settings # -if(SUNDIALS_TEST_ENABLE_PROFILING AND ENABLE_CALIPER) +if(SUNDIALS_TEST_ENABLE_PROFILING AND SUNDIALS_ENABLE_CALIPER) message(STATUS "Enabled test profiling with Caliper") if(NOT EXISTS ${SUNDIALS_TEST_CALIPER_OUTPUT_DIR}) file(MAKE_DIRECTORY ${SUNDIALS_TEST_CALIPER_OUTPUT_DIR}) @@ -183,7 +183,7 @@ endif() # # Create `make test_install` and `make test_install_all` # -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Directories for installation testing set(TEST_INSTALL_DIR ${PROJECT_BINARY_DIR}/Testing_Install) diff --git a/cmake/SundialsTPLOptions.cmake b/cmake/SundialsTPLOptions.cmake index e7e5a0554a..f0108dd834 100644 --- a/cmake/SundialsTPLOptions.cmake +++ b/cmake/SundialsTPLOptions.cmake @@ -20,70 +20,136 @@ # --------------------------------------------------------------- # Enable MPI support? # --------------------------------------------------------------- -sundials_option(ENABLE_MPI BOOL "Enable MPI support" OFF) + +sundials_option( + SUNDIALS_ENABLE_MPI + BOOL + "Enable MPI support" + OFF + DEPRECATED_NAMES + ENABLE_MPI + MPI_ENABLE) # --------------------------------------------------------------- # Enable OpenMP support? # --------------------------------------------------------------- -sundials_option(ENABLE_OPENMP BOOL "Enable OpenMP support" OFF) + +sundials_option( + SUNDIALS_ENABLE_OPENMP + BOOL + "Enable OpenMP support" + OFF + DEPRECATED_NAMES + ENABLE_OPENMP + OPENMP_ENABLE) # --------------------------------------------------------------- # Enable OpenMP target offloading support? # --------------------------------------------------------------- -sundials_option(ENABLE_OPENMP_DEVICE BOOL - "Enable OpenMP device offloading support" OFF) + +sundials_option( + SUNDIALS_ENABLE_OPENMP_DEVICE + BOOL + "Enable OpenMP device offloading support" + OFF + DEPRECATED_NAMES + ENABLE_OPENMP_DEVICE + OPENMP_DEVICE_ENABLE) # Advanced option to skip OpenMP device offloading support check. This is needed # for a specific compiler that doesn't correctly report its OpenMP spec date # (with CMake >= 3.9). -sundials_option(OPENMP_DEVICE_WORKS BOOL - "Skip the OpenMP device offloading support check" OFF ADVANCED) +sundials_option( + SUNDIALS_ENABLE_OPENMP_DEVICE_CHECKS + BOOL + "Enable OpenMP device offloading compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + OPENMP_DEVICE_WORKS + SKIP_OPENMP_DEVICE_CHECK + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable Pthread support? # --------------------------------------------------------------- -sundials_option(ENABLE_PTHREAD BOOL "Enable Pthreads support" OFF) + +sundials_option( + SUNDIALS_ENABLE_PTHREAD + BOOL + "Enable Pthreads support" + OFF + DEPRECATED_NAMES + ENABLE_PTHREAD + PTHREAD_ENABLE) # ------------------------------------------------------------- # Enable CUDA support? # ------------------------------------------------------------- -sundials_option(ENABLE_CUDA BOOL "Enable CUDA support" OFF) + +sundials_option( + SUNDIALS_ENABLE_CUDA + BOOL + "Enable CUDA support" + OFF + DEPRECATED_NAMES + ENABLE_CUDA + CUDA_ENABLE) # ------------------------------------------------------------- # Enable HIP support? # ------------------------------------------------------------- -sundials_option(ENABLE_HIP BOOL "Enable HIP support" OFF) + +sundials_option(SUNDIALS_ENABLE_HIP BOOL "Enable HIP support" OFF + DEPRECATED_NAMES ENABLE_HIP) # ------------------------------------------------------------- # Enable SYCL support? # ------------------------------------------------------------- -sundials_option(ENABLE_SYCL BOOL "Enable SYCL support" OFF) + +sundials_option(SUNDIALS_ENABLE_SYCL BOOL "Enable SYCL support" OFF + DEPRECATED_NAMES ENABLE_SYCL) sundials_option( SUNDIALS_SYCL_2020_UNSUPPORTED BOOL "Disable the use of some SYCL 2020 features in SUNDIALS libraries and examples" OFF - DEPENDS_ON ENABLE_SYCL + DEPENDS_ON SUNDIALS_ENABLE_SYCL ADVANCED) # --------------------------------------------------------------- # Enable LAPACK support? # --------------------------------------------------------------- -sundials_option(ENABLE_LAPACK BOOL "Enable Lapack support" OFF) + +sundials_option( + SUNDIALS_ENABLE_LAPACK + BOOL + "Enable Lapack support" + OFF + DEPRECATED + ENABLE_LAPACK + LAPACK_ENABLE) sundials_option(LAPACK_LIBRARIES STRING "Lapack and Blas libraries" "${LAPACK_LIBRARIES}") sundials_option( - LAPACK_WORKS BOOL - "Set to ON to force CMake to accept a given LAPACK configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_LAPACK_CHECKS + BOOL + "Enable LAPACK compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + LAPACK_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable Ginkgo support? # --------------------------------------------------------------- -sundials_option(ENABLE_GINKGO BOOL "Enable Ginkgo support" OFF) + +sundials_option(SUNDIALS_ENABLE_GINKGO BOOL "Enable Ginkgo support" OFF + DEPRECATED_NAMES ENABLE_GINKGO) sundials_option(Ginkgo_DIR PATH "Path to the root of a Ginkgo installation" "${Ginkgo_DIR}") @@ -93,17 +159,24 @@ sundials_option( STRING "Which Ginkgo backend(s) to build the SUNDIALS Ginkgo interfaces for (REF, OMP, CUDA, HIP, SYCL)" "REF;OMP" - DEPENDS_ON ENABLE_GINKGO) + DEPENDS_ON SUNDIALS_ENABLE_GINKGO) sundials_option( - GINKGO_WORKS BOOL - "Set to ON to force CMake to accept a given Ginkgo configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_GINKGO_CHECKS + BOOL + "Enable Ginkgo compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + GINKGO_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable MAGMA support? # --------------------------------------------------------------- -sundials_option(ENABLE_MAGMA BOOL "Enable MAGMA support" OFF) + +sundials_option(SUNDIALS_ENABLE_MAGMA BOOL "Enable MAGMA support" OFF + DEPRECATED_NAMES ENABLE_MAGMA) sundials_option(MAGMA_DIR PATH "Path to the root of a MAGMA installation" "${MAGMA_DIR}") @@ -113,24 +186,43 @@ sundials_option( "Which MAGMA backend to use under the SUNDIALS MAGMA interfaces (CUDA, HIP)" "CUDA" OPTIONS "CUDA;HIP" - DEPENDS_ON ENABLE_MAGMA) + DEPENDS_ON SUNDIALS_ENABLE_MAGMA) sundials_option( - MAGMA_WORKS BOOL - "Set to ON to force CMake to accept a given MAGMA configuration" OFF ADVANCED) + SUNDIALS_ENABLE_MAGMA_CHECKS + BOOL + "Enable MAGMA compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + MAGMA_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable SuperLU_DIST support? # --------------------------------------------------------------- -sundials_option(ENABLE_SUPERLUDIST BOOL "Enable SuperLU_DIST support" OFF) + +sundials_option( + SUNDIALS_ENABLE_SUPERLUDIST + BOOL + "Enable SuperLU_DIST support" + OFF + DEPRECATED_NAMES + ENABLE_SUPERLUDIST + SUPERLUDIST_ENABLE) sundials_option( SUPERLUDIST_DIR PATH "Path to the root of the SuperLU_DIST installation" "${SUPERLUDIST_DIR}") sundials_option( - SUPERLUDIST_INCLUDE_DIRS PATH "SuperLU_DIST include directories" - "${SUPERLUDIST_INCLUDE_DIRS}" ADVANCED) + SUPERLUDIST_INCLUDE_DIRS + PATH + "SuperLU_DIST include directories" + "${SUPERLUDIST_INCLUDE_DIRS}" + ADVANCED + DEPRECATED_NAMES + SUPERLUDIST_INCLUDE_DIR) sundials_option( SUPERLUDIST_LIBRARIES STRING @@ -142,14 +234,27 @@ sundials_option( "Enable SUNDIALS support for SuperLU_DIST OpenMP on-node parallelism" OFF) sundials_option( - SUPERLUDIST_WORKS BOOL - "Set to ON to force CMake to accept a given SuperLU_DIST configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_SUPERLUDIST_CHECKS + BOOL + "Enable SuperLU_DIST compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + SUPERLUDIST_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable SuperLU_MT support? # --------------------------------------------------------------- -sundials_option(ENABLE_SUPERLUMT BOOL "Enable SuperLU_MT support" OFF) + +sundials_option( + SUNDIALS_ENABLE_SUPERLUMT + BOOL + "Enable SuperLU_MT support" + OFF + DEPRECATED_NAMES + ENABLE_SUPERLUMT + SUPERLUMT_ENABLE) sundials_option(SUPERLUMT_INCLUDE_DIR PATH "SuperLU_MT include directory" "${SUPERLUMT_INCLUDE_DIR}") @@ -166,14 +271,27 @@ sundials_option(SUPERLUMT_THREAD_TYPE STRING "SuperLU_MT threading type: OPENMP or PTHREAD" "PTHREAD") sundials_option( - SUPERLUMT_WORKS BOOL - "Set to ON to force CMake to accept a given SUPERLUMT configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_SUPERLUMT_CHECKS + BOOL + "Enable SuperLU_MT compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + SUPERLUMT_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable KLU support? # --------------------------------------------------------------- -sundials_option(ENABLE_KLU BOOL "Enable KLU support" OFF) + +sundials_option( + SUNDIALS_ENABLE_KLU + BOOL + "Enable KLU support" + OFF + DEPRECATED_NAMES + ENABLE_KLU + KLU_ENABLE) sundials_option(KLU_INCLUDE_DIR PATH "KLU include directory" "${KLU_INCLUDE_DIR}") @@ -182,13 +300,27 @@ sundials_option(KLU_LIBRARY_DIR PATH "KLU library directory" "${KLU_LIBRARY_DIR}") sundials_option( - KLU_WORKS BOOL "Set to ON to force CMake to accept a given KLU configuration" - OFF ADVANCED) + SUNDIALS_ENABLE_KLU_CHECKS + BOOL + "Enable KLU compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + KLU_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable hypre support? # --------------------------------------------------------------- -sundials_option(ENABLE_HYPRE BOOL "Enable hypre support" OFF) + +sundials_option( + SUNDIALS_ENABLE_HYPRE + BOOL + "Enable hypre support" + OFF + DEPRECATED_NAMES + ENABLE_HYPRE + HYPRE_ENABLE) sundials_option(HYPRE_DIR PATH "Path to hypre installation" "${HYPRE_DIR}") @@ -199,14 +331,27 @@ sundials_option(HYPRE_LIBRARY_DIR PATH "HYPRE library directory" "${HYPRE_LIBRARY_DIR}") sundials_option( - HYPRE_WORKS BOOL - "Set to ON to force CMake to accept a given hypre configuration" OFF ADVANCED) + SUNDIALS_ENABLE_HYPRE_CHECKS + BOOL + "Enable hypre compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + HYPRE_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable PETSc support? # --------------------------------------------------------------- -sundials_option(ENABLE_PETSC BOOL "Enable PETSc support" OFF) +sundials_option( + SUNDIALS_ENABLE_PETSC + BOOL + "Enable PETSc support" + OFF + DEPRECATED_NAMES + ENABLE_PETSC + PETSC_ENABLE) sundials_option(PETSC_DIR PATH "Path to the root of a PETSc installation" "${PETSC_DIR}") @@ -224,13 +369,27 @@ sundials_option( ADVANCED) sundials_option( - PETSC_WORKS BOOL - "Set to ON to force CMake to accept a given PETSc configuration" OFF ADVANCED) + SUNDIALS_ENABLE_PETSC_CHECKS + BOOL + "Enable PETSc compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + PETSC_WORKS + NEGATE_DEPRECATED) # ------------------------------------------------------------- # Enable RAJA support? # ------------------------------------------------------------- -sundials_option(ENABLE_RAJA BOOL "Enable RAJA support" OFF) + +sundials_option( + SUNDIALS_ENABLE_RAJA + BOOL + "Enable RAJA support" + OFF + DEPRECATED_NAMES + ENABLE_RAJA + RAJA_ENABLE) sundials_option(RAJA_DIR PATH "Path to root of RAJA installation" "${RAJA_DIR}") @@ -239,21 +398,30 @@ sundials_option( "Which RAJA backend under the SUNDIALS RAJA interfaces (CUDA, HIP, SYCL)" "CUDA" OPTIONS "CUDA;HIP;SYCL" - DEPENDS_ON ENABLE_RAJA) + DEPENDS_ON SUNDIALS_ENABLE_RAJA) # --------------------------------------------------------------- # Enable Trilinos support? # --------------------------------------------------------------- -sundials_option(ENABLE_TRILINOS BOOL "Enable Trilinos support" OFF) + +sundials_option( + SUNDIALS_ENABLE_TRILINOS + BOOL + "Enable Trilinos support" + OFF + DEPRECATED_NAMES + ENABLE_TRILINOS + Trilinos_ENABLE) sundials_option(Trilinos_DIR PATH "Path to root of Trilinos installation" - "${Trilinos_DIR}" DEPENDS_ON ENABLE_TRILINOS) + "${Trilinos_DIR}") # --------------------------------------------------------------- # Enable XBraid support? # --------------------------------------------------------------- -sundials_option(ENABLE_XBRAID BOOL "Enable XBraid support" OFF) +sundials_option(SUNDIALS_ENABLE_XBRAID BOOL "Enable XBraid support" OFF + DEPRECATED_NAMES ENABLE_XBRAID) sundials_option(XBRAID_DIR PATH "Path to the root of an XBraid installation" "${XBRAID_DIR}") @@ -268,86 +436,127 @@ sundials_option( "${XBRAID_INCLUDES}" ADVANCED) sundials_option( - XBRAID_WORKS BOOL - "Set to ON to force CMake to accept a given XBraid configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_XBRAID_CHECKS + BOOL + "Enable XBraid compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + XBRAID_WORKS + NEGATE_DEPRECATED) # ------------------------------------------------------------- # Enable oneMKL support? # ------------------------------------------------------------- -sundials_option(ENABLE_ONEMKL BOOL "Enable oneMKL support" OFF) +sundials_option(SUNDIALS_ENABLE_ONEMKL BOOL "Enable oneMKL support" OFF + DEPRECATED_NAMES ENABLE_ONEMKL) sundials_option(ONEMKL_DIR PATH "Path to root of oneMKL installation" "${ONEMKL_DIR}") sundials_option( - ONEMKL_WORKS BOOL - "Set to ON to force CMake to accept a given oneMKL configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_ONEMKL_CHECKS + BOOL + "Enable oneMKL compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + ONEMKL_WORKS + NEGATE_DEPRECATED) sundials_option( SUNDIALS_ONEMKL_USE_GETRF_LOOP BOOL "Replace batched getrf call with loop over getrf" OFF - DEPENDS_ON ENABLE_ONEMKL + DEPENDS_ON SUNDIALS_ENABLE_ONEMKL ADVANCED) sundials_option( SUNDIALS_ONEMKL_USE_GETRS_LOOP BOOL "Replace batched getrs call with loop over getrs" OFF - DEPENDS_ON ENABLE_ONEMKL + DEPENDS_ON SUNDIALS_ENABLE_ONEMKL ADVANCED) # --------------------------------------------------------------- # Enable Caliper support? # --------------------------------------------------------------- -sundials_option(ENABLE_CALIPER BOOL "Enable CALIPER support" OFF - DEPENDS_ON SUNDIALS_BUILD_WITH_PROFILING) +sundials_option( + SUNDIALS_ENABLE_CALIPER BOOL "Enable CALIPER support" OFF + DEPENDS_ON SUNDIALS_ENABLE_PROFILING DEPRECATED_NAMES ENABLE_CALIPER) sundials_option(CALIPER_DIR PATH "Path to the root of an CALIPER installation" "${CALIPER_DIR}") sundials_option( - CALIPER_WORKS BOOL - "Set to ON to force CMake to accept a given CALIPER configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_CALIPER_CHECKS + BOOL + "Enable Caliper compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + CALIPER_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable Adiak support? # --------------------------------------------------------------- -sundials_option(ENABLE_ADIAK BOOL "Enable Adiak support" OFF - DEPENDS_ON SUNDIALS_BUILD_WITH_PROFILING) +sundials_option( + SUNDIALS_ENABLE_ADIAK BOOL "Enable Adiak support" OFF + DEPENDS_ON SUNDIALS_ENABLE_PROFILING DEPRECATED_NAMES ENABLE_ADIAK) sundials_option(adiak_DIR PATH "Path to the root of an Adiak installation" "${ADIAK_DIR}") +sundials_option( + SUNDIALS_ENABLE_ADIAK_CHECKS + BOOL + "Enable Adiak compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + adiak_WORKS + NEGATE_DEPRECATED) + # --------------------------------------------------------------- # Enable Kokkos support? # --------------------------------------------------------------- -sundials_option(ENABLE_KOKKOS BOOL "Enable Kokkos support" OFF) +sundials_option(SUNDIALS_ENABLE_KOKKOS BOOL "Enable Kokkos support" OFF + DEPRECATED_NAMES ENABLE_KOKKOS) sundials_option(Kokkos_DIR PATH "Path to the root of a Kokkos installation" "${Kokkos_DIR}") sundials_option( - KOKKOS_WORKS BOOL - "Set to ON to force CMake to accept a given Kokkos configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_KOKKOS_CHECKS + BOOL + "Enable Kokkos compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + KOKKOS_WORKS + NEGATE_DEPRECATED) # --------------------------------------------------------------- # Enable Kokkos Kernels support? # --------------------------------------------------------------- -sundials_option(ENABLE_KOKKOS_KERNELS BOOL "Enable Kokkos Kernels support" OFF) +sundials_option( + SUNDIALS_ENABLE_KOKKOS_KERNELS BOOL "Enable Kokkos Kernels support" OFF + DEPRECATED_NAMES ENABLE_KOKKOS_KERNELS) sundials_option( KokkosKernels_DIR PATH "Path to the root of a Kokkos Kernels installation" "${KokkosKernels_DIR}") sundials_option( - KOKKOS_KERNELS_WORKS BOOL - "Set to ON to force CMake to accept a given Kokkos configuration" OFF - ADVANCED) + SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS + BOOL + "Enable Kokkos Kernels compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + KOKKOS_KERNELS_WORKS + NEGATE_DEPRECATED) diff --git a/cmake/macros/SundialsAddBenchmark.cmake b/cmake/macros/SundialsAddBenchmark.cmake index fe26f3b914..540d599b40 100644 --- a/cmake/macros/SundialsAddBenchmark.cmake +++ b/cmake/macros/SundialsAddBenchmark.cmake @@ -72,7 +72,7 @@ function(sundials_add_benchmark NAME EXECUTABLE BASE_BENCHMARK_NAME) "--verbose" "--executablename=$" "--outputdir=${_output_dir}" "--nodiff") - if(ENABLE_CALIPER) + if(SUNDIALS_ENABLE_CALIPER) set(_caliper_dir "${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR}/${BASE_BENCHMARK_NAME}/${TARGET_NAME}" ) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index 00e22a5459..60a99ca691 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -204,11 +204,11 @@ macro(sundials_add_library target) target_link_libraries(${obj_target} ${_all_libs}) endif() - if(SUNDIALS_BUILD_WITH_PROFILING) - if(ENABLE_CALIPER) + if(SUNDIALS_ENABLE_PROFILING) + if(SUNDIALS_ENABLE_CALIPER) target_link_libraries(${obj_target} PUBLIC caliper) endif() - if(ENABLE_ADIAK) + if(SUNDIALS_ENABLE_ADIAK) target_link_libraries(${obj_target} PUBLIC adiak::adiak ${CMAKE_DL_LIBS}) endif() @@ -307,11 +307,11 @@ macro(sundials_add_library target) ${dealiased_sundials_add_library_LINK_LIBRARIES}) endif() - if(SUNDIALS_BUILD_WITH_PROFILING) - if(ENABLE_CALIPER) + if(SUNDIALS_ENABLE_PROFILING) + if(SUNDIALS_ENABLE_CALIPER) target_link_libraries(${_actual_target_name} PUBLIC caliper) endif() - if(ENABLE_ADIAK) + if(SUNDIALS_ENABLE_ADIAK) target_link_libraries(${_actual_target_name} PUBLIC adiak::adiak ${CMAKE_DL_LIBS}) endif() diff --git a/cmake/macros/SundialsAddNvectorBenchmark.cmake b/cmake/macros/SundialsAddNvectorBenchmark.cmake index 6f672fe6cc..6e27a224ed 100644 --- a/cmake/macros/SundialsAddNvectorBenchmark.cmake +++ b/cmake/macros/SundialsAddNvectorBenchmark.cmake @@ -38,7 +38,8 @@ function(sundials_add_nvector_benchmark NAME) target_link_libraries(${NAME} PRIVATE ${arg_SUNDIALS_TARGETS} ${arg_LINK_LIBRARIES} -lm) - install(TARGETS ${NAME} - DESTINATION "${BENCHMARKS_INSTALL_PATH}/${arg_INSTALL_SUBDIR}") + install( + TARGETS ${NAME} + DESTINATION "${SUNDIALS_BENCHMARKS_INSTALL_PATH}/${arg_INSTALL_SUBDIR}") endfunction(sundials_add_nvector_benchmark) diff --git a/cmake/macros/SundialsAddTest.cmake b/cmake/macros/SundialsAddTest.cmake index c200fcb98e..cb496ed311 100644 --- a/cmake/macros/SundialsAddTest.cmake +++ b/cmake/macros/SundialsAddTest.cmake @@ -200,7 +200,7 @@ function(SUNDIALS_ADD_TEST NAME EXECUTABLE) list(APPEND TEST_ARGS "--runargs=\"${_post_exe}\"") endif() - if(SUNDIALS_TEST_ENABLE_PROFILING AND ENABLE_CALIPER) + if(SUNDIALS_TEST_ENABLE_PROFILING AND SUNDIALS_ENABLE_CALIPER) list(APPEND TEST_ARGS "--profile") list(APPEND TEST_ARGS "--calidir=${SUNDIALS_TEST_CALIPER_OUTPUT_DIR}") endif() diff --git a/cmake/macros/SundialsAddTestInstall.cmake b/cmake/macros/SundialsAddTestInstall.cmake index 60d1d5a807..0b02a241bd 100644 --- a/cmake/macros/SundialsAddTestInstall.cmake +++ b/cmake/macros/SundialsAddTestInstall.cmake @@ -52,8 +52,9 @@ macro(SUNDIALS_ADD_TEST_INSTALL PACKAGE TESTDIR) COMMENT "Running ${PACKAGE} installation tests" WORKING_DIRECTORY ${TEST_INSTALL_DIR}/${PACKAGE}/${TESTDIR} VERBATIM - COMMAND ${CMAKE_COMMAND} ${EXAMPLES_INSTALL_PATH}/${PACKAGE}/${TESTDIR} > - cmake.out + COMMAND + ${CMAKE_COMMAND} ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${PACKAGE}/${TESTDIR} + > cmake.out COMMAND ${CMAKE_COMMAND} --build ${TEST_INSTALL_DIR}/${PACKAGE}/${TESTDIR} --target ${SUNDIALS_ADD_TEST_INSTALL_EXECUTABLE} > make.out COMMAND ${CMAKE_CTEST_COMMAND} -R @@ -79,8 +80,8 @@ macro(SUNDIALS_ADD_TEST_INSTALL PACKAGE TESTDIR) COMMENT "Running ${PACKAGE} installation tests" WORKING_DIRECTORY ${TEST_INSTALL_ALL_DIR}/${PACKAGE}/${TESTDIR} VERBATIM - COMMAND ${CMAKE_COMMAND} ${EXAMPLES_INSTALL_PATH}/${PACKAGE}/${TESTDIR} > - cmake.out + COMMAND ${CMAKE_COMMAND} + ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${PACKAGE}/${TESTDIR} > cmake.out COMMAND ${CMAKE_COMMAND} --build ${TEST_INSTALL_ALL_DIR}/${PACKAGE}/${TESTDIR} > make.out) # In the future add "COMMAND ${CMAKE_CTEST_COMMAND}" here to run ctest with diff --git a/cmake/macros/SundialsInstallExamples.cmake b/cmake/macros/SundialsInstallExamples.cmake index 1f1e01fe75..98ed2f55c7 100644 --- a/cmake/macros/SundialsInstallExamples.cmake +++ b/cmake/macros/SundialsInstallExamples.cmake @@ -33,8 +33,8 @@ # Adds an install target for examples in EXAMPLES_VAR that go with MODULE (e.g. # arkode, nvecserial). # -# The DESTINATION option is the path *within* EXAMPLES_INSTALL_PATH that the -# files should be installed under. +# The DESTINATION option is the path *within* SUNDIALS_EXAMPLES_INSTALL_PATH +# that the files should be installed under. # # The CMAKE_TEMPLATE option is the name of the examples/templates CMake template # to use (e.g. cmakelists_CXX_ex.in). @@ -88,7 +88,8 @@ macro(sundials_install_examples MODULE EXAMPLES_VAR) install( FILES ${file} DESTINATION - ${EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION}) + ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION} + ) endforeach() # Install the examples @@ -101,7 +102,8 @@ macro(sundials_install_examples MODULE EXAMPLES_VAR) install( FILES ${example} ${example_header} ${example_out} DESTINATION - ${EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION}) + ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION} + ) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -150,7 +152,8 @@ macro(sundials_install_examples MODULE EXAMPLES_VAR) FILES ${PROJECT_BINARY_DIR}/examples/${sundials_install_examples_DESTINATION}/CMakeLists.txt DESTINATION - ${EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION}) + ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION} + ) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -167,7 +170,7 @@ macro(sundials_install_examples MODULE EXAMPLES_VAR) FILES ${PROJECT_BINARY_DIR}/examples/${sundials_install_examples_DESTINATION}/Makefile_ex DESTINATION - ${EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION} + ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${sundials_install_examples_DESTINATION} RENAME Makefile) endif() diff --git a/cmake/macros/SundialsInstallExamplesGinkgo.cmake b/cmake/macros/SundialsInstallExamplesGinkgo.cmake index c30af0b16b..7e6525bfc9 100644 --- a/cmake/macros/SundialsInstallExamplesGinkgo.cmake +++ b/cmake/macros/SundialsInstallExamplesGinkgo.cmake @@ -31,8 +31,8 @@ # GPU_EXAMPLES_VAR, and CPU_GPU_EXAMPLES_VAR that go with MODULE (e.g. cvode, # sunlinsol). # -# The DESTINATION option is the path *within* EXAMPLES_INSTALL_PATH that the -# files should be installed under. +# The DESTINATION option is the path *within* SUNDIALS_EXAMPLES_INSTALL_PATH +# that the files should be installed under. # # The SUNDIALS_COMPONENTS option is a list of CMake targets in the SUNDIALS:: # namespace provided to find_package. Note this may be the same as or a superset @@ -81,7 +81,7 @@ macro(sundials_install_examples_ginkgo MODULE) # install files install(FILES ${example} ${example_header} ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/${arg_DESTINATION}) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${arg_DESTINATION}) endforeach() endforeach() @@ -89,7 +89,7 @@ macro(sundials_install_examples_ginkgo MODULE) # Install the extra files and dependencies if(arg_EXTRA_FILES OR arg_DEPENDENCIES) install(FILES ${arg_EXTRA_FILES} ${arg_DEPENDENCIES} - DESTINATION ${EXAMPLES_INSTALL_PATH}/${arg_DESTINATION}) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${arg_DESTINATION}) endif() # Prepare substitution variables for CMakeLists and/or Makefile templates @@ -127,7 +127,7 @@ macro(sundials_install_examples_ginkgo MODULE) # Install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/${arg_DESTINATION}/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/${arg_DESTINATION}) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/${arg_DESTINATION}) # Add test_install target sundials_add_test_install(${MODULE} ginkgo) diff --git a/cmake/macros/SundialsOption.cmake b/cmake/macros/SundialsOption.cmake index e5f0a2cd7b..5b06b668b3 100644 --- a/cmake/macros/SundialsOption.cmake +++ b/cmake/macros/SundialsOption.cmake @@ -15,42 +15,181 @@ # SUNDIALS Copyright End # --------------------------------------------------------------------------- -# ~~~ -# sundials_option( -# [DEPENDS_ON dependencies] -# [DEPNDS_ON_THROW_ERROR]) -# ~~~ -# -# Within CMake creates a cache variable and sets it to the value -# if is not yet defined and, if provided, all of its -# dependencies evaluate to true. Otherwise, is not created. -# may be any of the types valid for CMake's set command (FILEPATH, PATH, STRING, -# BOOL, INTERNAL). is a description of the . -# -# The DEPENDS_ON option can be used to provide variables which must evaluate to -# true for to be created. If the dependencies do not all evaluate to -# true and exists, then a warning is printed and is unset. -# -# The DEPENDS_ON_THROW_ERROR option will change the warning to be an error. -# -# The OPTIONS option can be used to provide a list of valid values. -# -# The ADVANCED option can be used to make an advanced CMake option. +#[=======================================================================[.rst: +SundialsOption +-------------- + +This module provides a command for setting SUNDIALS cache variables +(configuration options). + +Load this module in with: + +.. code-block:: cmake + + include(SundialsOption) + +Commands +^^^^^^^^ + +This module provides the following command: + +.. cmake:command:: sundials_option + + Set a SUNDIALS cache variable (configuration option) to a given value. + + .. code-block:: cmake + + sundials_option( + [ADVANCED] + [OPTIONS options] + [DEPENDS_ON dependencies] + [DEPENDS_ON_THROW_ERROR] + [DEPRECATED_NAMES names] + [NEGATE_DEPRECATED]) + + Wraps the CMake :cmake:command:`set() ` command to set the + given cache variable. + + The arguments are: + + ```` + The name of a variable that stores the option value. + + ```` + The type of the cache entry. + + ```` + Text providing a quick summary of the option for CMake GUIs. + + ```` + The default value for the cache variable. + + * If the cache entry does not exist prior to the call, then it will be set + to the default value. -macro(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) + The options are: + + ``ADVANCED`` + Mark the cache variable as advanced. + + ``OPTIONS ...`` + A list of valid values for the cache variable. + + * If a user set the variable to a value not in the list of options, the + configuration is halted and an error message is printed. + + ``DEPENDS_ON ...`` + A list of variables which must evaluate to true for the cache variable to + be set. + + * If any of the dependencies evaluate to false, then the cache variable will + be unset and a warning message is printed. + + ``DEPENDS_ON_THROW_ERROR`` + Throw an error if the option dependencies are not met. + + ``DEPRECATED_NAMES ...`` + A list of deprecated cache variable names for the cache variable. + + * If the cache variable is already defined and any of the deprecated + cache variables are also defined, the deprecated variables are + ignored and a warning message is printed. + + * If the cache variable is not defined and a deprecated cache variable is + defined, the value of the deprecated variable is copied to the cache + variable and a warning message is printed. + + * If multiple deprecated cache variable names are provided and more than + one of them is defined, an error is printed if the deprecated variables + do not all have the same value. + + * If ``SUNDIALS_ENABLE_UNSET_DEPRECATED`` is true, any deprecated variables + will be unset after checking the value for the cases above. + + ``NEGATE_DEPRECATED`` + Negate the value of deprecated boolean cache variables when setting a cache + variable that is not already defined. +#]=======================================================================] + +function(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) # macro options and keyword inputs followed by multiple values - set(options DEPENDS_ON_THROW_ERROR ADVANCED) - set(multiValueArgs OPTIONS DEPENDS_ON) + set(options DEPENDS_ON_THROW_ERROR ADVANCED NEGATE_DEPRECATED) + set(multiValueArgs OPTIONS DEPENDS_ON DEPRECATED_NAMES) + + # parse inputs and create variables arg_ + cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" + ${ARGN}) - # parse inputs and create variables sundials_option_ - cmake_parse_arguments(sundials_option "${options}" "${oneValueArgs}" - "${multiValueArgs}" ${ARGN}) + # check for deprecated options + if(arg_DEPRECATED_NAMES) + unset(_save_name) + foreach(_deprecated_name ${arg_DEPRECATED_NAMES}) + if(DEFINED ${_deprecated_name}) + message( + WARNING + "The option ${_deprecated_name} is deprecated. Use ${NAME} instead." + ) + if(NOT DEFINED _save_name) + # save name and value separately in case unset below + set(_save_name ${_deprecated_name}) + set(_save_value ${${_deprecated_name}}) + else() + if(TYPE STREQUAL BOOL) + # Check if boolean values match + if(NOT (${_save_value} AND ${${_deprecated_name}}) + AND (${_save_value} OR ${${_deprecated_name}})) + message( + FATAL_ERROR + "Inconsistent deprecated options: ${_save_name} = ${_save_value} and ${_deprecated_name} = ${${_deprecated_name}}." + ) + endif() + else() + # Check if filepath/string/path match + if(NOT (${_save_value} STREQUAL ${${_deprecated_name}})) + message( + FATAL_ERROR + "Inconsistent deprecated options: ${_save_name} = ${_save_value} and ${_deprecated_name} = ${${_deprecated_name}}." + ) + endif() + endif() + message(WARNING "Multiple deprecated options for ${NAME} provided.") + endif() + if(SUNDIALS_ENABLE_UNSET_DEPRECATED) + unset(${_deprecated_name} CACHE) + endif() + endif() + endforeach() + if(DEFINED _save_name) + if(DEFINED ${NAME}) + message( + WARNING + "Both ${NAME} and ${_save_name} (deprecated) are defined. Ignoring " + "${_save_name}.") + else() + if((TYPE STREQUAL BOOL) AND arg_NEGATE_DEPRECATED) + if(${_save_value}) + set(${NAME} + FALSE + CACHE ${TYPE} ${DOCSTR}) + else() + set(${NAME} + TRUE + CACHE ${TYPE} ${DOCSTR}) + endif() + else() + set(${NAME} + "${_save_value}" + CACHE ${TYPE} ${DOCSTR}) + endif() + endif() + endif() + endif() # check if dependencies for this option have been met set(all_depends_on_dependencies_met TRUE) - if(sundials_option_DEPENDS_ON) - foreach(_dependency ${sundials_option_DEPENDS_ON}) + if(arg_DEPENDS_ON) + foreach(_dependency ${arg_DEPENDS_ON}) if(NOT ${_dependency}) set(all_depends_on_dependencies_met FALSE) list(APPEND depends_on_dependencies_not_met "${_dependency},") @@ -67,11 +206,11 @@ macro(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) else() set(${NAME} "${${NAME}}" - CACHE ${TYPE} ${DOCSTR}) + CACHE ${TYPE} ${DOCSTR} FORCE) endif() # make the option advanced if necessary - if(sundials_option_ADVANCED) + if(arg_ADVANCED) mark_as_advanced(FORCE ${NAME}) endif() @@ -87,7 +226,7 @@ macro(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) "dependencies (${depends_on_dependencies_not_met}) evaluate to TRUE. " "Unsetting ${NAME}.") unset(${NAME} CACHE) - if(sundials_option_DEPENDS_ON_THROW_ERROR) + if(arg_DEPENDS_ON_THROW_ERROR) message(FATAL_ERROR "${_warn_msg_string}") else() message(WARNING "${_warn_msg_string}") @@ -97,10 +236,10 @@ macro(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) endif() # check for valid option choices - if((DEFINED ${NAME}) AND sundials_option_OPTIONS) + if((DEFINED ${NAME}) AND arg_OPTIONS) foreach(_option ${${NAME}}) - if(NOT (${_option} IN_LIST sundials_option_OPTIONS)) - list(JOIN sundials_option_OPTIONS ", " _options_msg) + if(NOT (${_option} IN_LIST arg_OPTIONS)) + list(JOIN arg_OPTIONS ", " _options_msg) message(FATAL_ERROR "Value of ${NAME} must be one of ${_options_msg}") endif() endforeach() @@ -109,7 +248,7 @@ macro(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) CACHE ${NAME} PROPERTY TYPE) if(is_in_cache) - set_property(CACHE ${NAME} PROPERTY STRINGS ${sundials_option_OPTIONS}) + set_property(CACHE ${NAME} PROPERTY STRINGS ${arg_OPTIONS}) endif() unset(is_in_cache) endif() @@ -117,4 +256,4 @@ macro(sundials_option NAME TYPE DOCSTR DEFAULT_VALUE) unset(all_depends_on_dependencies_met) unset(depends_on_dependencies_not_met) -endmacro() +endfunction() diff --git a/cmake/tpl/SundialsAdiak.cmake b/cmake/tpl/SundialsAdiak.cmake index d816720724..024641fae0 100644 --- a/cmake/tpl/SundialsAdiak.cmake +++ b/cmake/tpl/SundialsAdiak.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup ADIAK correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup ADIAK. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_ADIAK_INCLUDED) - set(SUNDIALS_ADIAK_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -51,16 +39,16 @@ message(STATUS "ADIAK_INCLUDE_DIR: ${adiak_INCLUDE_DIR}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(adiak_FOUND AND (NOT adiak_WORKS)) - # Do any checks which don't require compilation first. +if(SUNDIALS_ENABLE_ADIAK_CHECKS) + + message(CHECK_START "Testing Adiak") # Create the adiak_TEST directory - set(adiak_TEST_DIR ${PROJECT_BINARY_DIR}/adiak_TEST) - file(MAKE_DIRECTORY ${adiak_TEST_DIR}) + set(TEST_DIR ${PROJECT_BINARY_DIR}/ADIAK_TEST) # Create a C source file file( - WRITE ${adiak_TEST_DIR}/ltest.c + WRITE ${TEST_DIR}/test.c "\#include \n" "int main(void)\n" "{\n" @@ -69,30 +57,25 @@ if(adiak_FOUND AND (NOT adiak_WORKS)) " return 0;\n" "}\n") - # To ensure we do not use stuff from the previous attempts, we must remove the - # CMakeFiles directory. - file(REMOVE_RECURSE ${adiak_TEST_DIR}/CMakeFiles) - - # Attempt to build and link the "ltest" executable + # Attempt to build and link the test executable, pass --debug-trycompile to + # the cmake command to save build files for debugging try_compile( - COMPILE_OK ${adiak_TEST_DIR} - ${adiak_TEST_DIR}/ltest.c - OUTPUT_VARIABLE COMPILE_OUTPUT - LINK_LIBRARIES adiak::adiak ${CMAKE_DL_LIBS}) + COMPILE_OK ${TEST_DIR} + ${TEST_DIR}/test.c + LINK_LIBRARIES adiak::adiak ${CMAKE_DL_LIBS} + OUTPUT_VARIABLE COMPILE_OUTPUT) - # Process test result + # Check the result if(COMPILE_OK) - message(STATUS "Checking if adiak works with SUNDIALS... OK") - set(adiak_WORKS - TRUE - CACHE BOOL "adiak works with SUNDIALS as configured" FORCE) + message(CHECK_PASS "success") else() - message(STATUS "Checking if adiak works with SUNDIALS... FAILED") - message(STATUS "Check output: ") - message("${COMPILE_OUTPUT}") - message(FATAL_ERROR "SUNDIALS interface to adiak is not functional.") + message(CHECK_FAIL "failed") + file(WRITE ${TEST_DIR}/compile.out "${COMPILE_OUTPUT}") + message( + FATAL_ERROR + "Could not compile Adiak test. Check output in ${TEST_DIR}/compile.out") endif() -elseif(adiak_FOUND AND adiak_WORKS) - message(STATUS "Skipped adiak tests, assuming adiak works with SUNDIALS.") +else() + message(STATUS "Skipped Adiak checks.") endif() diff --git a/cmake/tpl/SundialsCaliper.cmake b/cmake/tpl/SundialsCaliper.cmake index a5f131b315..2aa581ec0c 100644 --- a/cmake/tpl/SundialsCaliper.cmake +++ b/cmake/tpl/SundialsCaliper.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup CALIPER correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup CALIPER. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_CALIPER_INCLUDED) - set(SUNDIALS_CALIPER_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -49,15 +37,15 @@ find_package(CALIPER PATHS "${CALIPER_DIR}" REQUIRED) # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(CALIPER_FOUND AND (NOT CALIPER_WORKS)) - # Do any checks which don't require compilation first. +if(SUNDIALS_ENABLE_CALIPER_CHECKS) - # Create the CALIPER_TEST directory - set(CALIPER_TEST_DIR ${PROJECT_BINARY_DIR}/CALIPER_TEST) - file(MAKE_DIRECTORY ${CALIPER_TEST_DIR}) + message(CHECK_START "Testing Caliper") + + # Create the test directory + set(TEST_DIR ${PROJECT_BINARY_DIR}/CALIPER_TEST) # If C++ is enabled, we build the example as a C++ code as a workaround for - # what appears to be a bug in try_compile. If we dont do this, then + # what appears to be a bug in try_compile. If we don't do this, then # try_compile throws an error "No known features for CXX compiler". if(CXX_FOUND) set(_ext cpp) @@ -65,9 +53,9 @@ if(CALIPER_FOUND AND (NOT CALIPER_WORKS)) set(_ext c) endif() - # Create a C source file + # Create a source test file file( - WRITE ${CALIPER_TEST_DIR}/ltest.${_ext} + WRITE ${TEST_DIR}/test.${_ext} "\#include \n" "int main(void)\n" "{\n" @@ -76,26 +64,26 @@ if(CALIPER_FOUND AND (NOT CALIPER_WORKS)) " return 0;\n" "}\n") - # Attempt to build and link executable with caliper + # Attempt to build and link the test executable, pass --debug-trycompile to + # the cmake command to save build files for debugging try_compile( - COMPILE_OK ${CALIPER_TEST_DIR} - ${CALIPER_TEST_DIR}/ltest.${_ext} + COMPILE_OK ${TEST_DIR} + ${TEST_DIR}/test.${_ext} LINK_LIBRARIES caliper OUTPUT_VARIABLE COMPILE_OUTPUT) - # Process test result + # Check the result if(COMPILE_OK) - message(STATUS "Checking if CALIPER works with SUNDIALS... OK") - set(CALIPER_WORKS - TRUE - CACHE BOOL "CALIPER works with SUNDIALS as configured" FORCE) + message(CHECK_PASS "success") else() - message(STATUS "Checking if CALIPER works with SUNDIALS... FAILED") - message(STATUS "Check output: ") - message("${COMPILE_OUTPUT}") - message(FATAL_ERROR "SUNDIALS interface to CALIPER is not functional.") + message(CHECK_FAIL "failed") + file(WRITE ${TEST_DIR}/compile.out "${COMPILE_OUTPUT}") + message( + FATAL_ERROR + "Could not compile Caliper test. Check output in ${TEST_DIR}/compile.out" + ) endif() -elseif(CALIPER_FOUND AND CALIPER_WORKS) - message(STATUS "Skipped CALIPER tests, assuming CALIPER works with SUNDIALS.") +else() + message(STATUS "Skipped Caliper checks.") endif() diff --git a/cmake/tpl/SundialsGinkgo.cmake b/cmake/tpl/SundialsGinkgo.cmake index a5996c7fda..8ee5df83bd 100644 --- a/cmake/tpl/SundialsGinkgo.cmake +++ b/cmake/tpl/SundialsGinkgo.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup GINKGO correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup GINKGO. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_GINKGO_INCLUDED) - set(SUNDIALS_GINKGO_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -99,45 +87,51 @@ endif() # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(Ginkgo_FOUND AND (NOT GINKGO_WORKS)) +if(SUNDIALS_ENABLE_GINKGO_CHECKS) + + message(CHECK_START "Testing Ginkgo") + if(SUNDIALS_PRECISION MATCHES "extended|EXTENDED") + message(CHECK_FAIL "failed") message( FATAL_ERROR "SUNDIALS GINKGO interface is not compatible with extended precision") endif() - if(SUNDIALS_GINKGO_BACKENDS MATCHES "CUDA" AND NOT ENABLE_CUDA) + if(SUNDIALS_GINKGO_BACKENDS MATCHES "CUDA" AND NOT SUNDIALS_ENABLE_CUDA) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SUNDIALS_GINKGO_BACKENDS includes CUDA but CUDA is not enabled. Set ENABLE_CUDA=ON or change the backend." + "SUNDIALS_GINKGO_BACKENDS includes CUDA but CUDA is not enabled. Set SUNDIALS_ENABLE_CUDA=ON or change the backend." ) endif() - if(SUNDIALS_GINKGO_BACKENDS MATCHES "HIP" AND NOT ENABLE_HIP) + if(SUNDIALS_GINKGO_BACKENDS MATCHES "HIP" AND NOT SUNDIALS_ENABLE_HIP) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SUNDIALS_GINKGO_BACKENDS includes HIP but HIP is not enabled. Set ENABLE_HIP=ON or change the backend." + "SUNDIALS_GINKGO_BACKENDS includes HIP but HIP is not enabled. Set SUNDIALS_ENABLE_HIP=ON or change the backend." ) endif() - if(SUNDIALS_GINKGO_BACKENDS MATCHES "SYCL" AND NOT ENABLE_SYCL) + if(SUNDIALS_GINKGO_BACKENDS MATCHES "SYCL" AND NOT SUNDIALS_ENABLE_SYCL) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SUNDIALS_GINKGO_BACKENDS includes SYCL but SYCL is not enabled. Set ENABLE_SYCL=ON or change the backend." + "SUNDIALS_GINKGO_BACKENDS includes SYCL but SYCL is not enabled. Set SUNDIALS_ENABLE_SYCL=ON or change the backend." ) endif() - if(SUNDIALS_GINKGO_BACKENDS MATCHES "OMP" AND NOT ENABLE_OPENMP) + if(SUNDIALS_GINKGO_BACKENDS MATCHES "OMP" AND NOT SUNDIALS_ENABLE_OPENMP) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SUNDIALS_GINKGO_BACKENDS includes OMP but OpenMP is not enabled. Set ENABLE_OPENMP=ON or change the backend." + "SUNDIALS_GINKGO_BACKENDS includes OMP but OpenMP is not enabled. Set SUNDIALS_ENABLE_OPENMP=ON or change the backend." ) endif() - message(STATUS "Checking if GINKGO works... OK") - set(GINKGO_WORKS - TRUE - CACHE BOOL "GINKGO works with SUNDIALS as configured" FORCE) -elseif(Ginkgo_FOUND AND GINKGO_WORKS) - message(STATUS "Skipped GINKGO tests, assuming GINKGO works with SUNDIALS.") + message(CHECK_PASS "success") + +else() + message(STATUS "Skipped Ginkgo checks.") endif() diff --git a/cmake/tpl/SundialsHypre.cmake b/cmake/tpl/SundialsHypre.cmake index a33b956c3b..a73ad520a5 100644 --- a/cmake/tpl/SundialsHypre.cmake +++ b/cmake/tpl/SundialsHypre.cmake @@ -14,35 +14,24 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup HYPRE correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup HYPRE. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_HYPRE_INCLUDED) - set(SUNDIALS_HYPRE_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible # ----------------------------------------------------------------------------- # Using hypre requires building with MPI enabled -if(NOT ENABLE_MPI) +if(NOT SUNDIALS_ENABLE_MPI) message( - FATAL_ERROR "MPI is required for hypre support. Set ENABLE_MPI to ON.") + FATAL_ERROR + "MPI is required for hypre support. Set SUNDIALS_ENABLE_MPI to ON.") endif() # ----------------------------------------------------------------------------- @@ -58,34 +47,16 @@ message(STATUS "HYPRE_INCLUDE_DIR: ${HYPRE_INCLUDE_DIR}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(HYPRE_FOUND AND (NOT HYPRE_WORKS)) - # Do any checks which don't require compilation first. +if(SUNDIALS_ENABLE_HYPRE_CHECKS) - # Create the HYPRE_TEST directory - set(HYPRE_TEST_DIR ${PROJECT_BINARY_DIR}/HYPRE_TEST) - file(MAKE_DIRECTORY ${HYPRE_TEST_DIR}) + message(CHECK_START "Testing hypre") - # Create a CMakeLists.txt file - file( - WRITE ${HYPRE_TEST_DIR}/CMakeLists.txt - "CMAKE_MINIMUM_REQUIRED(VERSION ${CMAKE_VERSION})\n" - "PROJECT(ltest C)\n" - "SET(CMAKE_VERBOSE_MAKEFILE ON)\n" - "SET(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n" - "SET(CMAKE_C_COMPILER ${MPI_C_COMPILER})\n" - "SET(CMAKE_C_STANDARD \"${CMAKE_C_STANDARD}\")\n" - "SET(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n" - "SET(CMAKE_C_FLAGS_RELEASE \"${CMAKE_C_FLAGS_RELEASE}\")\n" - "SET(CMAKE_C_FLAGS_DEBUG \"${CMAKE_C_FLAGS_DEBUG}\")\n" - "SET(CMAKE_C_FLAGS_RELWITHDEBUGINFO \"${CMAKE_C_FLAGS_RELWITHDEBUGINFO}\")\n" - "SET(CMAKE_C_FLAGS_MINSIZE \"${CMAKE_C_FLAGS_MINSIZE}\")\n" - "SET(CMAKE_EXE_LINKER_FLAGS \"${LINK_MATH_LIB}\")\n" - "INCLUDE_DIRECTORIES(${HYPRE_INCLUDE_DIR})\n" - "ADD_EXECUTABLE(ltest ltest.c)\n" - "TARGET_LINK_LIBRARIES(ltest ${HYPRE_LIBRARIES})\n") + # Create the test directory + set(TEST_DIR ${PROJECT_BINARY_DIR}/HYPRE_TEST) + # Create a C source file file( - WRITE ${HYPRE_TEST_DIR}/ltest.c + WRITE ${TEST_DIR}/test.c "\#include \"HYPRE_parcsr_ls.h\"\n" "int main(void) {\n" "HYPRE_ParVector par_b;\n" @@ -96,32 +67,25 @@ if(HYPRE_FOUND AND (NOT HYPRE_WORKS)) "else return(0);\n" "}\n") - # To ensure we do not use stuff from the previous attempts, we must remove the - # CMakeFiles directory. - file(REMOVE_RECURSE ${HYPRE_TEST_DIR}/CMakeFiles) - - # Attempt to build and link the "ltest" executable + # Attempt to build and link the test executable, pass --debug-trycompile to + # the cmake command to save build files for debugging try_compile( - COMPILE_OK ${HYPRE_TEST_DIR} - ${HYPRE_TEST_DIR} ltest + COMPILE_OK ${TEST_DIR} + ${TEST_DIR}/test.c + LINK_LIBRARIES SUNDIALS::HYPRE MPI::MPI_C OUTPUT_VARIABLE COMPILE_OUTPUT) # Process test result if(COMPILE_OK) - message(STATUS "Checking if HYPRE works... OK") - set(HYPRE_WORKS - TRUE - CACHE BOOL "HYPRE works with SUNDIALS as configured" FORCE) + message(CHECK_PASS "success") else() - message(STATUS "Checking if HYPRE works... FAILED") - message(STATUS "Check output: ") - message("${COMPILE_OUTPUT}") - message(FATAL_ERROR "SUNDIALS interface to HYPRE is not functional.") + message(CHECK_FAIL "failed") + file(WRITE ${TEST_DIR}/compile.out "${COMPILE_OUTPUT}") + message( + FATAL_ERROR + "Could not compile hypre test. Check output in ${TEST_DIR}/compile.out") endif() -elseif(HYPRE_FOUND AND HYPRE_WORKS) - message( - STATUS - "Skipped HYPRE tests, assuming HYPRE works with SUNDIALS. Set HYPRE_WORKS=FALSE to (re)run compatibility test." - ) +else() + message(STATUS "Skipped hypre tests.") endif() diff --git a/cmake/tpl/SundialsKLU.cmake b/cmake/tpl/SundialsKLU.cmake index ba8e1eb985..b7abfe26b9 100644 --- a/cmake/tpl/SundialsKLU.cmake +++ b/cmake/tpl/SundialsKLU.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup KLU correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup KLU. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_KLU_INCLUDED) - set(SUNDIALS_KLU_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -58,7 +46,10 @@ message(STATUS "KLU_INCLUDE_DIR: ${KLU_INCLUDE_DIR}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(KLU_FOUND AND (NOT KLU_WORKS)) +if(SUNDIALS_ENABLE_KLU_CHECKS) + + message(CHECK_START "Testing KLU") + # Do any checks which don't require compilation first. if(SUNDIALS_INDEX_SIZE MATCHES "64") @@ -73,6 +64,7 @@ if(KLU_FOUND AND (NOT KLU_WORKS)) set(CMAKE_REQUIRED_INCLUDES ${save_CMAKE_REQUIRED_INCLUDES}) message(STATUS "Size of SuiteSparse_long is ${SIZEOF_SUITESPARSE_LONG}") if(NOT SIZEOF_SUITESPARSE_LONG EQUAL "8") + message(CHECK_FAIL "failed") message( FATAL_ERROR "Size of 'sunindextype' is 8 but size of 'SuiteSparse_long' is ${SIZEOF_SUITESPARSE_LONG}. KLU cannot be used." @@ -80,59 +72,33 @@ if(KLU_FOUND AND (NOT KLU_WORKS)) endif() endif() - # Create the KLU_TEST directory - set(KLU_TEST_DIR ${PROJECT_BINARY_DIR}/KLU_TEST) - file(MAKE_DIRECTORY ${KLU_TEST_DIR}) - - # Create a CMakeLists.txt file - file( - WRITE ${KLU_TEST_DIR}/CMakeLists.txt - "CMAKE_MINIMUM_REQUIRED(VERSION ${CMAKE_VERSION})\n" - "PROJECT(ltest C)\n" - "SET(CMAKE_VERBOSE_MAKEFILE ON)\n" - "SET(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n" - "SET(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")\n" - "SET(CMAKE_C_STANDARD \"${CMAKE_C_STANDARD}\")\n" - "SET(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n" - "SET(CMAKE_C_FLAGS_RELEASE \"${CMAKE_C_FLAGS_RELEASE}\")\n" - "SET(CMAKE_C_FLAGS_DEBUG \"${CMAKE_C_FLAGS_DEBUG}\")\n" - "SET(CMAKE_C_FLAGS_RELWITHDEBUGINFO \"${CMAKE_C_FLAGS_RELWITHDEBUGINFO}\")\n" - "SET(CMAKE_C_FLAGS_MINSIZE \"${CMAKE_C_FLAGS_MINSIZE}\")\n" - "INCLUDE_DIRECTORIES(${KLU_INCLUDE_DIR})\n" - "ADD_EXECUTABLE(ltest ltest.c)\n" - "TARGET_LINK_LIBRARIES(ltest ${KLU_LIBRARIES})\n") + # Create the test directory + set(TEST_DIR ${PROJECT_BINARY_DIR}/KLU_TEST) # Create a C source file which calls a KLU function - file(WRITE ${KLU_TEST_DIR}/ltest.c + file(WRITE ${TEST_DIR}/test.c "\#include \"klu.h\"\n" "int main(void) {\n" "klu_common Common;\n" - "klu_defaults (&Common);\n" "return(0);\n" "}\n") - - # To ensure we do not use stuff from the previous attempts, we must remove the - # CMakeFiles directory. - file(REMOVE_RECURSE ${KLU_TEST_DIR}/CMakeFiles) + "klu_defaults (&Common);\n" "return 0;\n" "}\n") - # Attempt to build and link the "ltest" executable + # Attempt to build and link the test executable, pass --debug-trycompile to + # the cmake command to save build files for debugging try_compile( - COMPILE_OK ${KLU_TEST_DIR} - ${KLU_TEST_DIR} ltest + COMPILE_OK ${TEST_DIR} + ${TEST_DIR}/test.c + LINK_LIBRARIES SUNDIALS::KLU OUTPUT_VARIABLE COMPILE_OUTPUT) # Process test result if(COMPILE_OK) - message(STATUS "Checking if KLU works... OK") - set(KLU_WORKS - TRUE - CACHE BOOL "KLU works with SUNDIALS as configured" FORCE) + message(CHECK_PASS "success") else() - message(STATUS "Checking if KLU works... FAILED") - message(STATUS "Check output: ") - message("${COMPILE_OUTPUT}") - message(FATAL_ERROR "SUNDIALS interface to KLU is not functional.") + message(CHECK_FAIL "failed") + file(WRITE ${TEST_DIR}/compile.out "${COMPILE_OUTPUT}") + message( + FATAL_ERROR + "Could not compile KLU test. Check output in ${TEST_DIR}/compile.out") endif() -elseif(KLU_FOUND AND KLU_WORKS) - message( - STATUS - "Skipped KLU tests, assuming KLU works with SUNDIALS. Set KLU_WORKS=FALSE to (re)run compatibility test." - ) +else() + message(STATUS "Skipped KLU checks.") endif() diff --git a/cmake/tpl/SundialsKokkos.cmake b/cmake/tpl/SundialsKokkos.cmake index f2fa03e5f0..4ab7500ef7 100644 --- a/cmake/tpl/SundialsKokkos.cmake +++ b/cmake/tpl/SundialsKokkos.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup Kokkos correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup Kokkos. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_KOKKOS_INCLUDED) - set(SUNDIALS_KOKKOS_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -42,7 +30,7 @@ endif() # ----------------------------------------------------------------------------- # Section 3: Find the TPL # ----------------------------------------------------------------------------- -find_package(Kokkos REQUIRED HINTS "${Kokkos_DIR}" NO_DEFAULT_PATH) +find_package(Kokkos REQUIRED HINTS "${Kokkos_DIR}") # We should be able to use Kokkos_DEVICES directly but it seems to get removed # or unset in some CMake versions @@ -56,11 +44,9 @@ message(STATUS "Kokkos VERSION: ${Kokkos_VERSION}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(Kokkos_FOUND AND (NOT KOKKOS_WORKS)) - message(STATUS "Checking if Kokkos works... OK") - set(KOKKOS_WORKS - TRUE - CACHE BOOL "Kokkos works with SUNDIALS as configured" FORCE) -elseif(Kokkos_FOUND AND KOKKOS_WORKS) - message(STATUS "Skipped Kokkos tests, assuming Kokkos works with SUNDIALS.") +if(SUNDIALS_ENABLE_KOKKOS_CHECKS) + message(CHECK_START "Testing Kokkos") + message(CHECK_PASS "success") +else() + message(STATUS "Skipped Kokkos checks.") endif() diff --git a/cmake/tpl/SundialsKokkosKernels.cmake b/cmake/tpl/SundialsKokkosKernels.cmake index 62e7b1263f..9c12714a64 100644 --- a/cmake/tpl/SundialsKokkosKernels.cmake +++ b/cmake/tpl/SundialsKokkosKernels.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup Kokkos correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup Kokkos Kernels. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_KOKKOS_INCLUDED) - set(SUNDIALS_KOKKOS_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -42,8 +30,7 @@ endif() # ----------------------------------------------------------------------------- # Section 3: Find the TPL # ----------------------------------------------------------------------------- -find_package(KokkosKernels REQUIRED HINTS "${KokkosKernels_DIR}" - NO_DEFAULT_PATH) +find_package(KokkosKernels REQUIRED HINTS "${KokkosKernels_DIR}") message(STATUS "Kokkos Kernels VERSION: ${KokkosKernels_VERSION}") @@ -51,14 +38,9 @@ message(STATUS "Kokkos Kernels VERSION: ${KokkosKernels_VERSION}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(KokkosKernels_FOUND AND (NOT KOKKOS_KERNELS_WORKS)) - message(STATUS "Checking if Kokkos Kernels works... OK") - set(KOKKOS_KERNELS_WORKS - TRUE - CACHE BOOL "Kokkos Kernels works with SUNDIALS as configured" FORCE) -elseif(KokkosKernels_FOUND AND KOKKOS_WORKS) - message( - STATUS - "Skipped Kokkos Kernels tests, assuming Kokkos Kernels works with SUNDIALS." - ) +if(SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS) + message(CHECK_START "Testing Kokkos Kernels") + message(CHECK_PASS "success") +else() + message(STATUS "Skipped Kokkos Kernels checks.") endif() diff --git a/cmake/tpl/SundialsLapack.cmake b/cmake/tpl/SundialsLapack.cmake index 1c8a3aa7da..3840b547d5 100644 --- a/cmake/tpl/SundialsLapack.cmake +++ b/cmake/tpl/SundialsLapack.cmake @@ -14,15 +14,7 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup LAPACK/BLAS correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# _WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup LAPACK. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- @@ -36,7 +28,7 @@ include_guard(GLOBAL) # ----------------------------------------------------------------------------- # LAPACK does not support extended precision -if(ENABLE_LAPACK AND SUNDIALS_PRECISION MATCHES "EXTENDED") +if(SUNDIALS_ENABLE_LAPACK AND SUNDIALS_PRECISION MATCHES "EXTENDED") message( FATAL_ERROR "LAPACK is not compatible with ${SUNDIALS_PRECISION} precision") endif() @@ -294,7 +286,7 @@ if(NEED_FORTRAN_NAME_MANGLING) endif() # Try building a simple test -if(NOT LAPACK_WORKS) +if(SUNDIALS_ENABLE_LAPACK_CHECKS) message(CHECK_START "Testing LAPACK") @@ -348,5 +340,5 @@ if(NOT LAPACK_WORKS) endif() else() - message(STATUS "Skipped LAPACK test. Set LAPACK_WORKS=FALSE to test.") + message(STATUS "Skipped LAPACK checks.") endif() diff --git a/cmake/tpl/SundialsMAGMA.cmake b/cmake/tpl/SundialsMAGMA.cmake index fd0f2487a9..ffc97e167c 100644 --- a/cmake/tpl/SundialsMAGMA.cmake +++ b/cmake/tpl/SundialsMAGMA.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup MAGMA correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup MAGMA. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_MAGMA_INCLUDED) - set(SUNDIALS_MAGMA_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -60,23 +48,28 @@ message(STATUS "SUNDIALS_MAGMA_BACKENDS: ${SUNDIALS_MAGMA_BACKENDS}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(MAGMA_FOUND AND (NOT MAGMA_WORKS)) - if(SUNDIALS_MAGMA_BACKENDS MATCHES "CUDA" AND NOT ENABLE_CUDA) +if(SUNDIALS_ENABLE_MAGMA_CHECKS) + + message(CHECK_START "Testing MAGMA") + + if(SUNDIALS_MAGMA_BACKENDS MATCHES "CUDA" AND NOT SUNDIALS_ENABLE_CUDA) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SUNDIALS_MAGMA_BACKENDS includes CUDA but CUDA is not enabled. Set ENABLE_CUDA=ON or change the backend." + "SUNDIALS_MAGMA_BACKENDS includes CUDA but CUDA is not enabled. Set SUNDIALS_ENABLE_CUDA=ON or change the backend." ) endif() - if(SUNDIALS_MAGMA_BACKENDS MATCHES "HIP" AND NOT ENABLE_HIP) + + if(SUNDIALS_MAGMA_BACKENDS MATCHES "HIP" AND NOT SUNDIALS_ENABLE_HIP) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SUNDIALS_MAGMA_BACKENDS includes HIP but HIP is not enabled. Set ENABLE_HIP=ON or change the backend." + "SUNDIALS_MAGMA_BACKENDS includes HIP but HIP is not enabled. Set SUNDIALS_ENABLE_HIP=ON or change the backend." ) endif() - set(MAGMA_WORKS - TRUE - CACHE BOOL "MAGMA works with SUNDIALS as configured" FORCE) -elseif(MAGMA_FOUND AND MAGMA_WORKS) - message(STATUS "Skipped MAGMA tests, assuming MAGMA works with SUNDIALS.") + message(CHECK_PASS "success") + +else() + message(STATUS "Skipped MAGMA checks.") endif() diff --git a/cmake/tpl/SundialsMPI.cmake b/cmake/tpl/SundialsMPI.cmake index 9c3fd22a29..6d8e4b96a8 100644 --- a/cmake/tpl/SundialsMPI.cmake +++ b/cmake/tpl/SundialsMPI.cmake @@ -27,11 +27,7 @@ # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_MPI_INCLUDED) - set(SUNDIALS_MPI_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # --------------------------------------------------------------------------- # If MPI__COMPILER is set, FindMPI will try to set the below variables for diff --git a/cmake/tpl/SundialsONEMKL.cmake b/cmake/tpl/SundialsONEMKL.cmake index 0bdcc12d7a..6baaed015f 100644 --- a/cmake/tpl/SundialsONEMKL.cmake +++ b/cmake/tpl/SundialsONEMKL.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup oneMKL correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup oneMKL. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_ONEMKL_INCLUDED) - set(SUNDIALS_ONEMKL_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -58,19 +46,13 @@ endif() # Workaround bug in MKLConfig.cmake when using icpx -fsycl instead of dpcpp as # the C++ compiler -if(ENABLE_SYCL) +if(SUNDIALS_ENABLE_SYCL) set(DPCPP_COMPILER ON) endif() # Look for CMake configuration file in oneMKL installation -find_package( - MKL - CONFIG - PATHS - "${ONEMKL_DIR}" - "${ONEMKL_DIR}/lib/cmake/mkl" - NO_DEFAULT_PATH - REQUIRED) +find_package(MKL CONFIG PATHS "${ONEMKL_DIR}" "${ONEMKL_DIR}/lib/cmake/mkl" + REQUIRED) message(STATUS "MKL Version: ${MKL_VERSION}") message(STATUS "MKL Targets: ${MKL_IMPORTED_TARGETS}") @@ -79,11 +61,9 @@ message(STATUS "MKL Targets: ${MKL_IMPORTED_TARGETS}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(MKL_FOUND AND (NOT ONEMKL_WORKS)) - message(STATUS "Checking if oneMKL works... OK") - set(ONEMKL_WORKS - TRUE - CACHE BOOL "oneMKL works with SUNDIALS as configured" FORCE) +if(SUNDIALS_ENABLE_ONEMKL_CHECKS) + message(CHECK_START "Testing oneMKL") + message(CHECK_PASS "success") else() - message(STATUS "Skipped oneMKL tests, assuming oneMKL works with SUNDIALS.") + message(STATUS "Skipped oneMKL checks.") endif() diff --git a/cmake/tpl/SundialsOpenMP.cmake b/cmake/tpl/SundialsOpenMP.cmake index 3c81f6a836..0e97300556 100644 --- a/cmake/tpl/SundialsOpenMP.cmake +++ b/cmake/tpl/SundialsOpenMP.cmake @@ -14,15 +14,7 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup OpenMP correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup OpenMP. # # Creates the variables: # OPENMP_FOUND - was OpenMP found @@ -34,11 +26,7 @@ # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_OPENMP_INCLUDED) - set(SUNDIALS_OPENMP_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -71,21 +59,9 @@ set(OpenMP_Fortran_VERSION CACHE INTERNAL "" FORCE) # Check for OpenMP offloading support -if(OPENMP_FOUND AND (ENABLE_OPENMP_DEVICE OR SUPERLUDIST_OpenMP)) - - if(OPENMP_DEVICE_WORKS) - - # The user has asked for checks to be skipped, assume offloading is - # supported - set(OPENMP45_FOUND TRUE) - set(OPENMP_SUPPORTS_DEVICE_OFFLOADING TRUE) - message( - WARNING - "Skipping OpenMP device/version check." - "SUNDIALS OpenMP functionality dependent on OpenMP 4.5+ is not guaranteed." - ) +if(OPENMP_FOUND AND (SUNDIALS_ENABLE_OPENMP_DEVICE OR SUPERLUDIST_OpenMP)) - else() + if(SUNDIALS_ENABLE_OPENMP_DEVICE_CHECKS) # Check the OpenMP version message(STATUS "Checking whether OpenMP supports device offloading") @@ -105,6 +81,18 @@ if(OPENMP_FOUND AND (ENABLE_OPENMP_DEVICE OR SUPERLUDIST_OpenMP)) "The found OpenMP version does not support device offloading.") endif() + else() + + # The user has asked for checks to be skipped, assume offloading is + # supported + set(OPENMP45_FOUND TRUE) + set(OPENMP_SUPPORTS_DEVICE_OFFLOADING TRUE) + message(STATUS "Skipped OpenMP checks.") + message( + WARNING + "SUNDIALS OpenMP functionality dependent on OpenMP 4.5+ is not guaranteed." + ) + endif() endif() diff --git a/cmake/tpl/SundialsPETSC.cmake b/cmake/tpl/SundialsPETSC.cmake index fe3e7271da..131fab28a8 100644 --- a/cmake/tpl/SundialsPETSC.cmake +++ b/cmake/tpl/SundialsPETSC.cmake @@ -14,35 +14,24 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup PETSC correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup PETSC. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_PETSC_INCLUDED) - set(SUNDIALS_PETSC_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible # ----------------------------------------------------------------------------- # Using PETSc requires building with MPI enabled -if(ENABLE_PETSC AND NOT ENABLE_MPI) +if(SUNDIALS_ENABLE_PETSC AND NOT SUNDIALS_ENABLE_MPI) message( - FATAL_ERROR "MPI is required for PETSc support. Set ENABLE_MPI to ON.") + FATAL_ERROR + "MPI is required for PETSc support. Set SUNDIALS_ENABLE_MPI to ON.") endif() if(SUNDIALS_PRECISION MATCHES "EXTENDED") @@ -69,11 +58,14 @@ message(STATUS "PETSC_PRECISION: ${PETSC_PRECISION}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(PETSC_FOUND AND (NOT PETSC_WORKS)) +if(SUNDIALS_ENABLE_PETSC_CHECKS) # No need for any compile tests because the FindPETSC module does compile # tests already. + message(CHECK_START "Testing PETSc") + if(NOT ("${SUNDIALS_INDEX_SIZE}" MATCHES "${PETSC_INDEX_SIZE}")) + message(CHECK_FAIL "failed") string( CONCAT _err_msg_string "PETSc not functional due to index size mismatch:\n" @@ -86,6 +78,7 @@ if(PETSC_FOUND AND (NOT PETSC_WORKS)) string(TOUPPER "${PETSC_PRECISION}" _petsc_precision) string(TOUPPER "${SUNDIALS_PRECISION}" _sundials_precision) if(NOT ("${_sundials_precision}" MATCHES "${_petsc_precision}")) + message(CHECK_FAIL "failed") string( CONCAT _err_msg_string "PETSc not functional due to real type precision mismatch:\n" @@ -95,12 +88,8 @@ if(PETSC_FOUND AND (NOT PETSC_WORKS)) message(FATAL_ERROR "${_err_msg_string}") endif() - set(PETSC_WORKS - TRUE - CACHE BOOL "PETSC works with SUNDIALS as configured" FORCE) -elseif(PETSC_FOUND AND PETSC_WORKS) - message( - STATUS - "Skipped PETSC tests, assuming PETSC works with SUNDIALS. Set PETSC_WORKS=FALSE to (re)run compatibility test." - ) + message(CHECK_PASS "success") + +else() + message(STATUS "Skipped PETSC checks.") endif() diff --git a/cmake/tpl/SundialsPthread.cmake b/cmake/tpl/SundialsPthread.cmake index 13f23f6b19..87b32f2905 100644 --- a/cmake/tpl/SundialsPthread.cmake +++ b/cmake/tpl/SundialsPthread.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup Pthreads correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup Pthreads. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_PTHREAD_INCLUDED) - set(SUNDIALS_PTHREAD_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible diff --git a/cmake/tpl/SundialsRAJA.cmake b/cmake/tpl/SundialsRAJA.cmake index 1f5eaffc4c..a14ee3cc43 100644 --- a/cmake/tpl/SundialsRAJA.cmake +++ b/cmake/tpl/SundialsRAJA.cmake @@ -14,41 +14,32 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup RAJA correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup RAJA. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_RAJA_INCLUDED) - set(SUNDIALS_RAJA_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible # ----------------------------------------------------------------------------- -if((SUNDIALS_RAJA_BACKENDS MATCHES "CUDA") AND (NOT ENABLE_CUDA)) - message(FATAL_ERROR "RAJA with a CUDA backend requires ENABLE_CUDA = ON") +if((SUNDIALS_RAJA_BACKENDS MATCHES "CUDA") AND (NOT SUNDIALS_ENABLE_CUDA)) + message( + FATAL_ERROR "RAJA with a CUDA backend requires SUNDIALS_ENABLE_CUDA = ON") endif() -if((SUNDIALS_RAJA_BACKENDS MATCHES "HIP") AND (NOT ENABLE_HIP)) - message(FATAL_ERROR "RAJA with a HIP backend requires ENABLE_HIP = ON") +if((SUNDIALS_RAJA_BACKENDS MATCHES "HIP") AND (NOT SUNDIALS_ENABLE_HIP)) + message( + FATAL_ERROR "RAJA with a HIP backend requires SUNDIALS_ENABLE_HIP = ON") endif() -if((SUNDIALS_RAJA_BACKENDS MATCHES "SYCL") AND (NOT ENABLE_SYCL)) - message(FATAL_ERROR "RAJA with a SYCL backend requires ENABLE_SYCL = ON") +if((SUNDIALS_RAJA_BACKENDS MATCHES "SYCL") AND (NOT SUNDIALS_ENABLE_SYCL)) + message( + FATAL_ERROR "RAJA with a SYCL backend requires SUNDIALS_ENABLE_SYCL = ON") endif() # ----------------------------------------------------------------------------- @@ -59,8 +50,7 @@ endif() find_file( RAJA_CONFIGHPP_PATH config.hpp HINTS "${RAJA_DIR}" - PATH_SUFFIXES include include/RAJA - NO_DEFAULT_PATH) + PATH_SUFFIXES include include/RAJA) mark_as_advanced(FORCE RAJA_CONFIGHPP_PATH) # Look for CMake configuration file in RAJA installation @@ -121,17 +111,17 @@ if((SUNDIALS_RAJA_BACKENDS MATCHES "HIP") AND (NOT RAJA_BACKENDS MATCHES "HIP")) ) endif() -if(NOT ENABLE_OPENMP AND RAJA_BACKENDS MATCHES "OPENMP") +if(NOT SUNDIALS_ENABLE_OPENMP AND RAJA_BACKENDS MATCHES "OPENMP") message( FATAL_ERROR - "RAJA was built with OpenMP, but OpenMP is not enabled. Set ENABLE_OPENMP to ON." + "RAJA was built with OpenMP, but OpenMP is not enabled. Set SUNDIALS_ENABLE_OPENMP to ON." ) endif() -if(NOT ENABLE_OPENMP_DEVICE AND RAJA_BACKENDS MATCHES "TARGET_OPENMP") +if(NOT SUNDIALS_ENABLE_OPENMP_DEVICE AND RAJA_BACKENDS MATCHES "TARGET_OPENMP") message( FATAL_ERROR - "RAJA was built with OpenMP device offloading, but OpenMP with device offloading is not enabled. Set ENABLE_OPENMP_DEVICE to ON." + "RAJA was built with OpenMP device offloading, but OpenMP with device offloading is not enabled. Set SUNDIALS_ENABLE_OPENMP_DEVICE to ON." ) endif() diff --git a/cmake/tpl/SundialsSuperLUDIST.cmake b/cmake/tpl/SundialsSuperLUDIST.cmake index aeb3a2421f..cdaa8491a8 100644 --- a/cmake/tpl/SundialsSuperLUDIST.cmake +++ b/cmake/tpl/SundialsSuperLUDIST.cmake @@ -14,26 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup SuperLU_DIST correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# _WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup SuperLU_DIST. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_SUPERLUDIST_INCLUDED) - set(SUNDIALS_SUPERLUDIST_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible @@ -47,19 +35,21 @@ if(SUNDIALS_PRECISION MATCHES "SINGLE" OR SUNDIALS_PRECISION MATCHES "EXTENDED") endif() # Using SUPERLUDIST requires building with MPI enabled -if(ENABLE_SUPERLUDIST AND NOT ENABLE_MPI) +if(SUNDIALS_ENABLE_SUPERLUDIST AND NOT SUNDIALS_ENABLE_MPI) message( FATAL_ERROR - "MPI is required for SuperLU DIST support. Set ENABLE_MPI to ON.") + "MPI is required for SuperLU DIST support. Set SUNDIALS_ENABLE_MPI to ON." + ) endif() # Using SUPERLUDIST with OpenMP requires building with OpenMP enabled -if(ENABLE_SUPERLUDIST +if(SUNDIALS_ENABLE_SUPERLUDIST AND SUPERLUDIST_OpenMP - AND NOT ENABLE_OPENMP) + AND NOT SUNDIALS_ENABLE_OPENMP) message( FATAL_ERROR - "OpenMP is required for SuperLU DIST support. Set ENABLE_OPENMP to ON.") + "OpenMP is required for SuperLU DIST support. Set SUNDIALS_ENABLE_OPENMP to ON." + ) endif() # ----------------------------------------------------------------------------- @@ -85,24 +75,29 @@ message(STATUS "SUPERLUDIST_ROCM: ${SUPERLUDIST_ROCM}") # ----------------------------------------------------------------------------- # If we have the SuperLU_DIST libraries, test them -if(SUPERLUDIST_FOUND AND (NOT SUPERLUDIST_WORKS)) +if(SUNDIALS_ENABLE_SUPERLUDIST_CHECKS) - if(SUPERLUDIST_CUDA AND (NOT ENABLE_CUDA)) + message(CHECK_START "Testing SuperLU_DIST") + + if(SUPERLUDIST_CUDA AND (NOT SUNDIALS_ENABLE_CUDA)) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SuperLU_DIST was built with CUDA but SUNDIALS does not have CUDA enabled. Set ENABLE_CUDA=TRUE." + "SuperLU_DIST was built with CUDA but SUNDIALS does not have CUDA enabled. Set SUNDIALS_ENABLE_CUDA=TRUE." ) endif() - if(SUPERLUDIST_HIP AND (NOT ENABLE_HIP)) + if(SUPERLUDIST_HIP AND (NOT SUNDIALS_ENABLE_HIP)) + message(CHECK_FAIL "failed") message( FATAL_ERROR - "SuperLU_DIST was built with HIP but SUNDIALS does not have HIP enabled. Set ENABLE_HIP=TRUE." + "SuperLU_DIST was built with HIP but SUNDIALS does not have HIP enabled. Set SUNDIALS_ENABLE_HIP=TRUE." ) endif() # Check index size if(NOT (SUNDIALS_INDEX_SIZE STREQUAL SUPERLUDIST_INDEX_SIZE)) + message(CHECK_FAIL "failed") set(_err_msg_string "SuperLU_DIST not functional due to index size mismatch:\n") string( @@ -115,14 +110,8 @@ if(SUPERLUDIST_FOUND AND (NOT SUPERLUDIST_WORKS)) message(FATAL_ERROR "${_err_msg_string}") endif() - message(STATUS "Checking if SuperLU_DIST works with SUNDIALS... OK") - set(SUPERLUDIST_WORKS - TRUE - CACHE BOOL "SuperLU_DIST works with SUNDIALS as configured" FORCE) + message(CHECK_PASS "success") -elseif(SUPERLUDIST_FOUND AND SUPERLUDIST_WORKS) - message( - STATUS - "Skipped SuperLU_DIST tests, assuming SuperLU_DIST works with SUNDIALS. Set SUPERLUDIST_WORKS=FALSE to (re)run compatibility test." - ) +else() + message(STATUS "Skipped SuperLU_DIST checks.") endif() diff --git a/cmake/tpl/SundialsSuperLUMT.cmake b/cmake/tpl/SundialsSuperLUMT.cmake index e25930bad6..e7dbb40fed 100644 --- a/cmake/tpl/SundialsSuperLUMT.cmake +++ b/cmake/tpl/SundialsSuperLUMT.cmake @@ -14,15 +14,7 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup SUPERLUMT correctly. -# Created from the SundialsTPL.cmake.template template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup SUPERLUMT. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- @@ -55,7 +47,7 @@ message(STATUS "SUPERLUMT_INCLUDE_DIR: ${SUPERLUMT_INCLUDE_DIR}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -if(NOT SUPERLUMT_WORKS) +if(SUNDIALS_ENABLE_SUPERLUMT_CHECKS) message(CHECK_START "Testing SuperLU_MT") @@ -96,5 +88,5 @@ if(NOT SUPERLUMT_WORKS) endif() else() - message(STATUS "Skipped SuperLU_MT test. Set SUPERLUMT_WORKS=FALSE to test.") + message(STATUS "Skipped SuperLU_MT checks.") endif() diff --git a/cmake/tpl/SundialsTPL.cmake.template b/cmake/tpl/SundialsTPL.cmake.template index d728d56261..1c5c7da156 100644 --- a/cmake/tpl/SundialsTPL.cmake.template +++ b/cmake/tpl/SundialsTPL.cmake.template @@ -14,16 +14,14 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup correctly. -# Created from the SundialsTPL.cmake template. +# Module to find and setup . +# ----------------------------------------------------------------------------- + # All SUNDIALS modules that find and setup a TPL must: # -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. +# 1. Check to make sure the SUNDIALS configuration and the TPL are compatible. # 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. -# ----------------------------------------------------------------------------- +# 3. If enabled, perform additional compatibility/compile checks. # ----------------------------------------------------------------------------- # Section 1: Include guard @@ -48,7 +46,7 @@ find_package( REQUIRED) # Do any checks which don't require compilation first. # Try building a simple test -if(NOT _WORKS) +if(SUNDIALS_ENABLE__CHECKS) message(CHECK_START "Testing ") @@ -83,5 +81,5 @@ if(NOT _WORKS) endif() else() - message(STATUS "Skipped test. Set _WORKS=FALSE to test.") + message(STATUS "Skipped checks.") endif() diff --git a/cmake/tpl/SundialsTrilinos.cmake b/cmake/tpl/SundialsTrilinos.cmake index 06a0d49e3b..183480d22e 100644 --- a/cmake/tpl/SundialsTrilinos.cmake +++ b/cmake/tpl/SundialsTrilinos.cmake @@ -14,15 +14,7 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup Trilinos correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup Trilinos. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- diff --git a/cmake/tpl/SundialsXBRAID.cmake b/cmake/tpl/SundialsXBRAID.cmake index cac0bf5032..4366dac09b 100644 --- a/cmake/tpl/SundialsXBRAID.cmake +++ b/cmake/tpl/SundialsXBRAID.cmake @@ -14,35 +14,24 @@ # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- -# Module to find and setup correctly. -# Created from the SundialsTPL.cmake template. -# All SUNDIALS modules that find and setup a TPL must: -# -# 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. -# 2. Find the TPL. -# 3. Check if the TPL works with SUNDIALS, UNLESS the override option -# TPL_WORKS is TRUE - in this case the tests should not be performed and it -# should be assumed that the TPL works with SUNDIALS. +# Module to find and setup XBraid. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- -if(NOT DEFINED SUNDIALS_XBRAID_INCLUDED) - set(SUNDIALS_XBRAID_INCLUDED) -else() - return() -endif() +include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible # ----------------------------------------------------------------------------- # Using XBRAID requires building with MPI enabled -if(NOT ENABLE_MPI) +if(NOT SUNDIALS_ENABLE_MPI) message( - FATAL_ERROR "MPI is required for XBraid support. Set ENABLE_MPI to ON.") + FATAL_ERROR + "MPI is required for XBraid support. Set SUNDIALS_ENABLE_MPI to ON.") endif() # XBraid does not support single or extended precision @@ -71,36 +60,16 @@ message(STATUS "XBRAID_INCLUDES: ${XBRAID_INCS}") # Section 4: Test the TPL # ----------------------------------------------------------------------------- -# Add works variable +if(SUNDIALS_ENABLE_XBRAID_CHECKS) -if(XBRAID_FOUND AND (NOT XBRAID_WORKS)) + message(CHECK_START "Testing XBraid") # Create the XBRAID_TEST directory - set(XBRAID_TEST_DIR ${PROJECT_BINARY_DIR}/XBRAID_TEST) - file(MAKE_DIRECTORY ${XBRAID_TEST_DIR}) - - # Create a CMakeLists.txt file - file( - WRITE ${XBRAID_TEST_DIR}/CMakeLists.txt - "cmake_minimum_required(VERSION ${CMAKE_VERSION})\n" - "project(ltest C)\n" - "set(CMAKE_VERBOSE_MAKEFILE ON)\n" - "set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n" - "set(CMAKE_C_COMPILER ${MPI_C_COMPILER})\n" - "set(CMAKE_C_STANDARD ${CMAKE_C_STANDARD})\n" - "set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n" - "set(CMAKE_C_FLAGS_RELEASE \"${CMAKE_C_FLAGS_RELEASE}\")\n" - "set(CMAKE_C_FLAGS_DEBUG \"${CMAKE_C_FLAGS_DEBUG}\")\n" - "set(CMAKE_C_FLAGS_RELWITHDEBUGINFO \"${CMAKE_C_FLAGS_RELWITHDEBUGINFO}\")\n" - "set(CMAKE_C_FLAGS_MINSIZE \"${CMAKE_C_FLAGS_MINSIZE}\")\n" - "add_executable(ltest ltest.c)\n" - "target_include_directories(ltest PRIVATE \"${XBRAID_INCS}\")\n" - "target_link_libraries(ltest \"${XBRAID_LIBS}\")\n" - "target_link_libraries(ltest m)\n") + set(TEST_DIR ${PROJECT_BINARY_DIR}/XBRAID_TEST) # Create a C source file file( - WRITE ${XBRAID_TEST_DIR}/ltest.c + WRITE ${TEST_DIR}/test.c "\#include \n" "\#include \"braid.h\"\n" "int main(void) {\n" @@ -110,31 +79,26 @@ if(XBRAID_FOUND AND (NOT XBRAID_WORKS)) "return 0;\n" "}\n") - # To ensure we do not use stuff from the previous attempts, we must remove the - # CMakeFiles directory. - file(REMOVE_RECURSE ${XBRAID_TEST_DIR}/CMakeFiles) - - # Attempt to build and link the "ltest" executable + # Attempt to build and link the test executable, pass --debug-trycompile to + # the cmake command to save build files for debugging try_compile( - COMPILE_OK ${XBRAID_TEST_DIR} - ${XBRAID_TEST_DIR} ltest + COMPILE_OK ${TEST_DIR} + ${TEST_DIR}/test.c + LINK_LIBRARIES SUNDIALS::XBRAID MPI::MPI_C ${SUNDIALS_MATH_LIBRARY} OUTPUT_VARIABLE COMPILE_OUTPUT) # Process test result if(COMPILE_OK) - message(STATUS "Checking if XBRAID works... OK") - set(XBRAID_WORKS - TRUE - CACHE BOOL "XBRAID works as configured" FORCE) + message(CHECK_PASS "success") else() - message(STATUS "Checking if XBRAID works... FAILED") - message(STATUS "Check output: ") - message("${COMPILE_OUTPUT}") - message(FATAL_ERROR "XBRAID compile test failed.") + message(CHECK_FAIL "failed") + file(WRITE ${TEST_DIR}/compile.out "${COMPILE_OUTPUT}") + message( + FATAL_ERROR + "Could not compile XBraid test. Check output in ${TEST_DIR}/compile.out" + ) endif() - message(STATUS "XBRAID tests passed") - else() - message(STATUS "Skipped XBRAID tests, assuming XBRAID works with SUNDIALS.") + message(STATUS "Skipped XBraid checks.") endif() diff --git a/doc/cvode/guide/source/Usage/index.rst b/doc/cvode/guide/source/Usage/index.rst index 9c7e0d6432..775dbaf1ff 100644 --- a/doc/cvode/guide/source/Usage/index.rst +++ b/doc/cvode/guide/source/Usage/index.rst @@ -981,7 +981,7 @@ Main solver optional input functions .. warning:: - Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_BUILD_WITH_MONITORING``, to utilize this function. See :numref:`Installation` for more information. + Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_ENABLE_MONITORING``, to utilize this function. See :numref:`Installation` for more information. .. c:function:: int CVodeSetMonitorFrequency(void* cvode_mem, long int nst) @@ -1003,7 +1003,7 @@ Main solver optional input functions .. warning:: - Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_BUILD_WITH_MONITORING``, to utilize this function. See :numref:`Installation` for more information. + Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_ENABLE_MONITORING``, to utilize this function. See :numref:`Installation` for more information. .. c:function:: int CVodeSetMaxOrd(void* cvode_mem, int maxord) @@ -1280,7 +1280,7 @@ Main solver optional input functions * ``CV_MEM_NULL`` -- The CVODE memory block was not initialized through a previous call to :c:func:`CVodeCreate`. **Notes:** - SUNDIALS must be compiled appropriately for specialized kernels to be available. The CMake option ``SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS`` must be set to + SUNDIALS must be compiled appropriately for specialized kernels to be available. The CMake option ``SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS`` must be set to ``ON`` when SUNDIALS is compiled. See the entry for this option in :numref:`Installation.Options` for more information. Currently, the fused kernels are only supported when using CVODE with the :ref:`NVECTOR_CUDA ` and :ref:`NVECTOR_HIP ` implementations of the ``N_Vector``. diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index 96bcf540bb..a78660f764 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -987,7 +987,7 @@ Main solver optional input functions .. warning:: - Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_BUILD_WITH_MONITORING``, to utilize this function. See :numref:`Installation` for more information. + Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_ENABLE_MONITORING``, to utilize this function. See :numref:`Installation` for more information. .. c:function:: int CVodeSetMonitorFrequency(void* cvode_mem, long int nst) @@ -1009,7 +1009,7 @@ Main solver optional input functions .. warning:: - Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_BUILD_WITH_MONITORING``, to utilize this function. See :numref:`Installation` for more information. + Modifying the solution in this function will result in undefined behavior. This function is only intended to be used for monitoring the integrator. SUNDIALS must be built with the CMake option ``SUNDIALS_ENABLE_MONITORING``, to utilize this function. See :numref:`Installation` for more information. .. c:function:: int CVodeSetMaxOrd(void* cvode_mem, int maxord) diff --git a/doc/requirements.txt b/doc/requirements.txt index bdc8173edd..affb9e2159 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,4 +7,4 @@ sphinx-multitoc-numbering sphinx-toolbox sphinxcontrib-googleanalytics sphinxcontrib.bibtex - +sphinxcontrib-moderncmakedomain diff --git a/doc/shared/Changelog.rst b/doc/shared/Changelog.rst index fc320c5722..45ec4c30ef 100644 --- a/doc/shared/Changelog.rst +++ b/doc/shared/Changelog.rst @@ -1712,10 +1712,10 @@ namespace. *Profiling Capability* A capability to profile/instrument SUNDIALS library code has been added. This -can be enabled with the CMake option :cmakeop:`SUNDIALS_BUILD_WITH_PROFILING`. A +can be enabled with the CMake option ``SUNDIALS_BUILD_WITH_PROFILING``. A built-in profiler will be used by default, but the `Caliper `__ library can also be used instead with the -CMake option :cmakeop:`ENABLE_CALIPER`. See the documentation section on +CMake option ``ENABLE_CALIPER``. See the documentation section on profiling for more details. .. warning:: @@ -2402,7 +2402,7 @@ contact the SUNDIALS team about any performance changes that they notice. Added new capabilities for monitoring the solve phase in the Newton and fixed-point :c:type:`SUNNonlinearSolver`, and the SUNDIALS iterative linear solvers. SUNDIALS must be built with the CMake option -:cmakeop:`SUNDIALS_BUILD_WITH_MONITORING` to use these capabilities. +``SUNDIALS_BUILD_WITH_MONITORING`` to use these capabilities. Added specialized fused CUDA kernels to CVODE which may offer better performance on smaller problems when using CVODE with the CUDA vector. See the optional @@ -2887,7 +2887,7 @@ documentation and SUNDIALS examples. **Bug Fixes** The ``EXAMPLES_ENABLE_RAJA`` CMake option has been removed. The option -:cmakeop:`EXAMPLES_ENABLE_CUDA` enables all examples that use CUDA including the +``EXAMPLES_ENABLE_CUDA`` enables all examples that use CUDA including the RAJA examples with a CUDA back end (if RAJA is enabled). Python is no longer required to run ``make test`` and ``make test_install``. @@ -3166,7 +3166,7 @@ with those used in native CMake FindMPI module are :cmakeop:`MPI_C_COMPILER`, :cmakeop:`MPI_CXX_COMPILER`, :cmakeop:`MPI_Fortran_COMPILER`, and :cmakeop:`MPIEXEC_EXECUTABLE`. -When a Fortran name-mangling scheme is needed (e.g., :cmakeop:`ENABLE_LAPACK` is +When a Fortran name-mangling scheme is needed (e.g., ``ENABLE_LAPACK`` is ``ON``) the build system will infer the scheme from the Fortran compiler. If a Fortran compiler is not available or the inferred or default scheme needs to be overridden, the advanced options ``SUNDIALS_F77_FUNC_CASE`` and @@ -3400,9 +3400,9 @@ coefficients accurate enough for use in quad precision. Renamed CMake options to enable/disable examples for greater clarity and added option to enable/disable Fortran 77 examples: - - Changed ``EXAMPLES_ENABLE`` to :cmakeop:`EXAMPLES_ENABLE_C` + - Changed ``EXAMPLES_ENABLE`` to ``EXAMPLES_ENABLE_C`` - - Changed ``CXX_ENABLE`` to :cmakeop:`EXAMPLES_ENABLE_CXX` + - Changed ``CXX_ENABLE`` to ``EXAMPLES_ENABLE_CXX`` - Changed ``F90_ENABLE`` to ``EXAMPLES_ENABLE_F90`` diff --git a/doc/shared/Fortran/Introduction.rst b/doc/shared/Fortran/Introduction.rst index d9dd3a8b04..43b4f43f8e 100644 --- a/doc/shared/Fortran/Introduction.rst +++ b/doc/shared/Fortran/Introduction.rst @@ -180,9 +180,10 @@ team. Installation ------------ -The installation procedure for the Fortran interfaces is the same as for the C/C++ core of SUNDIALS, refer -to :numref:`Installation`. The CMake option to turn on the Fortran interfaces in a SUNDIALS build -is :cmakeop:`BUILD_FORTRAN_MODULE_INTERFACE`. The Spack variant is ``+fortran``. +The installation procedure for the Fortran interfaces is the same as for the +C/C++ core of SUNDIALS, refer to :numref:`Installation`. The CMake option to +turn on the Fortran interfaces in a SUNDIALS build is +:cmakeop:`SUNDIALS_ENABLE_FORTRAN`. The Spack variant is ``+fortran``. .. _Fortran.Portability: diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index d3266f3d84..e7e9febea5 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -11,3 +11,129 @@ Fixed a CMake bug where the SuperLU_MT interface would not be built and installed without setting the ``SUPERLUMT_WORKS`` option to ``TRUE``. **Deprecation Notices** + +Several CMake options have been deprecated in favor of namespaced versions +prefixed with ``SUNDIALS_`` to avoid naming collisions in applications that +include SUNDIALS directly within their CMake builds. Additionally, a consistent +naming convention (``SUNDIALS_ENABLE``) is now used for all boolean options. The +table below lists the old CMake option names and the new replacements. + ++------------------------------------------+---------------------------------------------------------+ +| Old Option | New Option | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_ARKODE`` | :cmakeop:`SUNDIALS_ENABLE_ARKODE` | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_CVODE`` | :cmakeop:`SUNDIALS_ENABLE_CVODE` | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_CVODES`` | :cmakeop:`SUNDIALS_ENABLE_CVODES` | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_IDA`` | :cmakeop:`SUNDIALS_ENABLE_IDA` | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_IDAS`` | :cmakeop:`SUNDIALS_ENABLE_IDAS` | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_KINSOL`` | :cmakeop:`SUNDIALS_ENABLE_KINSOL` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_MPI`` | :cmakeop:`SUNDIALS_ENABLE_MPI` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_OPENMP`` | :cmakeop:`SUNDIALS_ENABLE_OPENMP` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_OPENMP_DEVICE`` | :cmakeop:`SUNDIALS_ENABLE_OPENMP_DEVICE` | ++------------------------------------------+---------------------------------------------------------+ +| ``OPENMP_DEVICE_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_OPENMP_DEVICE_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_PTHREAD`` | :cmakeop:`SUNDIALS_ENABLE_PTHREAD` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_CUDA`` | :cmakeop:`SUNDIALS_ENABLE_CUDA` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_HIP`` | :cmakeop:`SUNDIALS_ENABLE_HIP` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_SYCL`` | :cmakeop:`SUNDIALS_ENABLE_SYCL` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_LAPACK`` | :cmakeop:`SUNDIALS_ENABLE_LAPACK` | ++------------------------------------------+---------------------------------------------------------+ +| ``LAPACK_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_LAPACK_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_GINKGO`` | :cmakeop:`SUNDIALS_ENABLE_GINKGO` | ++------------------------------------------+---------------------------------------------------------+ +| ``GINKGO_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_GINKGO_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_MAGMA`` | :cmakeop:`SUNDIALS_ENABLE_MAGMA` | ++------------------------------------------+---------------------------------------------------------+ +| ``MAGMA_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_MAGMA_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_SUPERLUDIST`` | :cmakeop:`SUNDIALS_ENABLE_SUPERLUDIST` | ++------------------------------------------+---------------------------------------------------------+ +| ``SUPERLUDIST_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_SUPERLUDIST_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_SUPERLUMT`` | :cmakeop:`SUNDIALS_ENABLE_SUPERLUMT` | ++------------------------------------------+---------------------------------------------------------+ +| ``SUPERLUMT_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_SUPERLUMT_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_KLU`` | :cmakeop:`SUNDIALS_ENABLE_KLU` | ++------------------------------------------+---------------------------------------------------------+ +| ``KLU_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_KLU_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_HYPRE`` | :cmakeop:`SUNDIALS_ENABLE_HYPRE` | ++------------------------------------------+---------------------------------------------------------+ +| ``HYPRE_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_HYPRE_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_PETSC`` | :cmakeop:`SUNDIALS_ENABLE_PETSC` | ++------------------------------------------+---------------------------------------------------------+ +| ``PETSC_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_PETSC_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_TRILINOS`` | :cmakeop:`SUNDIALS_ENABLE_TRILINOS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_RAJA`` | :cmakeop:`SUNDIALS_ENABLE_RAJA` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_XBRAID`` | :cmakeop:`SUNDIALS_ENABLE_XBRAID` | ++------------------------------------------+---------------------------------------------------------+ +| ``XBRAID_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_XBRAID_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_ONEMKL`` | :cmakeop:`SUNDIALS_ENABLE_ONEMKL` | ++------------------------------------------+---------------------------------------------------------+ +| ``ONEMKL_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_ONEMKL_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_CALIPER`` | :cmakeop:`SUNDIALS_ENABLE_CALIPER` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_ADIAK`` | :cmakeop:`SUNDIALS_ENABLE_ADIAK` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_KOKKOS`` | :cmakeop:`SUNDIALS_ENABLE_KOKKOS` | ++------------------------------------------+---------------------------------------------------------+ +| ``KOKKOS_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_KOKKOS_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_KOKKOS_KERNELS`` | :cmakeop:`SUNDIALS_ENABLE_KOKKOS_KERNELS` | ++------------------------------------------+---------------------------------------------------------+ +| ``KOKKOS_KERNELS_WORKS`` | :cmakeop:`SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``SUNDIALS_BUILD_WITH_MONITORING`` | :cmakeop:`SUNDIALS_ENABLE_MONITORING` | ++------------------------------------------+---------------------------------------------------------+ +| ``SUNDIALS_BUILD_WITH_PROFILING`` | :cmakeop:`SUNDIALS_ENABLE_PROFILING` | ++------------------------------------------+---------------------------------------------------------+ +| ``BUILD_BENCHMARKS`` | :cmakeop:`SUNDIALS_ENABLE_BENCHMARKS` | ++------------------------------------------+---------------------------------------------------------+ +| ``BENCHMARKS_INSTALL_PATH`` | :cmakeop:`SUNDIALS_BENCHMARKS_INSTALL_PATH` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_ALL_WARNINGS`` | :cmakeop:`SUNDIALS_ENABLE_ALL_WARNINGS` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_WARNINGS_AS_ERRORS`` | :cmakeop:`CMAKE_COMPILE_WARNING_AS_ERROR` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_ADDRESS_SANITIZER`` | :cmakeop:`SUNDIALS_ENABLE_ADDRESS_SANITIZER` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_MEMORY_SANITIZER`` | :cmakeop:`SUNDIALS_ENABLE_MEMORY_SANITIZER` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_LEAK_SANITIZER`` | :cmakeop:`SUNDIALS_ENABLE_LEAK_SANITIZER` | ++------------------------------------------+---------------------------------------------------------+ +| ``ENABLE_UNDEFINED_BEHAVIOR_SANITIZER`` | :cmakeop:`SUNDIALS_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER` | ++------------------------------------------+---------------------------------------------------------+ +| ``EXAMPLES_ENABLE_C`` | :cmakeop:`SUNDIALS_EXAMPLES_ENABLE_C` | ++------------------------------------------+---------------------------------------------------------+ +| ``EXAMPLES_ENABLE_CXX`` | :cmakeop:`SUNDIALS_EXAMPLES_ENABLE_CXX` | ++------------------------------------------+---------------------------------------------------------+ +| ``EXAMPLES_ENABLE_F2003`` | :cmakeop:`SUNDIALS_EXAMPLES_ENABLE_FORTRAN` | ++------------------------------------------+---------------------------------------------------------+ +| ``EXAMPLES_INSTALL`` | :cmakeop:`SUNDIALS_EXAMPLES_ENABLE_INSTALL` | ++------------------------------------------+---------------------------------------------------------+ +| ``EXAMPLES_INSTALL_PATH`` | :cmakeop:`SUNDIALS_EXAMPLES_INSTALL_PATH` | ++------------------------------------------+---------------------------------------------------------+ +| ``SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS`` | :cmakeop:`SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS` | ++------------------------------------------+---------------------------------------------------------+ diff --git a/doc/shared/sundials/Install.rst b/doc/shared/sundials/Install.rst index 750b1b458a..16869b5864 100644 --- a/doc/shared/sundials/Install.rst +++ b/doc/shared/sundials/Install.rst @@ -138,7 +138,7 @@ following commands will build and install the default configuration: The default configuration will install static and shared libraries for all SUNDIALS packages and install the associated example codes. Additional features can be enabled by specifying more options in the configuration step. For -example, to enable MPI add ``-D ENABLE_MPI=ON`` to the ``cmake`` command above: +example, to enable MPI add ``-D SUNDIALS_ENABLE_MPI=ON`` to the ``cmake`` command above: .. code-block:: bash @@ -146,7 +146,7 @@ example, to enable MPI add ``-D ENABLE_MPI=ON`` to the ``cmake`` command above: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_MPI=ON + -D SUNDIALS_ENABLE_MPI=ON See section :numref:`Installation.Options` below for a complete list of SUNDIALS configuration options and additional configuration examples. @@ -248,9 +248,9 @@ allocation account on Frontier: -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ -D AMDGPU_TARGETS=gfx90a \ - -D ENABLE_HIP=ON \ - -D ENABLE_MPI=ON \ - -D BUILD_FORTRAN_MODULE_INTERFACE=ON + -D SUNDIALS_ENABLE_HIP=ON \ + -D SUNDIALS_ENABLE_MPI=ON \ + -D SUNDIALS_ENABLE_FORTRAN=ON cd BUILD_DIR make -j8 install # Need an allocation to run the tests: @@ -274,10 +274,10 @@ are for a Linux system and are provided as illustration only. files. For options where the default value depends on the value of another option, the initial value is set on the first configuration pass and is not updated automatically if the related option value is changed in subsequent - passes. For example, the default value of :cmakeop:`EXAMPLES_INSTALL_PATH` is + passes. For example, the default value of :cmakeop:`SUNDIALS_EXAMPLES_INSTALL_PATH` is ``CMAKE_INSTALL_PREFIX/examples``; if the value of :cmakeop:`CMAKE_INSTALL_PREFIX` is updated, then - :cmakeop:`EXAMPLES_INSTALL_PATH` will also need to be updated as its value + :cmakeop:`SUNDIALS_EXAMPLES_INSTALL_PATH` will also need to be updated as its value was set using the :cmakeop:`CMAKE_INSTALL_PREFIX` default. .. _Installation.Options.BuildType: @@ -445,8 +445,8 @@ C++ Compiler The C++ standard used when building SUNDIALS C++ source files. - Default: ``14`` or ``17`` if :cmakeop:`ENABLE_GINKGO` or - :cmakeop:`ENABLE_SYCL` are ``ON`` + Default: ``14`` or ``17`` if :cmakeop:`SUNDIALS_ENABLE_GINKGO` or + :cmakeop:`SUNDIALS_ENABLE_SYCL` are ``ON`` Options: ``14``, ``17``, ``20``, or ``23`` @@ -635,76 +635,116 @@ SUNDIALS Packages The following options can be used to enable/disable particular SUNDIALS packages. -.. cmakeoption:: BUILD_ARKODE +.. cmakeoption:: SUNDIALS_ENABLE_ARKODE - Build the ARKODE library + Enable the ARKODE library Default: ``ON`` -.. cmakeoption:: BUILD_CVODE + .. versionadded:: x.y.z - Build the CVODE library + Replaces the deprecated option ``BUILD_ARKODE`` + +.. cmakeoption:: SUNDIALS_ENABLE_CVODE + + Enable the CVODE library Default: ``ON`` -.. cmakeoption:: BUILD_CVODES + .. versionadded:: x.y.z + + Replaces the deprecated option ``BUILD_CVODE`` - Build the CVODES library +.. cmakeoption:: SUNDIALS_ENABLE_CVODES + + Enable the CVODES library Default: ``ON`` -.. cmakeoption:: BUILD_IDA + .. versionadded:: x.y.z + + Replaces the deprecated option ``BUILD_CVODES`` + +.. cmakeoption:: SUNDIALS_ENABLE_IDA - Build the IDA library + Enable the IDA library Default: ``ON`` -.. cmakeoption:: BUILD_IDAS + .. versionadded:: x.y.z - Build the IDAS library + Replaces the deprecated option ``BUILD_IDA`` + +.. cmakeoption:: SUNDIALS_ENABLE_IDAS + + Enable the IDAS library Default: ``ON`` -.. cmakeoption:: BUILD_KINSOL + .. versionadded:: x.y.z + + Replaces the deprecated option ``BUILD_IDAS`` - Build the KINSOL library +.. cmakeoption:: SUNDIALS_ENABLE_KINSOL + + Enable the KINSOL library Default: ``ON`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``BUILD_KINSOL`` + .. _Installation.Options.Examples: Example Programs ^^^^^^^^^^^^^^^^ -.. cmakeoption:: EXAMPLES_ENABLE_C +.. cmakeoption:: SUNDIALS_EXAMPLES_ENABLE_C Build the SUNDIALS C examples Default: ``ON`` -.. cmakeoption:: EXAMPLES_ENABLE_CXX + .. versionadded:: x.y.z + + Replaces the deprecated option ``EXAMPLES_ENABLE_C`` + +.. cmakeoption:: SUNDIALS_EXAMPLES_ENABLE_CXX Build the SUNDIALS C++ examples Default: ``OFF`` -.. cmakeoption:: EXAMPLES_ENABLE_CUDA + .. versionadded:: x.y.z + + Replaces the deprecated option ``EXAMPLES_ENABLE_CXX`` + +.. cmakeoption:: SUNDIALS_EXAMPLES_ENABLE_CUDA Build the SUNDIALS CUDA examples - Default: ``ON`` when :cmakeop:`ENABLE_CUDA` is ``ON``, otherwise ``OFF`` + Default: ``ON`` when :cmakeop:`SUNDIALS_ENABLE_CUDA` is ``ON``, otherwise ``OFF`` + + .. versionadded:: x.y.z -.. cmakeoption:: EXAMPLES_ENABLE_F2003 + Replaces the deprecated option ``EXAMPLES_ENABLE_CUDA`` + +.. cmakeoption:: SUNDIALS_EXAMPLES_ENABLE_FORTRAN Build the SUNDIALS Fortran 2003 examples - Default: ``ON`` when :cmakeop:`BUILD_FORTRAN_MODULE_INTERFACE` is ``ON``, + Default: ``ON`` when :cmakeop:`SUNDIALS_ENABLE_FORTRAN` is ``ON``, otherwise ``OFF`` -.. cmakeoption:: EXAMPLES_INSTALL + .. versionadded:: x.y.z + + Replaces the deprecated option ``EXAMPLES_ENABLE_F2003`` + +.. cmakeoption:: SUNDIALS_EXAMPLES_ENABLE_INSTALL Install example program source files and sample output files. See - :cmakeop:`EXAMPLES_INSTALL_PATH` for the install location. + :cmakeop:`SUNDIALS_EXAMPLES_INSTALL_PATH` for the install location. A ``CMakeLists.txt`` file to build the examples will be automatically generated and installed with the source files. If building on a Unix-like @@ -713,20 +753,29 @@ Example Programs Default: ``ON`` -.. cmakeoption:: EXAMPLES_INSTALL_PATH + .. versionadded:: x.y.z + + Replaces the deprecated option ``EXAMPLES_INSTALL`` + +.. cmakeoption:: SUNDIALS_EXAMPLES_INSTALL_PATH Full path to where example source and output files will be installed Default: ``CMAKE_INSTALL_PREFIX/examples`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``EXAMPLES_INSTALL_PATH`` + + .. _Installation.Options.Fortran: Fortran Interfaces ^^^^^^^^^^^^^^^^^^ -.. cmakeoption:: BUILD_FORTRAN_MODULE_INTERFACE +.. cmakeoption:: SUNDIALS_ENABLE_FORTRAN - Build the SUNDIALS Fortran 2003 interface + Enable SUNDIALS Fortran interfaces Default: ``OFF`` @@ -742,6 +791,10 @@ Fortran Interfaces SUNDIALS. For now the work around is to only build with static libraries when using MSYS with gfortran on Windows. + .. versionadded:: x.y.z + + Replaces the deprecated option ``BUILD_FORTRAN_MODULE_INTERFACE`` + .. _Installation.Options.ErrorChecking: Error Checking @@ -796,7 +849,7 @@ For more information on logging in SUNDIALS, see :ref:`SUNDIALS.Logging`. Monitoring ^^^^^^^^^^ -.. cmakeoption:: SUNDIALS_BUILD_WITH_MONITORING +.. cmakeoption:: SUNDIALS_ENABLE_MONITORING Build SUNDIALS with capabilities for fine-grained monitoring of solver progress and statistics. This is primarily useful for debugging. @@ -808,6 +861,10 @@ Monitoring Building with monitoring may result in minor performance degradation even if monitoring is not utilized. + .. versionadded:: x.y.z + + Replaces the deprecated option ``SUNDIALS_BUILD_WITH_MONITORING`` + .. _Installation.Options.Profiling: Profiling @@ -815,11 +872,11 @@ Profiling For more information on profiling in SUNDIALS, see :ref:`SUNDIALS.Profiling`. -.. cmakeoption:: SUNDIALS_BUILD_WITH_PROFILING +.. cmakeoption:: SUNDIALS_ENABLE_PROFILING Build SUNDIALS with capabilities for fine-grained profiling. This requires POSIX timers, the Windows ``profileapi.h`` timers, or enabling Caliper with - :cmakeop:`ENABLE_CALIPER`. + :cmakeop:`SUNDIALS_ENABLE_CALIPER`. Default: ``OFF`` @@ -827,6 +884,25 @@ For more information on profiling in SUNDIALS, see :ref:`SUNDIALS.Profiling`. Profiling will impact performance, and should be enabled judiciously. + .. versionadded:: x.y.z + + Replaces the deprecated option ``SUNDIALS_BUILD_WITH_PROFILING`` + +.. _Installation.Options.FusedKernels: + +Fused Kernels +^^^^^^^^^^^^^ + +.. cmakeoption:: SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS + + Enable fused kernels in SUNDIALS packages + + Default: ``OFF`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS`` + .. _Installation.Options.Adiak: Building with Adiak @@ -837,18 +913,32 @@ about HPC simulations. Adiak is developed by Lawrence Livermore National Laboratory and can be obtained from the `Adiak GitHub repository `__. -.. cmakeoption:: ENABLE_ADIAK +.. cmakeoption:: SUNDIALS_ENABLE_ADIAK Enable Adiak support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_ADIAK`` + .. cmakeoption:: adiak_DIR Path to the root of an Adiak installation Default: None +.. cmakeoption:: SUNDIALS_ENABLE_ADIAK_CHECKS + + Perform Adiak compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``adiak_WORKS`` + .. _Installation.Options.Caliper: Building with Caliper @@ -863,8 +953,8 @@ Laboratory and can be obtained from the `Caliper GitHub repository When profiling and Caliper are both enabled, SUNDIALS will utilize Caliper for performance profiling. -To enable Caliper support, set the :cmakeop:`ENABLE_CALIPER` to ``ON`` and set -:cmakeop:`CALIPER_DIR` to the root path of the Caliper installation. For +To enable Caliper support, set the :cmakeop:`SUNDIALS_ENABLE_CALIPER` to ``ON`` +and set :cmakeop:`CALIPER_DIR` to the root path of the Caliper installation. For example, the following command will configure SUNDIALS with profiling and Caliper support: @@ -874,11 +964,11 @@ Caliper support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D SUNDIALS_BUILD_WITH_PROFILING=ON \ - -D ENABLE_CALIPER=ON \ + -D SUNDIALS_ENABLE_PROFILING=ON \ + -D SUNDIALS_ENABLE_CALIPER=ON \ -D CALIPER_DIR=/path/to/caliper/installation -.. cmakeoption:: ENABLE_CALIPER +.. cmakeoption:: SUNDIALS_ENABLE_CALIPER Enable Caliper support @@ -886,15 +976,29 @@ Caliper support: .. note:: - Using Caliper requires setting :cmakeop:`SUNDIALS_BUILD_WITH_PROFILING` to + Using Caliper requires setting :cmakeop:`SUNDIALS_ENABLE_PROFILING` to ``ON``. + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_CALIPER`` + .. cmakeoption:: CALIPER_DIR Path to the root of a Caliper installation Default: None +.. cmakeoption:: SUNDIALS_ENABLE_CALIPER_CHECKS + + Perform Caliper compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``CALIPER_WORKS`` + .. _Installation.Options.CUDA: Building with CUDA @@ -915,7 +1019,7 @@ QR SUNLinearSolver ` will be built (see sections for the corresponding header files and libraries). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable CUDA support, set :cmakeop:`ENABLE_CUDA` to ``ON``. If CUDA is +To enable CUDA support, set :cmakeop:`SUNDIALS_ENABLE_CUDA` to ``ON``. If CUDA is installed in a nonstandard location, you may need to set :cmakeop:`CUDA_TOOLKIT_ROOT_DIR` to your CUDA Toolkit installation path. You will also need to set :cmakeop:`CMAKE_CUDA_ARCHITECTURES` to the CUDA @@ -928,15 +1032,19 @@ SUNDIALS with CUDA support for a system with an Ampere GPU: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_CUDA=ON \ + -D SUNDIALS_ENABLE_CUDA=ON \ -D CMAKE_CUDA_ARCHITECTURES="80" -.. cmakeoption:: ENABLE_CUDA +.. cmakeoption:: SUNDIALS_ENABLE_CUDA Enable CUDA support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_CUDA`` + .. cmakeoption:: CUDA_TOOLKIT_ROOT_DIR Path to the CUDA Toolkit installation @@ -984,7 +1092,7 @@ Batch SUNMatrix ` and :ref:`SUNLinearSolver for the corresponding header files). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable Ginkgo support, set :cmakeop:`ENABLE_GINKGO` to ``ON`` and set +To enable Ginkgo support, set :cmakeop:`SUNDIALS_ENABLE_GINKGO` to ``ON`` and set :cmakeop:`Ginkgo_DIR` to the root path of the Ginkgo installation. Additionally, set :cmakeop:`SUNDIALS_GINKGO_BACKENDS` to a semicolon-separated list of Ginkgo target architectures/executors. For example, the following command will @@ -997,24 +1105,28 @@ configure SUNDIALS with Ginkgo support using the reference, OpenMP, and CUDA -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_GINKGO=ON \ + -D SUNDIALS_ENABLE_GINKGO=ON \ -D Ginkgo_DIR=/path/to/ginkgo/installation \ -D SUNDIALS_GINKGO_BACKENDS="REF;OMP;CUDA" \ - -D ENABLE_CUDA=ON \ + -D SUNDIALS_ENABLE_CUDA=ON \ -D CMAKE_CUDA_ARCHITECTURES="80" \ - -D ENABLE_OPENMP=ON + -D SUNDIALS_ENABLE_OPENMP=ON .. note:: The SUNDIALS interfaces to Ginkgo are not compatible with extended precision (i.e., when :cmakeop:`SUNDIALS_PRECISION` is set to ``extended``). -.. cmakeoption:: ENABLE_GINKGO +.. cmakeoption:: SUNDIALS_ENABLE_GINKGO Enable Ginkgo support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_GINKGO`` + .. cmakeoption:: Ginkgo_DIR Path to the Ginkgo installation @@ -1034,6 +1146,16 @@ configure SUNDIALS with Ginkgo support using the reference, OpenMP, and CUDA The ``DPCPP`` option was changed to ``SYCL`` to align with Ginkgo's naming convention. +.. cmakeoption:: SUNDIALS_ENABLE_GINKGO_CHECKS + + Perform Ginkgo compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``GINKGO_WORKS`` + .. _Installation.Options.HIP: Building with HIP @@ -1051,7 +1173,7 @@ When HIP support is enabled, the :ref:`HIP NVector ` will be built corresponding header file and library). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable HIP support, set :cmakeop:`ENABLE_HIP` to ``ON`` and set +To enable HIP support, set :cmakeop:`SUNDIALS_ENABLE_HIP` to ``ON`` and set :cmakeop:`AMDGPU_TARGETS` to the desired target (e.g., ``gfx705``). In addition, set :cmakeop:`CMAKE_C_COMPILER` and :cmakeop:`CMAKE_CXX_COMPILER` to a HIP compatible compiler e.g., ``hipcc``. For example, the following command will @@ -1065,15 +1187,19 @@ configure SUNDIALS with HIP support for a system with an MI250X GPU: -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ -D CMAKE_C_COMPILER=hipcc \ -D CMAKE_CXX_COMPILER=hipcc \ - -D ENABLE_HIP=ON \ + -D SUNDIALS_ENABLE_HIP=ON \ -D AMDGPU_TARGETS="gfx90a" -.. cmakeoption:: ENABLE_HIP +.. cmakeoption:: SUNDIALS_ENABLE_HIP Enable HIP Support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_HIP`` + .. cmakeoption:: AMDGPU_TARGETS Specify which AMD GPUs to target @@ -1098,8 +1224,8 @@ will be built (see section :numref:`Installation.LibrariesAndHeaders.Vector.ParHyp` for the corresponding header file and library). -To enable *hypre* support, set :cmakeop:`ENABLE_MPI` to ``ON``, set -:cmakeop:`ENABLE_HYPRE` to ``ON``, and set :cmakeop:`HYPRE_DIR` to the root path +To enable *hypre* support, set :cmakeop:`SUNDIALS_ENABLE_MPI` to ``ON``, set +:cmakeop:`SUNDIALS_ENABLE_HYPRE` to ``ON``, and set :cmakeop:`HYPRE_DIR` to the root path of the *hypre* installation. For example, the following command will configure SUNDIALS with *hypre* support: @@ -1109,8 +1235,8 @@ SUNDIALS with *hypre* support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_MPI=ON \ - -D ENABLE_HYPRE=ON \ + -D SUNDIALS_ENABLE_MPI=ON \ + -D SUNDIALS_ENABLE_HYPRE=ON \ -D HYPRE_DIR=/path/to/hypre/installation .. note:: @@ -1118,18 +1244,32 @@ SUNDIALS with *hypre* support: SUNDIALS must be configured so that :cmakeop:`SUNDIALS_INDEX_SIZE` is compatible with ``HYPRE_BigInt`` in the *hypre* installation. -.. cmakeoption:: ENABLE_HYPRE +.. cmakeoption:: SUNDIALS_ENABLE_HYPRE Enable *hypre* support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_HYPRE`` + .. cmakeoption:: HYPRE_DIR Path to the *hypre* installation Default: None +.. cmakeoption:: SUNDIALS_ENABLE_HYPRE_CHECKS + + Perform *hypre* compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``HYPRE_WORKS`` + .. _Installation.Options.KLU: Building with KLU @@ -1149,7 +1289,7 @@ be built (see section :numref:`Installation.LibrariesAndHeaders.LinearSolver.KLU` for the corresponding header file and library). -To enable KLU support, set :cmakeop:`ENABLE_KLU` to ``ON``. For SuiteSparse +To enable KLU support, set :cmakeop:`SUNDIALS_ENABLE_KLU` to ``ON``. For SuiteSparse 7.4.0 and newer, set :cmakeop:`KLU_ROOT` to the root of the SuiteSparse installation. Alternatively, set :cmakeop:`KLU_INCLUDE_DIR` and :cmakeop:`KLU_LIBRARY_DIR` to the path to the header and library files, @@ -1162,15 +1302,19 @@ following command will configure SUNDIALS with KLU support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_KLU=ON \ + -D SUNDIALS_ENABLE_KLU=ON \ -D KLU_ROOT=/path/to/suitesparse/installation -.. cmakeoption:: ENABLE_KLU +.. cmakeoption:: SUNDIALS_ENABLE_KLU Enable KLU support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_KLU`` + .. cmakeoption:: KLU_ROOT Path to the SuiteSparse installation @@ -1189,6 +1333,16 @@ following command will configure SUNDIALS with KLU support: Default: None +.. cmakeoption:: SUNDIALS_ENABLE_KLU_CHECKS + + Perform KLU compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``KLU_WORKS`` + .. _Installation.Options.Kokkos: Building with Kokkos @@ -1208,7 +1362,7 @@ header file will be installed (see section header file). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable Kokkos support, set the :cmakeop:`ENABLE_KOKKOS` to ``ON`` and set +To enable Kokkos support, set the :cmakeop:`SUNDIALS_ENABLE_KOKKOS` to ``ON`` and set :cmakeop:`Kokkos_DIR` to root path of the Kokkos installation. For example, the following command will configure SUNDIALS with Kokkos support: @@ -1218,21 +1372,35 @@ following command will configure SUNDIALS with Kokkos support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_KOKKOS=ON \ + -D SUNDIALS_ENABLE_KOKKOS=ON \ -D Kokkos_DIR=/path/to/kokkos/installation -.. cmakeoption:: ENABLE_KOKKOS +.. cmakeoption:: SUNDIALS_ENABLE_KOKKOS Enable Kokkos support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_KOKKOS`` + .. cmakeoption:: Kokkos_DIR Path to the Kokkos installation. Default: None +.. cmakeoption:: SUNDIALS_ENABLE_KOKKOS_CHECKS + + Perform Kokkos compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``KOKKOS_WORKS`` + .. _Installation.Options.KokkosKernels: Building with KokkosKernels @@ -1254,8 +1422,8 @@ header files will be installed (see sections respectively, for the corresponding header files). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable KokkosKernels support, set :cmakeop:`ENABLE_KOKKOS` and -:cmakeop:`ENABLE_KOKKOS_KERNELS` to ``ON`` and set :cmakeop:`Kokkos_DIR` and +To enable KokkosKernels support, set :cmakeop:`SUNDIALS_ENABLE_KOKKOS` and +:cmakeop:`SUNDIALS_ENABLE_KOKKOS_KERNELS` to ``ON`` and set :cmakeop:`Kokkos_DIR` and :cmakeop:`KokkosKernels_DIR` to the root paths for the Kokkos and KokkosKernels installations, respectively. For example, the following command will configure SUNDIALS with Kokkos and KokkosKernels support: @@ -1266,23 +1434,37 @@ SUNDIALS with Kokkos and KokkosKernels support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_KOKKOS=ON \ + -D SUNDIALS_ENABLE_KOKKOS=ON \ -D Kokkos_DIR=/path/to/kokkos/installation \ - -D ENABLE_KOKKOS_KERNELS=ON \ + -D SUNDIALS_ENABLE_KOKKOS_KERNELS=ON \ -D KokkosKernels_DIR=/path/to/kokkoskernels/installation -.. cmakeoption:: ENABLE_KOKKOS_KERNELS +.. cmakeoption:: SUNDIALS_ENABLE_KOKKOS_KERNELS Enable KokkosKernels support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_KOKKOS_KERNELS`` + .. cmakeoption:: KokkosKernels_DIR Path to the KokkosKernels installation. Default: None +.. cmakeoption:: SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS + + Perform KokkosKernels compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``KOKKOS_KERNELS_WORKS`` + .. _Installation.Options.LAPACK: Building with LAPACK @@ -1306,7 +1488,7 @@ respectively, for the corresponding header files and libraries). Additionally, the :ref:`Arnoldi iteration SUNDomEigEstimator ` will be build (see :numref:`Installation.LibrariesAndHeaders.DomEigEst.Arnoldi`). -To enable LAPACK support, set :cmakeop:`ENABLE_LAPACK` to ``ON``. CMake will +To enable LAPACK support, set :cmakeop:`SUNDIALS_ENABLE_LAPACK` to ``ON``. CMake will attempt to find BLAS and LAPACK installations on the system and set the variables :cmakeop:`BLAS_LIBRARIES`, :cmakeop:`BLAS_LINKER_FLAGS`, :cmakeop:`LAPACK_LIBRARIES`, and :cmakeop:`LAPACK_LINKER_FLAGS`. You can set @@ -1324,7 +1506,7 @@ build. For example, this is sometimes needed when using OpenBLAS: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_LAPACK=ON \ + -D SUNDIALS_ENABLE_LAPACK=ON \ -D BLAS_LIBRARIES=/path/to/lapack/installation/lib/libopenblas.so \ -D LAPACK_LIBRARIES=/path/to/lapack/installation/lib/libopenblas.so @@ -1337,12 +1519,16 @@ build. For example, this is sometimes needed when using OpenBLAS: these options in earlier versions of SUNDIALS were ``lower`` and ``one``, respectively. -.. cmakeoption:: ENABLE_LAPACK +.. cmakeoption:: SUNDIALS_ENABLE_LAPACK Enable LAPACK support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_LAPACK`` + .. cmakeoption:: LAPACK_ROOT Path to the LAPACK installation @@ -1409,6 +1595,16 @@ build. For example, this is sometimes needed when using OpenBLAS: scheme if one can not be determined. If used, :cmakeop:`SUNDIALS_LAPACK_CASE` must also be set. +.. cmakeoption:: SUNDIALS_ENABLE_LAPACK_CHECKS + + Perform LAPACK compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``LAPACK_WORKS`` + .. _Installation.Options.MAGMA: Building with MAGMA @@ -1429,7 +1625,7 @@ When MAGMA support is enabled, the :ref:`MAGMA dense SUNMatrix respectively, for the corresponding header files and libraries). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable MAGMA support, set :cmakeop:`ENABLE_MAGMA` to ``ON``, +To enable MAGMA support, set :cmakeop:`SUNDIALS_ENABLE_MAGMA` to ``ON``, :cmakeop:`MAGMA_DIR` to the root path of MAGMA installation, and :cmakeop:`SUNDIALS_MAGMA_BACKENDS` to the desired MAGMA backend to use. For example, the following command will configure SUNDIALS with MAGMA support with @@ -1441,18 +1637,22 @@ the CUDA backend (targeting Ampere GPUs): -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_MAGMA=ON \ + -D SUNDIALS_ENABLE_MAGMA=ON \ -D MAGMA_DIR=/path/to/magma/installation \ -D SUNDIALS_MAGMA_BACKEND="CUDA" \ - -D ENABLE_CUDA=ON \ + -D SUNDIALS_ENABLE_CUDA=ON \ -D CMAKE_CUDA_ARCHITECTURES="80" -.. cmakeoption:: ENABLE_MAGMA +.. cmakeoption:: SUNDIALS_ENABLE_MAGMA Enable MAGMA support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_MAGMA`` + .. cmakeoption:: MAGMA_DIR Path to the MAGMA installation @@ -1469,6 +1669,16 @@ the CUDA backend (targeting Ampere GPUs): .. TODO(DJG): Change this options so it is HIP or SYCL if those options are enabled +.. cmakeoption:: SUNDIALS_ENABLE_MAGMA_CHECKS + + Perform MAGMA compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``MAGMA_WORKS`` + .. _Installation.Options.MPI: Building with MPI @@ -1501,7 +1711,7 @@ respectively, for the corresponding header files and libraries). applications will need to include the path for MPI headers and link against the corresponding MPI library. -To enable MPI support, set :cmakeop:`ENABLE_MPI` to ``ON``. If CMake is unable +To enable MPI support, set :cmakeop:`SUNDIALS_ENABLE_MPI` to ``ON``. If CMake is unable to locate an MPI installation, set the relevant ``MPI__COMPILER`` options to the desired MPI compilers. For example, the following command will configure SUNDIALS with MPI support: @@ -1512,14 +1722,18 @@ configure SUNDIALS with MPI support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_MPI=ON + -D SUNDIALS_ENABLE_MPI=ON -.. cmakeoption:: ENABLE_MPI +.. cmakeoption:: SUNDIALS_ENABLE_MPI Enable MPI support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_MPI`` + .. cmakeoption:: MPI_C_COMPILER The MPI C compiler e.g., ``mpicc`` @@ -1534,11 +1748,11 @@ configure SUNDIALS with MPI support: .. note:: - This option is only needed if MPI is enabled (:cmakeop:`ENABLE_MPI` is - ``ON``) and C++ examples are enabled (:cmakeop:`EXAMPLES_ENABLE_CXX` is + This option is only needed if MPI is enabled (:cmakeop:`SUNDIALS_ENABLE_MPI` is + ``ON``) and C++ examples are enabled (:cmakeop:`SUNDIALS_EXAMPLES_ENABLE_CXX` is ``ON``). All SUNDIALS solvers can be used from C++ MPI applications by without setting any additional configuration options other than - :cmakeop:`ENABLE_MPI`. + :cmakeop:`SUNDIALS_ENABLE_MPI`. .. cmakeoption:: MPI_Fortran_COMPILER @@ -1549,8 +1763,8 @@ configure SUNDIALS with MPI support: .. note:: This option is triggered only needed if MPI is enabled - (:cmakeop:`ENABLE_MPI` is ``ON``) and the Fortran interfaces are enabled - (:cmakeop:`BUILD_FORTRAN_MODULE_INTERFACE` is ``ON``). + (:cmakeop:`SUNDIALS_ENABLE_MPI` is ``ON``) and the Fortran interfaces are enabled + (:cmakeop:`SUNDIALS_ENABLE_FORTRAN` is ``ON``). .. cmakeoption:: MPIEXEC_EXECUTABLE @@ -1593,7 +1807,7 @@ When oneMKL support is enabled, the :ref:`oneMLK dense SUNMatrix respectively, for the corresponding header files and libraries). For more information on using SUNDIALS with GPUs, see :ref:`SUNDIALS.GPU`. -To enable the SUNDIALS oneMKL interface set :cmakeop:`ENABLE_ONEMKL` to ``ON`` +To enable the SUNDIALS oneMKL interface set :cmakeop:`SUNDIALS_ENABLE_ONEMKL` to ``ON`` and :cmakeop:`ONEMKL_DIR` to the root path of oneMKL installation. For example, the following command will configure SUNDIALS with oneMKL support: @@ -1603,15 +1817,19 @@ the following command will configure SUNDIALS with oneMKL support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_ONEMKL=ON \ + -D SUNDIALS_ENABLE_ONEMKL=ON \ -D ONEMKL_DIR=/path/to/onemkl/installation \ -.. cmakeoption:: ENABLE_ONEMKL +.. cmakeoption:: SUNDIALS_ENABLE_ONEMKL Enable oneMKL support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_ONEMKL`` + .. cmakeoption:: ONEMKL_DIR Path to oneMKL installation. @@ -1632,6 +1850,16 @@ the following command will configure SUNDIALS with oneMKL support: Default: ``OFF`` +.. cmakeoption:: SUNDIALS_ENABLE_ONEMKL_CHECKS + + Perform oneMKL compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``ONEMKL_WORKS`` + .. _Installation.Options.OpenMP: Building with OpenMP @@ -1644,7 +1872,7 @@ When OpenMP support is enabled, the :ref:`OpenMP NVector ` will be built (see section :numref:`Installation.LibrariesAndHeaders.Vector.OpenMP` for the corresponding header file and library). -To enable OpenMP support, set the :cmakeop:`ENABLE_OPENMP` to ``ON``. For +To enable OpenMP support, set the :cmakeop:`SUNDIALS_ENABLE_OPENMP` to ``ON``. For example, the following command will configure SUNDIALS with OpenMP support: .. code-block:: bash @@ -1653,14 +1881,18 @@ example, the following command will configure SUNDIALS with OpenMP support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_OPENMP=ON + -D SUNDIALS_ENABLE_OPENMP=ON -.. cmakeoption:: ENABLE_OPENMP +.. cmakeoption:: SUNDIALS_ENABLE_OPENMP Enable OpenMP support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_OPENMP`` + Building with OpenMP Device Offloading ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1674,7 +1906,7 @@ When OpenMP offloading support is enabled, the :ref:`OpenMPDEV NVector corresponding header file and library). To enable OpenMP device offloading support, set the -:cmakeop:`ENABLE_OPENMP_DEVICE` to ``ON``. For example, the following command +:cmakeop:`SUNDIALS_ENABLE_OPENMP_DEVICE` to ``ON``. For example, the following command will configure SUNDIALS with OpenMP device offloading support: .. code-block:: bash @@ -1683,14 +1915,28 @@ will configure SUNDIALS with OpenMP device offloading support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_OPENMP_DEVICE=ON + -D SUNDIALS_ENABLE_OPENMP_DEVICE=ON -.. cmakeoption:: ENABLE_OPENMP_DEVICE +.. cmakeoption:: SUNDIALS_ENABLE_OPENMP_DEVICE Enable OpenMP device offloading support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_OPENMP_DEVICE`` + +.. cmakeoption:: SUNDIALS_ENABLE_OPENMP_DEVICE_CHECKS + + Perform OpenMP device offloading compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``OPENMP_DEVICE_WORKS`` + .. _Installation.Options.PETSc: Building with PETSc @@ -1710,8 +1956,8 @@ sections :numref:`Installation.LibrariesAndHeaders.Vector.PETSc` and :numref:`Installation.LibrariesAndHeaders.NonlinearSolver.PETScSNES`, respectively, for the corresponding header files and libraries). -To enable PETSc support, set :cmakeop:`ENABLE_MPI` to ``ON``, set -:cmakeop:`ENABLE_PETSC` to ``ON``, and set :cmakeop:`PETSC_DIR` to the path of +To enable PETSc support, set :cmakeop:`SUNDIALS_ENABLE_MPI` to ``ON``, set +:cmakeop:`SUNDIALS_ENABLE_PETSC` to ``ON``, and set :cmakeop:`PETSC_DIR` to the path of the PETSc installation. Alternatively, a user can provide a list of include paths in :cmakeop:`PETSC_INCLUDES` and a list of complete paths to the PETSc libraries in :cmakeop:`PETSC_LIBRARIES`. For example, the following command will @@ -1723,16 +1969,20 @@ configure SUNDIALS with PETSc support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_MPI=ON \ - -D ENABLE_PETSC=ON \ + -D SUNDIALS_ENABLE_MPI=ON \ + -D SUNDIALS_ENABLE_PETSC=ON \ -D PETSC_DIR=/path/to/petsc/installation -.. cmakeoption:: ENABLE_PETSC +.. cmakeoption:: SUNDIALS_ENABLE_PETSC Enable PETSc support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_PETSC`` + .. cmakeoption:: PETSC_DIR Path to PETSc installation @@ -1755,6 +2005,16 @@ configure SUNDIALS with PETSc support: Default: None +.. cmakeoption:: SUNDIALS_ENABLE_PETSC_CHECKS + + Perform PETSc compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``PETSC_WORKS`` + .. _Installation.Options.PThreads: Building with PThreads @@ -1768,7 +2028,7 @@ When PThreads support is enabled, the :ref:`PThreads NVector :numref:`Installation.LibrariesAndHeaders.Vector.PThreads` for the corresponding header file and library). -To enable PThreads support, set :cmakeop:`ENABLE_PTHREAD` to ``ON``. For +To enable PThreads support, set :cmakeop:`SUNDIALS_ENABLE_PTHREAD` to ``ON``. For example, the following command will configure SUNDIALS with PThreads support: .. code-block:: bash @@ -1777,14 +2037,18 @@ example, the following command will configure SUNDIALS with PThreads support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_PTHREAD=ON + -D SUNDIALS_ENABLE_PTHREAD=ON -.. cmakeoption:: ENABLE_PTHREAD +.. cmakeoption:: SUNDIALS_ENABLE_PTHREAD Enable PThreads support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_PTHREAD`` + .. _Installation.Options.RAJA: Building with RAJA @@ -1800,11 +2064,11 @@ When RAJA support is enabled, the :ref:`RAJA NVector ` will be built (see section :numref:`Installation.LibrariesAndHeaders.Vector.RAJA` for the corresponding header files and libraries). -To enable RAJA support, set :cmakeop:`ENABLE_RAJA` to ``ON``, set +To enable RAJA support, set :cmakeop:`SUNDIALS_ENABLE_RAJA` to ``ON``, set :cmakeop:`RAJA_DIR` to the path of the RAJA installation, set :cmakeop:`SUNDIALS_RAJA_BACKENDS` to the desired backend (``CUDA``, ``HIP``, or -``SYCL``), and set :cmakeop:`ENABLE_CUDA`, :cmakeop:`ENABLE_HIP`, or -:cmakeop:`ENABLE_SYCL` to ``ON`` depending on the selected backend. For +``SYCL``), and set :cmakeop:`SUNDIALS_ENABLE_CUDA`, :cmakeop:`SUNDIALS_ENABLE_HIP`, or +:cmakeop:`SUNDIALS_ENABLE_SYCL` to ``ON`` depending on the selected backend. For example, the following command will configure SUNDIALS with RAJA support using the CUDA backend (targeting Ampere GPUs): @@ -1814,18 +2078,22 @@ the CUDA backend (targeting Ampere GPUs): -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_RAJA=ON \ + -D SUNDIALS_ENABLE_RAJA=ON \ -D RAJA_DIR=/path/to/raja/installation \ -D SUNDIALS_RAJA_BACKENDS="CUDA" \ - -D ENABLE_CUDA=ON \ + -D SUNDIALS_ENABLE_CUDA=ON \ -D CMAKE_CUDA_ARCHITECTURES="80" -.. cmakeoption:: ENABLE_RAJA +.. cmakeoption:: SUNDIALS_ENABLE_RAJA Enable RAJA support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_RAJA`` + .. cmakeoption:: RAJA_DIR Path to the RAJA installation @@ -1859,10 +2127,10 @@ SUNMatrix ` and :ref:`SuperLU_DIST SUNLinearSolver :numref:`Installation.LibrariesAndHeaders.LinearSolver.SuperLU_DIST` for the corresponding header files and libraries). -To enable SuperLU_DIST support, set :cmakeop:`ENABLE_MPI` to ``ON``, set -:cmakeop:`ENABLE_SUPERLUDIST` to ``ON``, and set :cmakeop:`SUPERLUDIST_DIR` to +To enable SuperLU_DIST support, set :cmakeop:`SUNDIALS_ENABLE_MPI` to ``ON``, set +:cmakeop:`SUNDIALS_ENABLE_SUPERLUDIST` to ``ON``, and set :cmakeop:`SUPERLUDIST_DIR` to the path where SuperLU_DIST is installed. If SuperLU_DIST was built with OpenMP -enabled, set :cmakeop:`SUPERLUDIST_OpenMP` and :cmakeop:`ENABLE_OPENMP` to +enabled, set :cmakeop:`SUPERLUDIST_OpenMP` and :cmakeop:`SUNDIALS_ENABLE_OPENMP` to ``ON``. For example, the following command will configure SUNDIALS with SuperLU_DIST support: @@ -1872,15 +2140,19 @@ SuperLU_DIST support: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_SUPERLUDIST=ON \ + -D SUNDIALS_ENABLE_SUPERLUDIST=ON \ -D SUPERLUDIST_DIR=/path/to/superludist/installation -.. cmakeoption:: ENABLE_SUPERLUDIST +.. cmakeoption:: SUNDIALS_ENABLE_SUPERLUDIST Enable SuperLU_DIST support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_SUPERLUDIST`` + .. cmakeoption:: SUPERLUDIST_DIR Path to SuperLU_DIST installation. @@ -1942,6 +2214,16 @@ SuperLU_DIST support: This option is deprecated. Use :cmakeop:`SUPERLUDIST_DIR`. +.. cmakeoption:: SUNDIALS_ENABLE_SUPERLUDIST_CHECKS + + Perform SuperLU_DIST compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``SUPERLUDIST_WORKS`` + .. _Installation.Options.SuperLU_MT: Building with SuperLU_MT @@ -1960,7 +2242,7 @@ When SuperLU_MT support is enabled, the :ref:`SuperLU_MT SUNLinearSolver :numref:`Installation.LibrariesAndHeaders.LinearSolver.SuperLU_MT` for the corresponding header file and library). -To enable SuperLU_MT support, set :cmakeop:`ENABLE_SUPERLUMT` to ``ON``, set +To enable SuperLU_MT support, set :cmakeop:`SUNDIALS_ENABLE_SUPERLUMT` to ``ON``, set :cmakeop:`SUPERLUMT_INCLUDE_DIR` and :cmakeop:`SUPERLUMT_LIBRARY_DIR` to the location of the header and library files, respectively, of the SuperLU_MT installation. Depending on the SuperLU_MT installation, it may also be necessary @@ -1977,7 +2259,7 @@ configure SUNDIALS with SuperLU_MT support using PThreads: -S SOLVER_DIR \ -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ - -D ENABLE_SUPERLUMT=ON \ + -D SUNDIALS_ENABLE_SUPERLUMT=ON \ -D SUPERLUMT_INCLUDE_DIR=/path/to/superlumt/installation/include/dir \ -D SUPERLUMT_LIBRARY_DIR=/path/to/superlumt/installation/library/dir \ -D SUPERLUMT_THREAD_TYPE="Pthread" @@ -1988,12 +2270,16 @@ configure SUNDIALS with SuperLU_MT support using PThreads: OpenMP or PThreads NVector then the SuperLU_MT installation should use the same threading type. -.. cmakeoption:: ENABLE_SUPERLUMT +.. cmakeoption:: SUNDIALS_ENABLE_SUPERLUMT Enable SuperLU_MT support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_SUPERLUMT`` + .. cmakeoption:: SUPERLUMT_INCLUDE_DIR Path to SuperLU_MT header files (under a typical SuperLU_MT @@ -2019,6 +2305,16 @@ configure SUNDIALS with SuperLU_MT support using PThreads: Default: Pthread +.. cmakeoption:: SUNDIALS_ENABLE_SUPERLUMT_CHECKS + + Perform SuperLU_MT compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``SUPERLUMT_WORKS`` + .. _Installation.Options.SYCL: Building with SYCL @@ -2031,7 +2327,7 @@ When SYCL support is enabled, the :ref:`SYCL NVector ` will be built (see section :numref:`Installation.LibrariesAndHeaders.Vector.SYCL` for the corresponding header file and library). -To enable SYCL support, set the :cmakeop:`ENABLE_SYCL` to ``ON``. For example, +To enable SYCL support, set the :cmakeop:`SUNDIALS_ENABLE_SYCL` to ``ON``. For example, the following command will configure SUNDIALS with SYCL support using Intel compilers: @@ -2044,9 +2340,9 @@ compilers: -D CMAKE_C_COMPILER=icx \ -D CMAKE_CXX_COMPILER=icpx \ -D CMAKE_CXX_FLAGS="-fsycl" \ - -D ENABLE_SYCL=ON + -D SUNDIALS_ENABLE_SYCL=ON -.. cmakeoption:: ENABLE_SYCL +.. cmakeoption:: SUNDIALS_ENABLE_SYCL Enable SYCL support @@ -2065,6 +2361,10 @@ compilers: any ahead of time compilation flags must be added to :cmakeop:`CMAKE_CXX_FLAGS`. + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_SYCL`` + .. cmakeoption:: SUNDIALS_SYCL_2020_UNSUPPORTED This advanced option disables the use of *some* features from the SYCL 2020 @@ -2089,7 +2389,7 @@ When Trilinos support is enabled, the :ref:`Trilinos Tpetra NVector :numref:`Installation.LibrariesAndHeaders.Vector.Trilinos` for the corresponding header file and library). -To enable Trilinos support, set the :cmakeop:`ENABLE_TRILINOS` to ``ON`` and set +To enable Trilinos support, set the :cmakeop:`SUNDIALS_ENABLE_TRILINOS` to ``ON`` and set :cmakeop:`Trilinos_DIR` to root path of the Trilinos installation. For example, the following command will configure SUNDIALS with Trilinos support: @@ -2102,12 +2402,16 @@ the following command will configure SUNDIALS with Trilinos support: -D ENABLE_TRILONOS=ON \ -D TRILINOS_DIR=/path/to/trilinos/installation -.. cmakeoption:: ENABLE_TRILINOS +.. cmakeoption:: SUNDIALS_ENABLE_TRILINOS Enable Trilinos support Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_TRILINOS`` + .. cmakeoption:: Trilinos_DIR Path to the Trilinos installation @@ -2125,8 +2429,8 @@ National Laboratory and is available from the `XBraid GitHub repository `__. SUNDIALS is regularly tested with the latest versions of XBraid, specifically up to version 3.0.0. -To enable XBraid support, set :cmakeop:`ENABLE_MPI` to ``ON``, set -:cmakeop:`ENABLE_XBRAID` to ``ON``, set :cmakeop:`XBRAID_DIR` to the root path +To enable XBraid support, set :cmakeop:`SUNDIALS_ENABLE_MPI` to ``ON``, set +:cmakeop:`SUNDIALS_ENABLE_XBRAID` to ``ON``, set :cmakeop:`XBRAID_DIR` to the root path of the XBraid installation. For example, the following command will configure SUNDIALS with XBraid support: @@ -2137,8 +2441,8 @@ SUNDIALS with XBraid support: -B BUILD_DIR \ -D CMAKE_INSTALL_PREFIX=INSTALL_DIR \ -D SUNDIALS_INDEX_SIZE="32" \ - -D ENABLE_MPI=ON \ - -D ENABLE_XBRAID=ON \ + -D SUNDIALS_ENABLE_MPI=ON \ + -D SUNDIALS_ENABLE_XBRAID=ON \ -D XBRAID_DIR=/path/to/xbraid/installation .. note:: @@ -2147,14 +2451,18 @@ SUNDIALS with XBraid support: to ``int`` and ``double`` respectively. As such SUNDIALS must be configured with :cmakeop:`SUNDIALS_INDEX_SIZE` set to ``32`` and :cmakeop:`SUNDIALS_PRECISION` set to ``double``. Additionally, SUNDIALS must - be configured with :cmakeop:`ENABLE_MPI` set to ``ON``. + be configured with :cmakeop:`SUNDIALS_ENABLE_MPI` set to ``ON``. -.. cmakeoption:: ENABLE_XBRAID +.. cmakeoption:: SUNDIALS_ENABLE_XBRAID Enable or disable the ARKStep + XBraid interface. Default: ``OFF`` + .. versionadded:: x.y.z + + Replaces the deprecated option ``ENABLE_XBRAID`` + .. cmakeoption:: XBRAID_DIR The root directory of the XBraid installation. @@ -2177,6 +2485,15 @@ SUNDIALS with XBraid support: Default: None +.. cmakeoption:: SUNDIALS_ENABLE_XBRAID_CHECKS + + Perform XBraid compatibility checks + + Default: ``ON`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``XBRAID_WORKS`` .. _Installation.Options.xSDK: @@ -2246,7 +2563,7 @@ command: make test -Additionally, if :cmakeop:`EXAMPLES_INSTALL` is set to ``ON``, then a set of +Additionally, if :cmakeop:`SUNDIALS_EXAMPLES_ENABLE_INSTALL` is set to ``ON``, then a set of smoke tests can be run after installing with the command: .. code-block:: bash @@ -2261,7 +2578,7 @@ Building and Running Examples Each of the SUNDIALS solvers is distributed with a set of examples demonstrating basic usage. To build and install the examples, set at least one of the ``EXAMPLES_ENABLE_`` options to ``ON``, and set -:cmakeop:`EXAMPLES_INSTALL` to ``ON``. Along side the example sources and +:cmakeop:`SUNDIALS_EXAMPLES_ENABLE_INSTALL` to ``ON``. Along side the example sources and outputs, automatically generated ``CMakeLists.txt`` configuration files (and ``Makefile`` files if on Linux/Unix systems) are installed referencing the *installed* SUNDIALS headers and libraries. @@ -2520,7 +2837,7 @@ include all the header files for the core C++ classes. | | ``sundials/sundials_profiler.hpp`` | +--------------+----------------------------------------------+ -When MPI support is enabled (:cmakeop:`ENABLE_MPI` is ``ON``), the following +When MPI support is enabled (:cmakeop:`SUNDIALS_ENABLE_MPI` is ``ON``), the following header file provides aliases between MPI data types and SUNDIALS types. The alias ``MPI_SUNREALTYPE`` is one of ``MPI_FLOAT``, ``MPI_DOUBLE``, or ``MPI_LONG_DOUBLE`` depending on the value of :cmakeop:`SUNDIALS_PRECISION`. The @@ -2534,7 +2851,7 @@ depending on the value of :cmakeop:`SUNDIALS_INDEX_SIZE`. | Headers | ``sundials/sundials_mpi_types.h`` | +--------------+----------------------------------------------+ -When XBraid support is enabled (:cmakeop:`ENABLE_XBRAID` is ``ON``), the +When XBraid support is enabled (:cmakeop:`SUNDIALS_ENABLE_XBRAID` is ``ON``), the following header file defines types and functions for interfacing SUNDIALS with XBraid. @@ -2734,7 +3051,7 @@ modules. Include the header files below to access the related functions. | | ``arkode/arkode_bbdpre.h`` | +--------------+----------------------------------------------+ -When XBraid support is enabled (:cmakeop:`ENABLE_XBRAID` is ``ON``), include the +When XBraid support is enabled (:cmakeop:`SUNDIALS_ENABLE_XBRAID` is ``ON``), include the ARKODE-XBraid interface header file and link to the interface library given below to use ARKODE and XBraid together. diff --git a/doc/shared/sundials/Profiling.rst b/doc/shared/sundials/Profiling.rst index faf0fb99fd..c0109a91f9 100644 --- a/doc/shared/sundials/Profiling.rst +++ b/doc/shared/sundials/Profiling.rst @@ -33,8 +33,8 @@ Enabling Profiling ------------------ To enable profiling, SUNDIALS must be built with the CMake option -:cmakeop:`SUNDIALS_BUILD_WITH_PROFILING` set to ``ON``. To utilize Caliper -support, the CMake option :cmakeop:`ENABLE_CALIPER` must also be set to ``ON``. +:cmakeop:`SUNDIALS_ENABLE_PROFILING` set to ``ON``. To utilize Caliper +support, the CMake option :cmakeop:`SUNDIALS_ENABLE_CALIPER` must also be set to ``ON``. More details in regards to configuring SUNDIALS with CMake can be found in :numref:`Installation`. diff --git a/doc/superbuild/source/conf.py b/doc/superbuild/source/conf.py index 03f767d16f..019ce15d13 100644 --- a/doc/superbuild/source/conf.py +++ b/doc/superbuild/source/conf.py @@ -48,6 +48,7 @@ "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinxcontrib.bibtex", + "sphinxcontrib.moderncmakedomain", "sphinxfortran.fortran_domain", ] @@ -64,6 +65,7 @@ "python": ("https://docs.python.org/3", ("../objects-python.inv", None)), "numpy": ("https://numpy.org/doc/stable/", ("../objects-numpy.inv", None)), "scipy": ("https://docs.scipy.org/doc/scipy/", ("../objects-scipy.inv", None)), + "cmake": ("https://www.cmake.org/cmake/help/latest", ("../objects-cmake.inv", None)), } # Only setup Google analytics for the readthedocs being deployed (not local). diff --git a/doc/superbuild/source/developers/benchmarks/diffusion.rst b/doc/superbuild/source/developers/benchmarks/diffusion.rst index 9b715bafac..430c6f8b92 100644 --- a/doc/superbuild/source/developers/benchmarks/diffusion.rst +++ b/doc/superbuild/source/developers/benchmarks/diffusion.rst @@ -187,7 +187,7 @@ Running ^^^^^^^ Based on the configuration, executables for each integrator and backend option -are built and installed in ``/diffusion_2D``. The +are built and installed in ``/diffusion_2D``. The executables follow the naming convention ```_diffusion_2D_`` where ```` is ``arkode``, ``cvode``, or ``ida`` and ```` is ``mpi`` for MPI only parallelism, diff --git a/doc/superbuild/source/developers/benchmarks/index.rst b/doc/superbuild/source/developers/benchmarks/index.rst index a175086989..c66573ab62 100644 --- a/doc/superbuild/source/developers/benchmarks/index.rst +++ b/doc/superbuild/source/developers/benchmarks/index.rst @@ -20,6 +20,30 @@ Benchmarks ========== +In this chapter we describe performance benchmark programs distributed with +SUNDIALS. To enable the benchmark programs and set the installation location use +the following CMake options. + +.. cmakeoption:: SUNDIALS_ENABLE_BENCHMARKS + + Enable the benchmark problems + + Default: ``OFF`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``BUILD_BENCHMARKS`` + +.. cmakeoption:: SUNDIALS_BENCHMARKS_INSTALL_PATH + + Full path to where to install the benchmark problems + + Default: ``CMAKE_INSTALL_PREFIX/benchmarks`` + + .. versionadded:: x.y.z + + Replaces the deprecated option ``BENCHMARKS_INSTALL_PATH`` + The following sections describe the SUNDIALS performance benchmark problems. .. toctree:: diff --git a/doc/superbuild/source/developers/cmake/Modules.rst b/doc/superbuild/source/developers/cmake/Modules.rst new file mode 100644 index 0000000000..090c7ccdc3 --- /dev/null +++ b/doc/superbuild/source/developers/cmake/Modules.rst @@ -0,0 +1,26 @@ +.. + Author(s): David J. Gardner @ LLNL + ----------------------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2025, Lawrence Livermore National Security, + University of Maryland Baltimore County, and the SUNDIALS contributors. + Copyright (c) 2013-2025, Lawrence Livermore National Security + and Southern Methodist University. + Copyright (c) 2002-2013, Lawrence Livermore National Security. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ----------------------------------------------------------------------------- + +.. _CMake.Modules: + +Modules +======= + +SUNDIALS defines several custom CMake functions and macros to simplify common +tasks in the build system, such as adding options or creating libraries. + +.. cmake-module:: ../../../../../cmake/macros/SundialsOption.cmake diff --git a/doc/superbuild/source/developers/cmake/Style.rst b/doc/superbuild/source/developers/cmake/Style.rst new file mode 100644 index 0000000000..c837d06970 --- /dev/null +++ b/doc/superbuild/source/developers/cmake/Style.rst @@ -0,0 +1,75 @@ +.. + Author(s): David J. Gardner @ LLNL + ----------------------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2025, Lawrence Livermore National Security, + University of Maryland Baltimore County, and the SUNDIALS contributors. + Copyright (c) 2013-2025, Lawrence Livermore National Security + and Southern Methodist University. + Copyright (c) 2002-2013, Lawrence Livermore National Security. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ----------------------------------------------------------------------------- + +.. _CMake.Style: + +Style +===== + +In this section we describe the CMake style conventions and guidelines for +SUNDIALS. + +Naming +------ + +SUNDIALS CMake cache variables (configuration options) must adhere to the +following naming conventions: + +#. To avoid naming collisions with other projects that include SUNDIALS as part + of their CMake build system, SUNDIALS CMake cache variables are prefixed with + ``SUNDIALS_``. + +#. Cache variables use screaming snake case, ``SUNDIALS_OPTION_NAME``. + +#. The ``SUNDIALS_`` prefix may be followed by a category name for grouping + related options, ``SUNDIALS_CATEGORY_OPTION_NAME``. For example, + + * ``SUNDIALS_TEST_`` for SUNDIALS testing options + + * ``SUNDIALS_EXAMPLES_`` for options related to the SUNDIALS examples + + * ``SUNDIALS_BENCHMARKS_`` for options related to SUNDIALS benchmarks + + * ``SUNDIALS_DEV_`` for development options + + * ``SUNDIALS_DEBUG_`` for debugging options + +#. Boolean options are named ``SUNDIALS_ENABLE_OPTION_NAME`` or + ``SUNDIALS_CATEGORY_ENABLE_OPTION_NAME``. + +#. Options to enable third party libraries are named + ``SUNDIALS_ENABLE_LIBRARY_NAME``. + +Formatting +---------- + +CMake files should be formatted with `cmake-format +`__. ``cmake-format`` can be installed with +``pip``: + +.. code-block:: console + + pip install cmake-format + +Individual files can be formatted with the command: + +.. code-block:: console + + cmake-format -i + +The ``.cmake-format.py`` file in the root of the project defines our +configuration for ``cmake-format``. diff --git a/doc/superbuild/source/developers/cmake/index.rst b/doc/superbuild/source/developers/cmake/index.rst new file mode 100644 index 0000000000..063dd1a0a5 --- /dev/null +++ b/doc/superbuild/source/developers/cmake/index.rst @@ -0,0 +1,31 @@ +.. + Author(s): David J. Gardner @ LLNL + ----------------------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2025, Lawrence Livermore National Security, + University of Maryland Baltimore County, and the SUNDIALS contributors. + Copyright (c) 2013-2025, Lawrence Livermore National Security + and Southern Methodist University. + Copyright (c) 2002-2013, Lawrence Livermore National Security. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ----------------------------------------------------------------------------- + +.. _CMake: + +***** +CMake +***** + +This chapter covers the CMake coding and style conventions for SUNDIALS to +ensure consistency and maintainability. + +.. toctree:: + :maxdepth: 1 + + Style + Modules diff --git a/doc/superbuild/source/developers/getting_started/Checklist.rst b/doc/superbuild/source/developers/getting_started/Checklist.rst index fb3765c5b8..69909ca798 100644 --- a/doc/superbuild/source/developers/getting_started/Checklist.rst +++ b/doc/superbuild/source/developers/getting_started/Checklist.rst @@ -33,8 +33,8 @@ system, etc. developers should adhere to the following checklist. #. It can be helpful to configure SUNDIALS using the C flags ``-Wall -Werror``. When building, modify your file to remove any error/warning messages output during compilation of your code. This can be done automatically with the - advanced CMake options ``ENABLE_ALL_WARNINGS`` and - ``ENABLE_WARNINGS_AS_ERRORS``. + advanced CMake options ``SUNDIALS_ENABLE_ALL_WARNINGS`` and + ``CMAKE_COMPILE_WARNING_AS_ERROR``. #. Configure your build with a minimal set of configuration options enabled (serial). Run ``make``, ``make test``, ``make install``, and diff --git a/doc/superbuild/source/developers/index.rst b/doc/superbuild/source/developers/index.rst index b69bb9809b..a86376393e 100644 --- a/doc/superbuild/source/developers/index.rst +++ b/doc/superbuild/source/developers/index.rst @@ -37,6 +37,7 @@ meant for SUNDIALS developers. History getting_started/index + cmake/index source_code/index commandline/index documentation/index diff --git a/doc/superbuild/source/developers/testing/Benchmarking.rst b/doc/superbuild/source/developers/testing/Benchmarking.rst index b53020a7bf..35a5dd2c6c 100644 --- a/doc/superbuild/source/developers/testing/Benchmarking.rst +++ b/doc/superbuild/source/developers/testing/Benchmarking.rst @@ -51,10 +51,10 @@ Adiak enabled for the CPT suite by setting the CMake options .. code-block:: bash $ cmake \ - > -DSUNDIALS_BUILD_WITH_PROFILING=ON \ - > -DENABLE_CALIPER=ON \ + > -DSUNDIALS_ENABLE_PROFILING=ON \ + > -DSUNDIALS_ENABLE_CALIPER=ON \ > -DCaliper_DIR=/path/to/caliper \ - > -DENABLE_ADIAK=ON \ + > -DSUNDIALS_ENABLE_ADIAK=ON \ > -Dadiak_DIR=/path/to/adiak/lib/cmake/adiak \ > -DSUNDIALS_TEST_ENABLE_DEV_TESTS=ON \ > -DSUNDIALS_TEST_ENABLE_PROFILING=ON \ @@ -70,7 +70,7 @@ requested have the ``output`` option defined to ensure output data is saved in a separate location from the test output. Otherwise, the ``.out`` files for each test will contain the output and the tests will fail. -Turning on the ``BUILD_BENCHMARKS`` option will build benchmarks. Running +Turning on the ``SUNDIALS_ENABLE_BENCHMARKS`` option will build benchmarks. Running ``make benchmark`` will execute all the available benchmarks and produce ``.cali`` output files for each one. To change what parameters benchmarks are run with, edit the respective ``CMakeLists.txt``. The ``BENCHMARK_VARS`` variable diff --git a/doc/superbuild/source/developers/testing/CTest.rst b/doc/superbuild/source/developers/testing/CTest.rst index 51cfe371de..c5f68bb6b5 100644 --- a/doc/superbuild/source/developers/testing/CTest.rst +++ b/doc/superbuild/source/developers/testing/CTest.rst @@ -136,13 +136,13 @@ real type precision, index size, and if the Fortran interfaces are enabled. See ``cmake/SundialsSetupCompilers.cmake`` for the exact set of flags. The current set of flags is compatible with with GNU and Clang compilers. -.. cmakeoption:: ENABLE_ALL_WARNINGS +.. cmakeoption:: SUNDIALS_ENABLE_ALL_WARNINGS Enable additional compiler warnings Default: OFF -.. cmakeoption:: ENABLE_WARNINGS_AS_ERRORS +.. cmakeoption:: CMAKE_COMPILE_WARNING_AS_ERROR Treat compiler warnings as errors @@ -151,14 +151,14 @@ set of flags is compatible with with GNU and Clang compilers. Additionally, the CI will run a subset of tests (no TPLs) using different sanitizers. These can be enabled with the following CMake options. -.. cmakeoption:: ENABLE_ADDRESS_SANITIZER +.. cmakeoption:: SUNDIALS_ENABLE_ADDRESS_SANITIZER Enable sanitizer to detect memory errors, adds the ``-fsanitize=address`` flag. Depending on the compiler, this may also detect memory leaks. Default: OFF -.. cmakeoption:: ENABLE_LEAK_SANITIZER +.. cmakeoption:: SUNDIALS_ENABLE_LEAK_SANITIZER Enable sanitizer to detect memory leaks, adds the ``-fsanitize=leak`` flag. Depending on the compiler, the leak sanitizer may be part of the @@ -166,14 +166,14 @@ sanitizers. These can be enabled with the following CMake options. Default: OFF -.. cmakeoption:: ENABLE_MEMORY_SANITIZER +.. cmakeoption:: SUNDIALS_ENABLE_MEMORY_SANITIZER Enable sanitizer to detect uninitialized memory errors, adds the ``-fsanitize=memory`` flag. Default: OFF -.. cmakeoption:: ENABLE_UNDEFINED_BEHAVIOR_SANITIZER +.. cmakeoption:: SUNDIALS_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER Enable sanitizer to detect undefined behavior errors, adds the ``-fsanitize=undefined`` flag. diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c50fa90fe7..41eb7d9635 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -17,16 +17,16 @@ # examples level CMakeLists.txt for SUNDIALS # --------------------------------------------------------------- -# We need this to ensure the installed templates have MPI when ENABLE_MPI=TRUE, -# at least until we convert all of the templates to use the SUNDIALS CMake -# target. +# We need this to ensure the installed templates have MPI when +# SUNDIALS_ENABLE_MPI=TRUE, at least until we convert all of the templates to +# use the SUNDIALS CMake target. # =================================================================== # Configure compilers for installed examples # =================================================================== foreach(lang ${_SUNDIALS_ENABLED_LANGS}) - if(ENABLE_MPI) + if(SUNDIALS_ENABLE_MPI) if(DEFINED MPI_${lang}_COMPILER) set(_EXAMPLES_${lang}_COMPILER "${MPI_${lang}_COMPILER}" @@ -40,7 +40,7 @@ foreach(lang ${_SUNDIALS_ENABLED_LANGS}) endforeach() # Disable some warnings for examples -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") endif() @@ -52,7 +52,7 @@ set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) # Set variables used in generating CMake and Makefiles for examples # =================================================================== -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) set(SHELL "sh") set(prefix "${CMAKE_INSTALL_PREFIX}") @@ -116,31 +116,31 @@ endif() # =================================================================== # Add ARKode examples -if(BUILD_ARKODE) +if(SUNDIALS_ENABLE_ARKODE) add_subdirectory(arkode) endif() # Add CVODE examples -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) add_subdirectory(cvode) endif() # Add CVODES Examples -if(BUILD_CVODES) +if(SUNDIALS_ENABLE_CVODES) add_subdirectory(cvodes) endif() # Add IDA examples -if(BUILD_IDA) +if(SUNDIALS_ENABLE_IDA) add_subdirectory(ida) endif() # Add IDAS examples -if(BUILD_IDAS) +if(SUNDIALS_ENABLE_IDAS) add_subdirectory(idas) endif() # Add KINSOL examples -if(BUILD_KINSOL) +if(SUNDIALS_ENABLE_KINSOL) add_subdirectory(kinsol) endif() diff --git a/examples/arkode/CMakeLists.txt b/examples/arkode/CMakeLists.txt index 748f26a773..55e8bb6367 100644 --- a/examples/arkode/CMakeLists.txt +++ b/examples/arkode/CMakeLists.txt @@ -18,67 +18,67 @@ # --------------------------------------------------------------- # C examples -if(EXAMPLES_ENABLE_C) +if(SUNDIALS_EXAMPLES_ENABLE_C) add_subdirectory(C_serial) - if(BUILD_NVECTOR_MANYVECTOR) + if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR) add_subdirectory(C_manyvector) endif() - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(C_openmp) endif() - if(ENABLE_OPENMP_DEVICE + if(SUNDIALS_ENABLE_OPENMP_DEVICE AND OPENMP_FOUND AND OPENMP_SUPPORTS_DEVICE_OFFLOADING) add_subdirectory(C_openmpdev) endif() - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(C_parallel) endif() - if(ENABLE_HYPRE AND HYPRE_FOUND) + if(SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) add_subdirectory(C_parhyp) endif() - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) add_subdirectory(C_klu) endif() - if(ENABLE_PETSC AND PETSC_FOUND) + if(SUNDIALS_ENABLE_PETSC AND PETSC_FOUND) add_subdirectory(C_petsc) endif() - if(BUILD_SUNLINSOL_SUPERLUMT) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) add_subdirectory(C_superlu-mt) endif() endif() # C++ examples -if(EXAMPLES_ENABLE_CXX) +if(SUNDIALS_EXAMPLES_ENABLE_CXX) add_subdirectory(CXX_serial) - if(ENABLE_LAPACK) + if(SUNDIALS_ENABLE_LAPACK) add_subdirectory(CXX_lapack) endif() - if(BUILD_NVECTOR_MANYVECTOR) + if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR) add_subdirectory(CXX_manyvector) endif() - if(ENABLE_MPI AND MPI_CXX_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND) add_subdirectory(CXX_parallel) endif() - if(ENABLE_MPI + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND - AND ENABLE_HYPRE + AND SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) add_subdirectory(CXX_parhyp) endif() - if(MPI_CXX_FOUND AND ENABLE_SUPERLUDIST) + if(MPI_CXX_FOUND AND SUNDIALS_ENABLE_SUPERLUDIST) add_subdirectory(CXX_superludist) endif() - if(ENABLE_XBRAID) + if(SUNDIALS_ENABLE_XBRAID) add_subdirectory(CXX_xbraid) endif() endif() # F2003 examples -if(BUILD_FORTRAN_MODULE_INTERFACE AND EXAMPLES_ENABLE_F2003) +if(SUNDIALS_ENABLE_FORTRAN AND SUNDIALS_EXAMPLES_ENABLE_FORTRAN) add_subdirectory(F2003_serial) add_subdirectory(F2003_custom) - if(ENABLE_MPI AND MPI_Fortran_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_Fortran_FOUND) add_subdirectory(F2003_parallel) endif() endif() diff --git a/examples/arkode/CXX_lapack/CMakeLists.txt b/examples/arkode/CXX_lapack/CMakeLists.txt index 7ca993c77d..1b96acff29 100644 --- a/examples/arkode/CXX_lapack/CMakeLists.txt +++ b/examples/arkode/CXX_lapack/CMakeLists.txt @@ -61,7 +61,7 @@ foreach(example_tuple ${examples_list}) endforeach() -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( arkode examples_list diff --git a/examples/arkode/CXX_manyvector/CMakeLists.txt b/examples/arkode/CXX_manyvector/CMakeLists.txt index b82a672c5c..63cd6014a3 100644 --- a/examples/arkode/CXX_manyvector/CMakeLists.txt +++ b/examples/arkode/CXX_manyvector/CMakeLists.txt @@ -73,7 +73,7 @@ foreach(example_tuple ${ARKODE_examples}) endforeach(example_tuple ${ARKODE_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( arkode ARKODE_examples diff --git a/examples/arkode/CXX_parallel/CMakeLists.txt b/examples/arkode/CXX_parallel/CMakeLists.txt index a3be783a97..b2b51df8d9 100644 --- a/examples/arkode/CXX_parallel/CMakeLists.txt +++ b/examples/arkode/CXX_parallel/CMakeLists.txt @@ -89,14 +89,14 @@ macro(build_examples examples_to_build lang) # Not all examples are added to the generated CMake file installed the # output and source files here - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Find all .out files for this example file(GLOB example_out ${example_target}*.out) # Install example source and out files install(FILES ${example} ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_parallel) endif() @@ -138,7 +138,7 @@ list(APPEND ARKODE_extras plot_heat2D_p.py) # ARKODE + CVODE MPI Examples # --------------------------- -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) set(examples_cvode "ark_diffusion_reaction_p.cpp\;\;--np 2 2 --imex\;1\;4\;exclude-single\;default" "ark_diffusion_reaction_p.cpp\;\;--np 2 2 --mri-arkstep\;1\;4\;exclude-single\;default" @@ -154,7 +154,7 @@ endif() # RAJA Examples # ------------- -if(ENABLE_RAJA +if(SUNDIALS_ENABLE_RAJA AND (SUNDIALS_PRECISION MATCHES "DOUBLE") AND (SUNDIALS_INDEX_SIZE MATCHES "32")) @@ -194,7 +194,7 @@ if(ENABLE_RAJA if(RAJA_BACKENDS MATCHES "CUDA") - if(BUILD_NVECTOR_CUDA) + if(SUNDIALS_ENABLE_NVECTOR_CUDA) set(cuda_raja_examples "ark_brusselator1D_task_local_nls.cpp\;USE_CUDA_NVEC\;--monitor\;1\;4\;develop\;2" "ark_brusselator1D_task_local_nls.cpp\;USE_CUDAUVM_NVEC\;--monitor\;1\;4\;exclude\;2" @@ -204,7 +204,7 @@ if(ENABLE_RAJA build_examples(cuda_raja_examples CUDA) endif() - if(BUILD_NVECTOR_RAJA AND (SUNDIALS_RAJA_BACKENDS MATCHES "CUDA")) + if(SUNDIALS_ENABLE_NVECTOR_RAJA AND (SUNDIALS_RAJA_BACKENDS MATCHES "CUDA")) set(raja_raja_examples "ark_brusselator1D_task_local_nls.cpp\;USE_RAJA_NVEC\;--monitor\;1\;4\;exclude\;2" ) @@ -216,7 +216,7 @@ if(ENABLE_RAJA # RAJA + HIP # ---------- - if(BUILD_NVECTOR_HIP AND (RAJA_BACKENDS MATCHES "HIP")) + if(SUNDIALS_ENABLE_NVECTOR_HIP AND (RAJA_BACKENDS MATCHES "HIP")) set(hip_raja_examples "ark_brusselator1D_task_local_nls.cpp\;USE_HIP_NVEC\;--monitor\;1\;4\;exclude\;2" ) @@ -228,7 +228,8 @@ if(ENABLE_RAJA # RAJA + OpenMP Offload # --------------------- - if(BUILD_NVECTOR_OPENMPDEV AND (RAJA_BACKENDS MATCHES "TARGET_OPENMP")) + if(SUNDIALS_ENABLE_NVECTOR_OPENMPDEV AND (RAJA_BACKENDS MATCHES + "TARGET_OPENMP")) set(openmpdev_raja_examples "ark_brusselator1D_task_local_nls.cpp\;USE_OMPDEV_NVEC\;--monitor\;1\;4\;exclude\;2" ) @@ -242,7 +243,7 @@ if(ENABLE_RAJA endif() endif() -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) set(examples_to_install "${parallel_examples}") set(_sundials_targets arkode nvecparallel) diff --git a/examples/arkode/CXX_parallel/README b/examples/arkode/CXX_parallel/README index 6bdb15ee7d..406a701f61 100644 --- a/examples/arkode/CXX_parallel/README +++ b/examples/arkode/CXX_parallel/README @@ -1,51 +1,3 @@ List of parallel ARKODE C++ examples ark_heat2D_p : 2-D heat equation (PCG with Jacobi preconditioner) - -Sample results: - - The example output was produced by running: - - mpiexec -n 4 ./ark_heat2D_p --np 2 2 - -The following CMake command was used to configure SUNDIALS: - -export OMP_NUM_THREADS=8 -cmake \ - -DSUNDIALS_INDEX_SIZE=64 \ - \ - -DCMAKE_INSTALL_PREFIX="${INST_DIR}" \ - -DEXAMPLES_INSTALL_PATH="${INST_DIR}/examples" \ - \ - -DENABLE_MPI=ON \ - -DMPI_C_COMPILER="${MPIDIR}/bin/mpicc" \ - -DMPI_CXX_COMPILER="${MPIDIR}/bin/mpicxx" \ - -DMPIEXEC_EXECUTABLE="${MPIDIR}/bin/mpirun" \ - \ - -DENABLE_OPENMP=ON \ - \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_CVODE=ON \ - -DBUILD_CVODES=OFF \ - -DBUILD_IDA=OFF \ - -DBUILD_IDAS=OFF \ - -DBUILD_ARKODE=ON \ - -DBUILD_KINSOL=OFF \ - -DBUILD_TESTING=ON \ - -DEXAMPLES_ENABLE_CXX=ON \ - \ - -DBLAS_ENABLE=OFF \ - -DBLAS_LIBRARIES="${BLAS_LIBRARIES}" \ - \ - -DENABLE_LAPACK=OFF \ - -DLAPACK_LIBRARIES="${LAPACK_LIBRARIES}" \ - \ - ../ - - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz - Operating System: Red Hat 7.6 - C/Fortran Compilers: gcc/gfortran v4.9.4 - MPI: Open MPI v3.1.2 diff --git a/examples/arkode/CXX_parhyp/CMakeLists.txt b/examples/arkode/CXX_parhyp/CMakeLists.txt index fc428685e0..e50f60b0ab 100644 --- a/examples/arkode/CXX_parhyp/CMakeLists.txt +++ b/examples/arkode/CXX_parhyp/CMakeLists.txt @@ -81,23 +81,24 @@ foreach(example_tuple ${ARKODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) endif() endforeach(example_tuple ${ARKODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -117,7 +118,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/arkode/CXX_parhyp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -131,7 +132,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/CXX_parhyp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_parhyp RENAME Makefile) endif() diff --git a/examples/arkode/CXX_parhyp/README b/examples/arkode/CXX_parhyp/README index b22ddb371b..3dcef4d277 100644 --- a/examples/arkode/CXX_parhyp/README +++ b/examples/arkode/CXX_parhyp/README @@ -4,47 +4,3 @@ List of parallel ARKODE C++ examples using hypre solver and preconditioner ark_heat2D_hypre_pfmg : 2-D heat equation with a SUNDIALS linear solver and user-supplied hypre preconditioner - -Sample results: - - The example output was produced by running: - - mpiexec -n 4 ./ark_heat2D_hypre_ls --np 2 2 - mpiexec -n 4 ./ark_heat2D_hypre_pfmg --np 2 2 - -The following CMake command was used to configure SUNDIALS: - -cmake \ - -DCMAKE_INSTALL_PREFIX:PATH="$PWD/../install_opt" \ - -DEXAMPLES_INSTALL_PATH:PATH="$PWD/../examples_opt" \ - -DCMAKE_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DMPI_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DCMAKE_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DMPI_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DCMAKE_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPI_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPIEXEC_EXECUTABLE=/usr/local/mpich-3.2.1/gnu/bin/mpiexec \ - -DCMAKE_C_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_Fortran_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_CXX_FLAGS:STRING="-O0 -g -fPIC" \ - -DOpenMP_C_FLAGS:STRING="-fopenmp" \ - -DOpenMP_CXX_FLAGS:STRING="-fopenmp" \ - -DSUNDIALS_PRECISION:STRING="double" \ - -DSUNDIALS_INDEX_TYPE:STRING="int64_t" \ - -DEXAMPLES_ENABLE_C:BOOL="1" \ - -DEXAMPLES_ENABLE_CXX:BOOL="1" \ - -DEXAMPLES_INSTALL:BOOL="1" \ - -DENABLE_MPI:BOOL="1" \ - -DENABLE_OPENMP:BOOL="1" \ - -DENABLE_PTHREAD:BOOL="1" \ - -DBUILD_SHARED_LIBS:BOOL="1" \ - -DENABLE_HYPRE:BOOL="1" \ - -DHYPRE_INCLUDE_DIR:STRING="/usr/local/hypre-2.14.0/gnu_int64/include" \ - -DHYPRE_LIBRARY_DIR:FILEPATH="/usr/local/hypre-2.14.0/gnu_int64/lib" \ - ../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz - Operating System: Ubuntu 18.04 - C/Fortran Compilers: gcc/gfortran v7.3.0 - MPI: MPICH v3.2.1 diff --git a/examples/arkode/CXX_serial/CMakeLists.txt b/examples/arkode/CXX_serial/CMakeLists.txt index 97b89c574c..b11c4d2a5b 100644 --- a/examples/arkode/CXX_serial/CMakeLists.txt +++ b/examples/arkode/CXX_serial/CMakeLists.txt @@ -44,7 +44,7 @@ set(ARKODE_examples # Header files to install set(ARKODE_headers) -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) list(APPEND ARKODE_examples "ark_advection_diffusion_reaction.cpp\;\;develop") list(APPEND ARKODE_headers "ark_advection_diffusion_reaction.hpp") endif() @@ -77,7 +77,7 @@ foreach(example_tuple ${ARKODE_examples}) target_link_libraries(${example_target} sundials_arkode sundials_nvecserial ${EXE_EXTRA_LINK_LIBS}) - if(BUILD_CVODE) + if(SUNDIALS_ENABLE_CVODE) target_link_libraries(${example_target} sundials_cvode) endif() endif() @@ -99,11 +99,11 @@ foreach(example_tuple ${ARKODE_examples}) endforeach(example_tuple ${ARKODE_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) - if(BUILD_CVODE) + if(SUNDIALS_ENABLE_CVODE) set(_include_cvode cvode) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_include_cvode_stubs cvode_fused_stubs) endif() endif() diff --git a/examples/arkode/CXX_serial/README b/examples/arkode/CXX_serial/README index d18b963d7e..8dbd4a8c44 100644 --- a/examples/arkode/CXX_serial/README +++ b/examples/arkode/CXX_serial/README @@ -2,46 +2,3 @@ List of serial ARKODE C++ examples ark_analytic_sys : simple stiff, linear, ODE system example ark_heat2D : 2-D heat equation - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/CXX_superludist/CMakeLists.txt b/examples/arkode/CXX_superludist/CMakeLists.txt index 31d1263234..d6c5d6c79c 100644 --- a/examples/arkode/CXX_superludist/CMakeLists.txt +++ b/examples/arkode/CXX_superludist/CMakeLists.txt @@ -65,7 +65,7 @@ else() endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( arkode_superludist ARKODE_examples diff --git a/examples/arkode/CXX_superludist/README b/examples/arkode/CXX_superludist/README index d13b79eae9..7772dad8b4 100644 --- a/examples/arkode/CXX_superludist/README +++ b/examples/arkode/CXX_superludist/README @@ -2,58 +2,3 @@ List of parallel ARKODE C++ examples ark_brusselator1D_FEM_sludist : stiff chemical kinetics PDE, with FEM spatial discretization (DIRK/SuperLU_DIST) - -Sample results: - - The example output was produced by running: - - mpiexec -n 1 ./ark_brusselator1D_FEM_sludist - - -The following CMake command was used to configure SUNDIALS: - -export OMP_NUM_THREADS=8 -cmake \ - -DSUNDIALS_INDEX_SIZE=64 \ - \ - -DCMAKE_INSTALL_PREFIX="${INST_DIR}" \ - -DEXAMPLES_INSTALL_PATH="${INST_DIR}/examples" \ - \ - -DENABLE_MPI=ON \ - -DMPI_C_COMPILER="${MPIDIR}/bin/mpicc" \ - -DMPI_CXX_COMPILER="${MPIDIR}/bin/mpicxx" \ - -DMPIEXEC_EXECUTABLE="${MPIDIR}/bin/mpirun" \ - \ - -DENABLE_OPENMP=ON \ - \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_CVODE=ON \ - -DBUILD_CVODES=OFF \ - -DBUILD_IDA=OFF \ - -DBUILD_IDAS=OFF \ - -DBUILD_ARKODE=ON \ - -DBUILD_KINSOL=OFF \ - -DBUILD_TESTING=ON \ - -DEXAMPLES_ENABLE_CXX=ON \ - \ - -DBLAS_ENABLE=OFF \ - -DBLAS_LIBRARIES="${BLAS_LIBRARIES}" \ - \ - -DENABLE_LAPACK=OFF \ - -DLAPACK_LIBRARIES="${LAPACK_LIBRARIES}" \ - \ - -DENABLE_SUPERLUDIST=ON \ - -DSUPERLUDIST_LIBRARY_DIR="${SUPERLUDIST_DIR}/lib64" \ - -DSUPERLUDIST_INCLUDE_DIR="${SUPERLUDIST_DIR}/include" \ - -DSUPERLUDIST_LIBRARIES="${LAPACK_LIBRARIES};${PARMETIS_LIBRARIES}" \ - -DSUPERLUDIST_OpenMP=ON \ - \ - ../ - - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz - Operating System: Red Hat 7.6 - C/Fortran Compilers: gcc/gfortran v4.9.4 - MPI: Open MPI v3.1.2 diff --git a/examples/arkode/CXX_xbraid/CMakeLists.txt b/examples/arkode/CXX_xbraid/CMakeLists.txt index 71a22f15b8..590133d347 100644 --- a/examples/arkode/CXX_xbraid/CMakeLists.txt +++ b/examples/arkode/CXX_xbraid/CMakeLists.txt @@ -25,7 +25,7 @@ set(ARKODE_examples "ark_heat2D_xbraid\;--x_print_level 0\;1\;4\;develop" "ark_heat2D_p_xbraid\;--np 2 1 2 --x_print_level 0\;1\;4\;develop") -if(ENABLE_HYPRE AND HYPRE_FOUND) +if(SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) set(ARKODE_examples_hypre "ark_heat2D_hypre_pfmg_xbraid\;--np 2 1 2 --x_print_level 0\;1\;4\;develop" ) @@ -88,14 +88,14 @@ foreach(example_tuple ${ARKODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) endif() endforeach(example_tuple ${ARKODE_examples}) -if(ENABLE_HYPRE AND HYPRE_FOUND) +if(SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) # Add the build and install targets for each example foreach(example_tuple ${ARKODE_examples_hypre}) @@ -143,9 +143,9 @@ if(ENABLE_HYPRE AND HYPRE_FOUND) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) endif() endforeach(example_tuple ${ARKODE_examples}) @@ -153,16 +153,16 @@ if(ENABLE_HYPRE AND HYPRE_FOUND) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file install(FILES README.md - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -184,7 +184,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/arkode/CXX_xbraid/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -200,7 +200,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/CXX_xbraid/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/CXX_xbraid RENAME Makefile) endif(UNIX) @@ -208,4 +208,4 @@ if(EXAMPLES_INSTALL) # add test_install target sundials_add_test_install(arkode CXX_xbraid) -endif(EXAMPLES_INSTALL) +endif(SUNDIALS_EXAMPLES_ENABLE_INSTALL) diff --git a/examples/arkode/C_klu/CMakeLists.txt b/examples/arkode/C_klu/CMakeLists.txt index 7239a1a036..2420a514a3 100644 --- a/examples/arkode/C_klu/CMakeLists.txt +++ b/examples/arkode/C_klu/CMakeLists.txt @@ -59,7 +59,7 @@ foreach(example_tuple ${examples_list}) endforeach() -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( arkode examples_list diff --git a/examples/arkode/C_manyvector/CMakeLists.txt b/examples/arkode/C_manyvector/CMakeLists.txt index 80fe49b609..7bf9d760d2 100644 --- a/examples/arkode/C_manyvector/CMakeLists.txt +++ b/examples/arkode/C_manyvector/CMakeLists.txt @@ -56,23 +56,24 @@ foreach(example_tuple ${ARKODE_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) endif() endforeach(example_tuple ${ARKODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) endforeach(extrafile ${ARKODE_extras}) # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -93,7 +94,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_manyvector/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_manyvector) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -107,7 +108,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_manyvector/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_manyvector + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_manyvector RENAME Makefile) endif() diff --git a/examples/arkode/C_manyvector/README b/examples/arkode/C_manyvector/README index a4431e9171..fe006e6436 100644 --- a/examples/arkode/C_manyvector/README +++ b/examples/arkode/C_manyvector/README @@ -1,46 +1,3 @@ List of ManyVector ARKODE C examples ark_brusselator1D_mv : stiff chemical kinetics PDE system (IMEX/GMRES) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/C_openmp/CMakeLists.txt b/examples/arkode/C_openmp/CMakeLists.txt index 22c83f27c8..11c93ec8ac 100644 --- a/examples/arkode/C_openmp/CMakeLists.txt +++ b/examples/arkode/C_openmp/CMakeLists.txt @@ -57,23 +57,24 @@ foreach(example_tuple ${ARKODE_examples}) ${EXE_EXTRA_LINK_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmp) endif() endforeach(example_tuple ${ARKODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmp) # Install the extra files foreach(extrafile ${ARKODE_extras_OMP}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmp) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -93,7 +94,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -107,7 +108,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmp RENAME Makefile) endif() diff --git a/examples/arkode/C_openmp/README b/examples/arkode/C_openmp/README index fbeead4ca0..fd9030061f 100644 --- a/examples/arkode/C_openmp/README +++ b/examples/arkode/C_openmp/README @@ -2,52 +2,3 @@ List of OpenMP ARKODE C examples ark_brusselator1D_omp : stiff chemical kinetics PDE system example (DIRK/BAND) ark_heat1D_omp : stiff 1D heat PDE example (DIRK/PCG) - -Sample results: - - SUNDIALS was built with OpenMP enabled, and the example output was run using 4 OpenMP threads: - - BASH/SH: export OMP_NUM_THREADS=4 - TCSH/CSH: setenv OMP_NUM_THREADS 4 - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/C_openmpdev/CMakeLists.txt b/examples/arkode/C_openmpdev/CMakeLists.txt index de9ed44b58..aa9e95ca38 100644 --- a/examples/arkode/C_openmpdev/CMakeLists.txt +++ b/examples/arkode/C_openmpdev/CMakeLists.txt @@ -57,23 +57,24 @@ foreach(example_tuple ${ARKODE_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) endif() endforeach(example_tuple ${ARKODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) # Install the extra files foreach(extrafile ${ARKODE_extras_OMP}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -93,7 +94,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_openmpdev/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -107,7 +108,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_openmpdev/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_openmpdev RENAME Makefile) endif() diff --git a/examples/arkode/C_openmpdev/README b/examples/arkode/C_openmpdev/README index 9e91406316..9a25a50092 100644 --- a/examples/arkode/C_openmpdev/README +++ b/examples/arkode/C_openmpdev/README @@ -3,37 +3,3 @@ List of OpenMP device offloading ARKODE C examples ark_analytic_nonlin_ompdev : simple nonstiff, nonlinear ODE (ERK) ark_heat1D_ompdev : stiff 1D heat PDE example (DIRK/PCG) ark_heat1D_adapt_ompdev : stiff 1D heat PDE, adaptive mesh (DIRK/PCG/ARKodeResize) - -Sample results: - - SUNDIALS was built with OpenMP enabled, and the example output was run using - LLNL LC's wrapped xlc compiler for gpu program compilation: xlc-gpu - -The following CMake command was used to configure SUNDIALS: - -cmake \ --DCMAKE_C_COMPILER=xlc-gpu \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DBUILD_TESTING=ON \ --DCMAKE_INSTALL_PREFIX=/usr/local/sundials \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_INSTALL_PATH=/user/local/sundials/examples \ --DEXAMPLES_INSTALL=ON \ --DENABLE_OPENMP=ON \ --DENABLE_OPENMP_DEVICE=ON \ --DOPENMP_DEVICE_WORKS=ON \ --DSUNDIALS_INDEX_SIZE=64 \ --DSUNDIALS_PRECISION=double \ -../sundials - - System Architecture: ppc64le - Processor Type: IBM POWER8 @ 2.5GHz - Operating System: Red Hat 7.3 - C Compiler: xlc-gpu diff --git a/examples/arkode/C_parallel/CMakeLists.txt b/examples/arkode/C_parallel/CMakeLists.txt index 25eb728b22..2daf63c239 100644 --- a/examples/arkode/C_parallel/CMakeLists.txt +++ b/examples/arkode/C_parallel/CMakeLists.txt @@ -101,23 +101,24 @@ foreach(example_tuple ${ARKODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_parallel) endif() endforeach(example_tuple ${ARKODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_parallel) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_parallel) endforeach(extrafile ${ARKODE_extras}) # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -137,7 +138,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -151,7 +152,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_parallel RENAME Makefile) endif() diff --git a/examples/arkode/C_parallel/README b/examples/arkode/C_parallel/README index ff6cd45b19..f430d2f115 100644 --- a/examples/arkode/C_parallel/README +++ b/examples/arkode/C_parallel/README @@ -5,45 +5,3 @@ List of parallel ARKODE C examples ark_diurnal_kry_p : 2-D 2-species diurnal advection-diffusion ark_brusselator1D_task_local_nls : 1-D 3-species advection-reaction problem with a user-defined nonlinear solver - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/C_parhyp/CMakeLists.txt b/examples/arkode/C_parhyp/CMakeLists.txt index c0acab4c96..27210409a6 100644 --- a/examples/arkode/C_parhyp/CMakeLists.txt +++ b/examples/arkode/C_parhyp/CMakeLists.txt @@ -53,7 +53,7 @@ foreach(example_tuple ${ARKODE_examples}) endforeach(example_tuple ${ARKODE_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( arkode ARKODE_examples diff --git a/examples/arkode/C_parhyp/README b/examples/arkode/C_parhyp/README index f96d8da374..90e9f473b2 100644 --- a/examples/arkode/C_parhyp/README +++ b/examples/arkode/C_parhyp/README @@ -1,47 +1,3 @@ List of parallel ARKODE C examples ark_diurnal_kry_ph : 2-D 2-species diurnal advection-diffusion - -Sample results: - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/C_petsc/CMakeLists.txt b/examples/arkode/C_petsc/CMakeLists.txt index f73b30161b..b032821320 100644 --- a/examples/arkode/C_petsc/CMakeLists.txt +++ b/examples/arkode/C_petsc/CMakeLists.txt @@ -21,7 +21,7 @@ # for examples excluded from 'make test' in releases # Examples using SUNDIALS linear solvers -if(BUILD_SUNNONLINSOL_PETSCSNES) +if(SUNDIALS_ENABLE_SUNNONLINSOL_PETSCSNES) set(ARKODE_examples "ark_petsc_ex25\;1\;1\;develop") endif() @@ -36,7 +36,7 @@ endif() # Specify libraries to link against set(ARKODE_LIB sundials_arkode) set(NVECP_LIB sundials_nvecpetsc) -if(BUILD_SUNNONLINSOL_PETSCSNES) +if(SUNDIALS_ENABLE_SUNNONLINSOL_PETSCSNES) set(SUNNLS_LIB sundials_sunnonlinsolpetscsnes) endif() @@ -73,17 +73,18 @@ foreach(example_tuple ${ARKODE_examples}) endif() # install example - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_petsc) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_petsc) endif() endforeach(example_tuple ${ARKODE_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_petsc) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_petsc) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "ARKODE") @@ -102,7 +103,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_petsc/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_petsc) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_petsc) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -116,7 +117,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/C_petsc/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_petsc + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_petsc RENAME Makefile) endif() diff --git a/examples/arkode/C_petsc/README b/examples/arkode/C_petsc/README index dcd69bb960..c71502ffe9 100644 --- a/examples/arkode/C_petsc/README +++ b/examples/arkode/C_petsc/README @@ -1,23 +1,3 @@ List of PETSc ARKode examples ark_petsc_ex25 : 1-D Brusselator based on PETSc TS ex25.c - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=ON \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_PETSC=ON \ --DPETSC_DIR=/home/user1/petsc \ -../sundials diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 3416b105a0..8ff0d6c5aa 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -101,7 +101,7 @@ set(ARKODE_examples "ark_robertson.c\;\;exclude-single" "ark_twowaycouple_mri.c\;\;develop") -if(SUNDIALS_BUILD_WITH_MONITORING) +if(SUNDIALS_ENABLE_MONITORING) list(APPEND ARKODE_examples "ark_brusselator_fp.c\;1\;exclude-single") endif() @@ -161,14 +161,14 @@ foreach(example_tuple ${ARKODE_examples}) EXAMPLE_TYPE ${example_type}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example} ${test_name}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_serial) endif() endforeach(example_tuple ${ARKODE_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( arkode ARKODE_examples CMAKE_TEMPLATE cmakelists_C_ex.in diff --git a/examples/arkode/C_serial/README b/examples/arkode/C_serial/README index 5d928f9638..c5c2dc0f8d 100644 --- a/examples/arkode/C_serial/README +++ b/examples/arkode/C_serial/README @@ -16,45 +16,3 @@ List of serial ARKODE C examples with root-finding (DIRK/DENSE) ark_robertson_constraints : stiff chemical kinetics ODE system (DIRKDENSE) with constraints - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/C_superlu-mt/CMakeLists.txt b/examples/arkode/C_superlu-mt/CMakeLists.txt index b550e8e1ef..90708a4d64 100644 --- a/examples/arkode/C_superlu-mt/CMakeLists.txt +++ b/examples/arkode/C_superlu-mt/CMakeLists.txt @@ -62,12 +62,12 @@ foreach(example_tuple ${examples_list}) endforeach() -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_superlumt) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/C_superlumt) endforeach(extrafile ${extras}) sundials_install_examples( diff --git a/examples/arkode/F2003_custom/CMakeLists.txt b/examples/arkode/F2003_custom/CMakeLists.txt index 8035da75af..128af1b6e0 100644 --- a/examples/arkode/F2003_custom/CMakeLists.txt +++ b/examples/arkode/F2003_custom/CMakeLists.txt @@ -71,9 +71,9 @@ foreach(example_tuple ${FARKODE_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out ${FARKODEsources} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) endif() endforeach(example_tuple ${FARKODE_examples}) @@ -105,20 +105,20 @@ foreach(example_tuple ${FARKODE_tests}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${FARKODEsources} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) endif() endforeach(example_tuple ${FARKODE_tests}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -145,7 +145,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/F2003_custom/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_custom) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -162,7 +162,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/F2003_custom/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_custom + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_custom RENAME Makefile) endif() diff --git a/examples/arkode/F2003_parallel/CMakeLists.txt b/examples/arkode/F2003_parallel/CMakeLists.txt index 1ac3dd872d..bfa8cd910c 100644 --- a/examples/arkode/F2003_parallel/CMakeLists.txt +++ b/examples/arkode/F2003_parallel/CMakeLists.txt @@ -90,20 +90,20 @@ foreach(example_tuple ${FARKODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel) endif() endforeach(example_tuple ${FARKODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -144,7 +144,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/F2003_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -158,7 +158,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/F2003_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_parallel RENAME Makefile) endif() diff --git a/examples/arkode/F2003_serial/CMakeLists.txt b/examples/arkode/F2003_serial/CMakeLists.txt index a0f1dfb247..1392046e7c 100644 --- a/examples/arkode/F2003_serial/CMakeLists.txt +++ b/examples/arkode/F2003_serial/CMakeLists.txt @@ -100,14 +100,14 @@ foreach(example_tuple ${FARKODE_examples}) EXAMPLE_TYPE ${example_type}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${test_name}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) endif() endforeach(example_tuple ${FARKODE_examples}) # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_sunlinsolklu sundials_fsunlinsolklu_mod) @@ -140,9 +140,9 @@ if(BUILD_SUNLINSOL_KLU) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) endif() endforeach(example_tuple ${FARKODE_examples_KLU}) @@ -150,7 +150,7 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackdense @@ -182,9 +182,9 @@ if(BUILD_SUNLINSOL_LAPACKDENSE) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLLAPACK_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) endif() endforeach(example_tuple ${FARKODE_examples_LAPACK}) @@ -218,20 +218,20 @@ foreach(example_tuple ${FARKODE_tests}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) endif() endforeach(example_tuple ${FARKODE_tests}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${ARKODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -255,7 +255,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/F2003_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -269,7 +269,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/arkode/F2003_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/arkode/F2003_serial RENAME Makefile) endif() diff --git a/examples/cvode/CMakeLists.txt b/examples/cvode/CMakeLists.txt index ed0b51f7b6..d9600f35b2 100644 --- a/examples/cvode/CMakeLists.txt +++ b/examples/cvode/CMakeLists.txt @@ -19,80 +19,80 @@ # --------------------------------------------------------------- # C examples -if(EXAMPLES_ENABLE_C) +if(SUNDIALS_EXAMPLES_ENABLE_C) add_subdirectory(serial) - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(C_openmp) endif() - if(ENABLE_OPENMP_DEVICE + if(SUNDIALS_ENABLE_OPENMP_DEVICE AND OPENMP_FOUND AND OPENMP_SUPPORTS_DEVICE_OFFLOADING) add_subdirectory(C_openmpdev) endif() - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) - if(BUILD_NVECTOR_MPIMANYVECTOR) + if(SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR) add_subdirectory(C_mpimanyvector) endif() endif() - if(ENABLE_HYPRE AND HYPRE_FOUND) + if(SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) add_subdirectory(parhyp) endif() - if(ENABLE_PETSC AND PETSC_FOUND) + if(SUNDIALS_ENABLE_PETSC AND PETSC_FOUND) add_subdirectory(petsc) endif() endif() # CXX examples -if(EXAMPLES_ENABLE_CXX) +if(SUNDIALS_EXAMPLES_ENABLE_CXX) add_subdirectory(CXX_serial) - if(ENABLE_HIP) + if(SUNDIALS_ENABLE_HIP) add_subdirectory(hip) endif() - if(ENABLE_MAGMA AND MAGMA_FOUND) + if(SUNDIALS_ENABLE_MAGMA AND MAGMA_FOUND) add_subdirectory(magma) endif() - if(ENABLE_GINKGO AND Ginkgo_FOUND) + if(SUNDIALS_ENABLE_GINKGO AND Ginkgo_FOUND) add_subdirectory(ginkgo) endif() - if(BUILD_SUNLINSOL_KOKKOSDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_KOKKOSDENSE) add_subdirectory(kokkos) endif() - if(BUILD_SUNLINSOL_ONEMKLDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_ONEMKLDENSE) add_subdirectory(CXX_onemkl) endif() - if(ENABLE_RAJA AND RAJA_FOUND) + if(SUNDIALS_ENABLE_RAJA AND RAJA_FOUND) add_subdirectory(raja) endif() - if(BUILD_NVECTOR_SYCL) + if(SUNDIALS_ENABLE_NVECTOR_SYCL) add_subdirectory(CXX_sycl) endif() # MPI based examples - if(ENABLE_MPI AND MPI_CXX_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND) add_subdirectory(CXX_parallel) # hypre examples - if(ENABLE_HYPRE AND HYPRE_FOUND) + if(SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) add_subdirectory(CXX_parhyp) endif() # SuperLU_DIST examples - if(ENABLE_SUPERLUDIST AND SUPERLUDIST_FOUND) + if(SUNDIALS_ENABLE_SUPERLUDIST AND SUPERLUDIST_FOUND) add_subdirectory(superludist) endif() endif() endif() # Fortran examples -if(BUILD_FORTRAN_MODULE_INTERFACE AND EXAMPLES_ENABLE_F2003) +if(SUNDIALS_ENABLE_FORTRAN AND SUNDIALS_EXAMPLES_ENABLE_FORTRAN) add_subdirectory(F2003_serial) - if(ENABLE_MPI) + if(SUNDIALS_ENABLE_MPI) add_subdirectory(F2003_parallel) endif() endif() # CUDA examples -if(EXAMPLES_ENABLE_CUDA) +if(SUNDIALS_EXAMPLES_ENABLE_CUDA) - if(ENABLE_CUDA AND CMAKE_CUDA_COMPILER) + if(SUNDIALS_ENABLE_CUDA AND CMAKE_CUDA_COMPILER) add_subdirectory(cuda) endif() diff --git a/examples/cvode/CXX_onemkl/CMakeLists.txt b/examples/cvode/CXX_onemkl/CMakeLists.txt index d9667493a2..976aea76cc 100644 --- a/examples/cvode/CXX_onemkl/CMakeLists.txt +++ b/examples/cvode/CXX_onemkl/CMakeLists.txt @@ -65,7 +65,7 @@ foreach(example_tuple ${CVODE_examples}) endforeach() # Install the targets -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( cvode CVODE_examples diff --git a/examples/cvode/CXX_parallel/CMakeLists.txt b/examples/cvode/CXX_parallel/CMakeLists.txt index 12fa04d049..88aeef35b2 100644 --- a/examples/cvode/CXX_parallel/CMakeLists.txt +++ b/examples/cvode/CXX_parallel/CMakeLists.txt @@ -30,7 +30,7 @@ set(CVODE_extras plot_heat2D_p.py) set(CVODE_LIB sundials_cvode) set(NVECP_LIB sundials_nvecparallel) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -80,29 +80,30 @@ foreach(example_tuple ${CVODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) # Install the extra files foreach(extrafile ${CVODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -119,7 +120,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/CXX_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -133,11 +134,11 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/CXX_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parallel RENAME Makefile) endif(UNIX) # add test_install target sundials_add_test_install(cvode CXX_parallel) -endif(EXAMPLES_INSTALL) +endif(SUNDIALS_EXAMPLES_ENABLE_INSTALL) diff --git a/examples/cvode/CXX_parallel/README b/examples/cvode/CXX_parallel/README index f69f790b97..58010d2161 100644 --- a/examples/cvode/CXX_parallel/README +++ b/examples/cvode/CXX_parallel/README @@ -1,43 +1,3 @@ List of parallel CVODE C++ examples cv_heat2D_p : 2-D heat equation (PCG with Jacobi preconditioner) - -Sample results: - - The example output was produced by running: - - mpiexec -n 4 ./cv_heat2D_p --np 2 2 - -The following CMake command was used to configure SUNDIALS: - -cmake \ - -DCMAKE_INSTALL_PREFIX:PATH="$PWD/../install_opt" \ - -DEXAMPLES_INSTALL_PATH:PATH="$PWD/../examples_opt" \ - -DCMAKE_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DMPI_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DCMAKE_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DMPI_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DCMAKE_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPI_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPIEXEC_EXECUTABLE=/usr/local/mpich-3.2.1/gnu/bin/mpiexec \ - -DCMAKE_C_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_Fortran_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_CXX_FLAGS:STRING="-O0 -g -fPIC" \ - -DOpenMP_C_FLAGS:STRING="-fopenmp" \ - -DOpenMP_CXX_FLAGS:STRING="-fopenmp" \ - -DSUNDIALS_PRECISION:STRING="double" \ - -DSUNDIALS_INDEX_TYPE:STRING="int64_t" \ - -DEXAMPLES_ENABLE_C:BOOL="1" \ - -DEXAMPLES_ENABLE_CXX:BOOL="1" \ - -DEXAMPLES_INSTALL:BOOL="1" \ - -DMPI_ENABLE:BOOL="1" \ - -DOPENMP_ENABLE:BOOL="1" \ - -DPTHREAD_ENABLE:BOOL="1" \ - -DBUILD_SHARED_LIBS:BOOL="1" \ - ../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz - Operating System: Ubuntu 18.04 - C/Fortran Compilers: gcc/gfortran v7.3.0 - MPI: MPICH v3.2.1 diff --git a/examples/cvode/CXX_parhyp/CMakeLists.txt b/examples/cvode/CXX_parhyp/CMakeLists.txt index 878024b124..5eea39485d 100644 --- a/examples/cvode/CXX_parhyp/CMakeLists.txt +++ b/examples/cvode/CXX_parhyp/CMakeLists.txt @@ -31,7 +31,7 @@ set(CVODE_extras plot_heat2D_p.py) set(CVODE_LIB sundials_cvode) set(NVECP_LIB sundials_nvecparallel) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -82,29 +82,30 @@ foreach(example_tuple ${CVODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) # Install the extra files foreach(extrafile ${CVODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -121,7 +122,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/CXX_parhyp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -135,11 +136,11 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/CXX_parhyp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/CXX_parhyp RENAME Makefile) endif(UNIX) # add test_install target sundials_add_test_install(cvode CXX_parhyp) -endif(EXAMPLES_INSTALL) +endif(SUNDIALS_EXAMPLES_ENABLE_INSTALL) diff --git a/examples/cvode/CXX_parhyp/README b/examples/cvode/CXX_parhyp/README index f6558addf6..f64c338452 100644 --- a/examples/cvode/CXX_parhyp/README +++ b/examples/cvode/CXX_parhyp/README @@ -4,47 +4,3 @@ List of parallel CVODE C++ examples using hypre solver cv_heat2D_hypre_pfmg : 2-D heat equation with a SUNDIALS linear solver and user-supplied hypre preconditioner - -Sample results: - - The example output was produced by running: - - mpiexec -n 4 ./cv_heat2D_hypre_ls --np 2 2 - mpiexec -n 4 ./cv_heat2D_hypre_pfmg --np 2 2 - -The following CMake command was used to configure SUNDIALS: - -cmake \ - -DCMAKE_INSTALL_PREFIX:PATH="$PWD/../install_opt" \ - -DEXAMPLES_INSTALL_PATH:PATH="$PWD/../examples_opt" \ - -DCMAKE_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DMPI_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DCMAKE_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DMPI_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DCMAKE_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPI_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPIEXEC_EXECUTABLE=/usr/local/mpich-3.2.1/gnu/bin/mpiexec \ - -DCMAKE_C_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_Fortran_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_CXX_FLAGS:STRING="-O0 -g -fPIC" \ - -DOpenMP_C_FLAGS:STRING="-fopenmp" \ - -DOpenMP_CXX_FLAGS:STRING="-fopenmp" \ - -DSUNDIALS_PRECISION:STRING="double" \ - -DSUNDIALS_INDEX_TYPE:STRING="int64_t" \ - -DEXAMPLES_ENABLE_C:BOOL="1" \ - -DEXAMPLES_ENABLE_CXX:BOOL="1" \ - -DEXAMPLES_INSTALL:BOOL="1" \ - -DMPI_ENABLE:BOOL="1" \ - -DOPENMP_ENABLE:BOOL="1" \ - -DPTHREAD_ENABLE:BOOL="1" \ - -DBUILD_SHARED_LIBS:BOOL="1" \ - -DHYPRE_ENABLE:BOOL="1" \ - -DHYPRE_INCLUDE_DIR:STRING="/usr/local/hypre-2.14.0/gnu_int64/include" \ - -DHYPRE_LIBRARY_DIR:FILEPATH="/usr/local/hypre-2.14.0/gnu_int64/lib" \ - ../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz - Operating System: Ubuntu 18.04 - C/Fortran Compilers: gcc/gfortran v7.3.0 - MPI: MPICH v3.2.1 diff --git a/examples/cvode/CXX_serial/CMakeLists.txt b/examples/cvode/CXX_serial/CMakeLists.txt index 67505e27a0..9426ce639d 100644 --- a/examples/cvode/CXX_serial/CMakeLists.txt +++ b/examples/cvode/CXX_serial/CMakeLists.txt @@ -55,7 +55,7 @@ foreach(example_tuple ${CVODE_examples}) target_link_libraries(${example_target} sundials_cvode sundials_nvecserial ${EXE_EXTRA_LINK_LIBS}) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) target_link_libraries(${example_target} sundials_cvode_fused_stubs) endif() endif() @@ -78,9 +78,9 @@ foreach(example_tuple ${CVODE_examples}) endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_stubs cvode_fused_stubs) endif() @@ -94,4 +94,4 @@ if(EXAMPLES_INSTALL) "${PROJECT_SOURCE_DIR}/examples/utilities/example_utilities.hpp" TEST_INSTALL CXX_serial) -endif(EXAMPLES_INSTALL) +endif(SUNDIALS_EXAMPLES_ENABLE_INSTALL) diff --git a/examples/cvode/CXX_serial/README b/examples/cvode/CXX_serial/README index bced6147fe..710eaa2756 100644 --- a/examples/cvode/CXX_serial/README +++ b/examples/cvode/CXX_serial/README @@ -1,43 +1,3 @@ List of serial CVODE C++ examples cv_heat2D : 2-D heat equation (PCG with Jacobi preconditioner) - -Sample results: - - The example output was produced by running: - - ./cv_heat2D - -The following CMake command was used to configure SUNDIALS: - -cmake \ - -DCMAKE_INSTALL_PREFIX:PATH="$PWD/../install_opt" \ - -DEXAMPLES_INSTALL_PATH:PATH="$PWD/../examples_opt" \ - -DCMAKE_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DMPI_C_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicc \ - -DCMAKE_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DMPI_Fortran_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpif90 \ - -DCMAKE_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPI_CXX_COMPILER=/usr/local/mpich-3.2.1/gnu/bin/mpicxx \ - -DMPIEXEC_EXECUTABLE=/usr/local/mpich-3.2.1/gnu/bin/mpiexec \ - -DCMAKE_C_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_Fortran_FLAGS:STRING="-O0 -g -fPIC" \ - -DCMAKE_CXX_FLAGS:STRING="-O0 -g -fPIC" \ - -DOpenMP_C_FLAGS:STRING="-fopenmp" \ - -DOpenMP_CXX_FLAGS:STRING="-fopenmp" \ - -DSUNDIALS_PRECISION:STRING="double" \ - -DSUNDIALS_INDEX_TYPE:STRING="int64_t" \ - -DEXAMPLES_ENABLE_C:BOOL="1" \ - -DEXAMPLES_ENABLE_CXX:BOOL="1" \ - -DEXAMPLES_INSTALL:BOOL="1" \ - -DMPI_ENABLE:BOOL="1" \ - -DOPENMP_ENABLE:BOOL="1" \ - -DPTHREAD_ENABLE:BOOL="1" \ - -DBUILD_SHARED_LIBS:BOOL="1" \ - ../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz - Operating System: Ubuntu 18.04 - C/Fortran Compilers: gcc/gfortran v7.3.0 - MPI: MPICH v3.2.1 diff --git a/examples/cvode/CXX_sycl/CMakeLists.txt b/examples/cvode/CXX_sycl/CMakeLists.txt index 9775e48053..f6511c160e 100644 --- a/examples/cvode/CXX_sycl/CMakeLists.txt +++ b/examples/cvode/CXX_sycl/CMakeLists.txt @@ -67,7 +67,7 @@ foreach(example_tuple ${CVODE_examples}) endforeach() # Install the targets -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( cvode CVODE_examples diff --git a/examples/cvode/C_mpimanyvector/CMakeLists.txt b/examples/cvode/C_mpimanyvector/CMakeLists.txt index 217d68e64b..64e56e38b3 100644 --- a/examples/cvode/C_mpimanyvector/CMakeLists.txt +++ b/examples/cvode/C_mpimanyvector/CMakeLists.txt @@ -33,7 +33,7 @@ endif() set(CVODE_LIB sundials_cvode) set(NVECP_LIB sundials_nvecmpimanyvector sundials_nvecparallel) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -70,24 +70,24 @@ foreach(example_tuple ${CVODE_examples}) endif() # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file install(FILES README - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -105,7 +105,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/C_mpimanyvector/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -119,7 +119,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/C_mpimanyvector/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_mpimanyvector RENAME Makefile) endif() diff --git a/examples/cvode/C_mpimanyvector/README b/examples/cvode/C_mpimanyvector/README index 2ba524c520..2cc5bebe56 100644 --- a/examples/cvode/C_mpimanyvector/README +++ b/examples/cvode/C_mpimanyvector/README @@ -1,46 +1,3 @@ List of MPIManyVector CVODE examples cvDiurnal_kry_mpimanyvec : 2-D 2-species diurnal advection-diffusion - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/C_openmp/CMakeLists.txt b/examples/cvode/C_openmp/CMakeLists.txt index 1044566c06..cb4fbd207c 100644 --- a/examples/cvode/C_openmp/CMakeLists.txt +++ b/examples/cvode/C_openmp/CMakeLists.txt @@ -29,7 +29,7 @@ set(CVODE_examples "cvAdvDiff_bnd_omp\;4\;develop" set(CVODE_LIB sundials_cvode) set(NVECOMP_LIB sundials_nvecopenmp) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -61,23 +61,24 @@ foreach(example_tuple ${CVODE_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmp) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmp) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -94,7 +95,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/C_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -108,7 +109,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/C_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmp RENAME Makefile) endif() diff --git a/examples/cvode/C_openmp/README b/examples/cvode/C_openmp/README index 7dae6e1e25..9090d103fd 100644 --- a/examples/cvode/C_openmp/README +++ b/examples/cvode/C_openmp/README @@ -1,46 +1,3 @@ List of C_openmp CVODE examples cvAdvDiff_bnd_omp: banded example using OpenMP - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/C_openmpdev/CMakeLists.txt b/examples/cvode/C_openmpdev/CMakeLists.txt index 5c650eeddb..6118594c51 100644 --- a/examples/cvode/C_openmpdev/CMakeLists.txt +++ b/examples/cvode/C_openmpdev/CMakeLists.txt @@ -27,7 +27,7 @@ set(CVODE_examples "cvAdvDiff_kry_ompdev\;4\;develop") set(CVODE_LIB sundials_cvode) set(NVECOMP_LIB sundials_nvecopenmpdev) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -59,23 +59,24 @@ foreach(example_tuple ${CVODE_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -92,7 +93,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/C_openmpdev/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -106,7 +107,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/C_openmpdev/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/C_openmpdev RENAME Makefile) endif() diff --git a/examples/cvode/C_openmpdev/README b/examples/cvode/C_openmpdev/README index 830d816b8b..c5a640463e 100644 --- a/examples/cvode/C_openmpdev/README +++ b/examples/cvode/C_openmpdev/README @@ -1,37 +1,3 @@ List of OpenMP device offloading CVODE examples cvAdvDiff_kry_ompdev : 2-D advection-diffusion (nonstiff) - -Sample results: - - SUNDIALS was built with OpenMP enabled, and the example output was run using - LLNL LC's wrapped xlc compiler for gpu program compilation: xlc-gpu - -The following CMake command was used to configure SUNDIALS: - -cmake \ --DCMAKE_C_COMPILER=xlc-gpu \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DBUILD_TESTING=ON \ --DCMAKE_INSTALL_PREFIX=/usr/local/sundials \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_INSTALL_PATH=/user/local/sundials/examples \ --DEXAMPLES_INSTALL=ON \ --DENABLE_OPENMP=ON \ --DENABLE_OPENMP_DEVICE=ON \ --DOPENMP_DEVICE_WORKS=ON \ --DSUNDIALS_INDEX_SIZE=64 \ --DSUNDIALS_PRECISION=double \ -../sundials - - System Architecture: ppc64le - Processor Type: IBM POWER8 @ 2.5GHz - Operating System: Red Hat 7.3 - C Compiler: xlc-gpu diff --git a/examples/cvode/F2003_parallel/CMakeLists.txt b/examples/cvode/F2003_parallel/CMakeLists.txt index 6b4d6dfa5c..90a9e670dc 100644 --- a/examples/cvode/F2003_parallel/CMakeLists.txt +++ b/examples/cvode/F2003_parallel/CMakeLists.txt @@ -80,20 +80,20 @@ foreach(example_tuple ${FCVODE_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel) endif() endforeach(example_tuple ${FCVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${CVODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -121,7 +121,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/F2003_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -135,7 +135,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/F2003_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_parallel RENAME Makefile) endif() diff --git a/examples/cvode/F2003_serial/CMakeLists.txt b/examples/cvode/F2003_serial/CMakeLists.txt index fb039a4b43..49b5b7636b 100644 --- a/examples/cvode/F2003_serial/CMakeLists.txt +++ b/examples/cvode/F2003_serial/CMakeLists.txt @@ -50,7 +50,7 @@ endif() # Specify libraries to link against set(CVODE_LIB sundials_cvode sundials_fcvode_mod) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -84,14 +84,14 @@ foreach(example_tuple ${FCVODE_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS} ${EXE_EXTRA_LINK_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) endif() endforeach(example_tuple ${FCVODE_examples}) # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_fsunlinsolklu_mod) @@ -122,9 +122,9 @@ if(BUILD_SUNLINSOL_KLU) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) endif() endforeach(example_tuple ${FCVODE_examples_KLU}) @@ -132,7 +132,8 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackdense @@ -160,9 +161,9 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLLAPACK_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) endif() endforeach(example_tuple ${FCVODE_examples_LAPACK}) @@ -170,7 +171,7 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") @@ -178,13 +179,13 @@ 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) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() examples2string(FCVODE_examples EXAMPLES) - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) examples2string(FCVODE_examples_KLU EXAMPLES_KLU) set(SUNLS_LIB "sundials_sunlinsolklu") set(SUNLS_FLIB "sundials_fsunlinsolklu_mod") @@ -203,7 +204,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/F2003_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -217,7 +218,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/F2003_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/F2003_serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/F2003_serial RENAME Makefile) endif() diff --git a/examples/cvode/cuda/CMakeLists.txt b/examples/cvode/cuda/CMakeLists.txt index c2a4d7b154..8e26d682ef 100644 --- a/examples/cvode/cuda/CMakeLists.txt +++ b/examples/cvode/cuda/CMakeLists.txt @@ -42,7 +42,7 @@ list(APPEND all_examples "${CVODE_examples}") # Specify libraries to link against set(SUNDIALS_LIBS ${SUNDIALS_LIBS} sundials_cvode sundials_nveccuda) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(SUNDIALS_LIBS ${SUNDIALS_LIBS} sundials_cvode_fused_cuda) endif() @@ -88,23 +88,23 @@ foreach(example_tuple ${all_examples}) EXAMPLE_TYPE ${example_type}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cu ${test_name}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/cuda) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/cuda) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/cuda) + install(FILES README DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/cuda) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") set(NVECTOR_LIB "sundials_nveccuda") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_cuda ${LIBS}") endif() @@ -127,7 +127,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/cuda/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/cuda) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/cuda) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -141,7 +141,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/cuda/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/cuda + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/cuda RENAME Makefile) endif() diff --git a/examples/cvode/ginkgo/CMakeLists.txt b/examples/cvode/ginkgo/CMakeLists.txt index ba893babf6..dcb3184cc3 100644 --- a/examples/cvode/ginkgo/CMakeLists.txt +++ b/examples/cvode/ginkgo/CMakeLists.txt @@ -38,7 +38,7 @@ sundials_add_examples_ginkgo( BACKENDS REF OMP) # Install the targets -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) if(SUNDIALS_GINKGO_BACKENDS MATCHES "CUDA") list(APPEND vectors nveccuda) diff --git a/examples/cvode/hip/CMakeLists.txt b/examples/cvode/hip/CMakeLists.txt index 4b9be9d2d2..7ee879011c 100644 --- a/examples/cvode/hip/CMakeLists.txt +++ b/examples/cvode/hip/CMakeLists.txt @@ -29,7 +29,7 @@ set(all_examples # Specify libraries to link against set(SUNDIALS_LIBS sundials_cvode sundials_nvechip) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(SUNDIALS_LIBS ${SUNDIALS_LIBS} sundials_cvode_fused_hip) endif() @@ -77,9 +77,9 @@ foreach(example_tuple ${all_examples}) endforeach(example_tuple ${all_examples}) # Install the targets -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_kernels_if_enabled cvode_fused_hip) else() set(_fused_kernels_if_enabled) diff --git a/examples/cvode/kokkos/CMakeLists.txt b/examples/cvode/kokkos/CMakeLists.txt index 0e9cdb7c1f..57d576221d 100644 --- a/examples/cvode/kokkos/CMakeLists.txt +++ b/examples/cvode/kokkos/CMakeLists.txt @@ -55,7 +55,7 @@ foreach(example_tuple ${examples_list}) sundials_sunmatrixkokkosdense sundials_sunlinsolkokkosdense ${EXE_EXTRA_LINK_LIBS}) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) target_link_libraries(${example_target} PRIVATE sundials_cvode_fused_stubs) endif() @@ -81,9 +81,9 @@ foreach(example_tuple ${examples_list}) endforeach() # Install the targets -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_stubs cvode_fused_stubs) endif() diff --git a/examples/cvode/magma/CMakeLists.txt b/examples/cvode/magma/CMakeLists.txt index c9c6cce466..cb95106e9a 100644 --- a/examples/cvode/magma/CMakeLists.txt +++ b/examples/cvode/magma/CMakeLists.txt @@ -78,7 +78,7 @@ foreach(example_tuple ${CVODE_examples}) endforeach(example_tuple ${CVODE_examples}) # Install the targets -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( cvode CVODE_examples diff --git a/examples/cvode/parallel/CMakeLists.txt b/examples/cvode/parallel/CMakeLists.txt index b8aa76dde3..ae95afbb9c 100644 --- a/examples/cvode/parallel/CMakeLists.txt +++ b/examples/cvode/parallel/CMakeLists.txt @@ -37,7 +37,7 @@ endif() set(CVODE_LIB sundials_cvode) set(NVECP_LIB sundials_nvecparallel) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -74,23 +74,24 @@ foreach(example_tuple ${CVODE_examples}) endif() # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/parallel) endif() endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/parallel) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -107,7 +108,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -121,7 +122,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/parallel RENAME Makefile) endif() diff --git a/examples/cvode/parallel/README b/examples/cvode/parallel/README index b354324ba6..5eb38cbb46 100644 --- a/examples/cvode/parallel/README +++ b/examples/cvode/parallel/README @@ -4,46 +4,3 @@ List of parallel CVODE examples cvAdvDiff_diag_p : 1-D advection-diffusion with Adams and diagonal linear solver cvDiurnal_kry_bbd_p : 2-D 2-species diurnal advection-diffusion with BBD preconditioner cvDiurnal_kry_p : 2-D 2-species diurnal advection-diffusion - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/parhyp/CMakeLists.txt b/examples/cvode/parhyp/CMakeLists.txt index ce41072f24..9d597ba7b3 100644 --- a/examples/cvode/parhyp/CMakeLists.txt +++ b/examples/cvode/parhyp/CMakeLists.txt @@ -23,7 +23,7 @@ # Examples using SUNDIALS linear solvers set(CVODE_examples "cvAdvDiff_non_ph.c\;2\;2\;develop") -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_stubs sundials_cvode_fused_stubs) endif() @@ -60,9 +60,9 @@ foreach(example_tuple ${CVODE_examples}) endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_stubs_target cvode_fused_stubs) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() diff --git a/examples/cvode/parhyp/README b/examples/cvode/parhyp/README index b40a75eca9..667b693cf2 100644 --- a/examples/cvode/parhyp/README +++ b/examples/cvode/parhyp/README @@ -1,46 +1,3 @@ List of parhyp CVODE examples cvAdvDiff_non_ph : 1-D advection-diffusion (nonstiff) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/petsc/CMakeLists.txt b/examples/cvode/petsc/CMakeLists.txt index 5400609ea6..d06511e61a 100644 --- a/examples/cvode/petsc/CMakeLists.txt +++ b/examples/cvode/petsc/CMakeLists.txt @@ -37,7 +37,7 @@ set(CVODE_LIB sundials_cvode) set(NVECP_LIB sundials_nvecpetsc) set(SUNNLS_LIB sundials_sunnonlinsolpetscsnes) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -73,22 +73,23 @@ foreach(example_tuple ${CVODE_examples}) endif() # install example - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/petsc) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/petsc) endif() endforeach(example_tuple ${CVODE_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/petsc) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/petsc) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() @@ -105,7 +106,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/petsc/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/petsc) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/petsc) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -119,7 +120,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/petsc/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/petsc + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/petsc RENAME Makefile) endif() diff --git a/examples/cvode/petsc/README b/examples/cvode/petsc/README index 22ef8e364d..aec4cfd7ea 100644 --- a/examples/cvode/petsc/README +++ b/examples/cvode/petsc/README @@ -2,23 +2,3 @@ List of PETSc CVODE examples cvAdvDiff_petsc : 1-D advection-diffusion (nonstiff) cv_petsc_ex7 : Nonlinear time-dependent PDE in 2D based on PETSc TS example ex7 - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=ON \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_PETSC=ON \ --DPETSC_DIR=/home/user1/petsc \ -../sundials diff --git a/examples/cvode/raja/CMakeLists.txt b/examples/cvode/raja/CMakeLists.txt index 70e2f55bde..1f966f153e 100644 --- a/examples/cvode/raja/CMakeLists.txt +++ b/examples/cvode/raja/CMakeLists.txt @@ -26,7 +26,7 @@ set(CVODE_examples "cvAdvDiff_kry_raja.cpp\;develop") # Add source directory to include directories include_directories(.) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_stubs sundials_cvode_fused_stubs) endif() @@ -72,9 +72,9 @@ foreach(example_tuple ${CVODE_examples}) endforeach(example_tuple ${CVODE_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_stubs_target cvode_fused_stubs) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() diff --git a/examples/cvode/serial/CMakeLists.txt b/examples/cvode/serial/CMakeLists.txt index 7d8c19f9cf..b593080bb9 100644 --- a/examples/cvode/serial/CMakeLists.txt +++ b/examples/cvode/serial/CMakeLists.txt @@ -41,7 +41,7 @@ set(CVODE_examples "cvRoberts_dns_uw\;\;develop" "cvRocket_dns\;\;develop") -if(SUNDIALS_BUILD_WITH_MONITORING) +if(SUNDIALS_ENABLE_MONITORING) list(APPEND CVODE_examples "cvKrylovDemo_ls\;0 1\;develop") endif() @@ -63,7 +63,7 @@ set(CVODE_extras plot_cvParticle.py plot_cvPendulum.py cvRoberts_dns_stats.csv) set(CVODE_LIB sundials_cvode) set(NVECS_LIB sundials_nvecserial) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) list(APPEND CVODE_LIB sundials_cvode_fused_stubs) endif() @@ -110,15 +110,16 @@ foreach(example_tuple ${CVODE_examples}) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) endif() endforeach(example_tuple ${CVODE_examples}) # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackband @@ -163,9 +164,9 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) endif() endforeach(example_tuple ${CVODE_examples_BL}) @@ -173,7 +174,7 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) endif() # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_sunlinsolklu) @@ -220,9 +221,9 @@ if(BUILD_SUNLINSOL_KLU) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) endif() endforeach(example_tuple ${CVODE_examples_KLU}) @@ -230,7 +231,7 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) # Sundials SuperLU_MT linear solver module set(SUNLINSOLSLUMT_LIBS sundials_sunlinsolsuperlumt) @@ -283,9 +284,9 @@ if(BUILD_SUNLINSOL_SUPERLUMT) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) endif() endforeach(example_tuple ${CVODE_examples_SUPERLUMT}) @@ -293,39 +294,41 @@ if(BUILD_SUNLINSOL_SUPERLUMT) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) # Install the extra files foreach(extrafile ${CVODE_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODE") set(SOLVER_LIB "sundials_cvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) + if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") endif() examples2string(CVODE_examples EXAMPLES) - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) examples2string(CVODE_examples_BL EXAMPLES_BL) else() set(EXAMPLES_BL "") endif() - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) examples2string(CVODE_examples_KLU EXAMPLES_KLU) else() set(EXAMPLES_KLU "") endif() - if(BUILD_SUNLINSOL_SUPERLUMT) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) examples2string(CVODE_examples_SUPERLUMT EXAMPLES_SLUMT) if(SUNDIALS_SUPERLUMT_THREAD_TYPE STREQUAL "PTHREAD") set(THREAD_LIBRARY_SLUMT ${CMAKE_THREAD_LIBS_INIT}) @@ -348,7 +351,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvode/serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -362,7 +365,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvode/serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvode/serial RENAME Makefile) endif() diff --git a/examples/cvode/serial/README b/examples/cvode/serial/README index 2382d464d0..037aad23d8 100644 --- a/examples/cvode/serial/README +++ b/examples/cvode/serial/README @@ -14,47 +14,3 @@ List of serial CVODE examples cvRoberts_klu : dense example with KLU sparse linear solver cvRoberts_block_klu : block diagonal example with KLU sparse linear solver cvRoberts_sps : dense example with SuperLUMT sparse linear solver - - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/superludist/CMakeLists.txt b/examples/cvode/superludist/CMakeLists.txt index b84199285f..f191d9a512 100644 --- a/examples/cvode/superludist/CMakeLists.txt +++ b/examples/cvode/superludist/CMakeLists.txt @@ -22,7 +22,7 @@ list(APPEND CVODE_examples "cvAdvDiff_sludist.cpp\;2 1\;2\;develop") -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_lib sundials_cvode_fused_stubs) endif() @@ -82,7 +82,7 @@ else() endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( cvode_superludist CVODE_examples diff --git a/examples/cvode/superludist/README b/examples/cvode/superludist/README index 162c9e7810..7d3fed16e0 100644 --- a/examples/cvode/superludist/README +++ b/examples/cvode/superludist/README @@ -1,50 +1,3 @@ List of parallel CVODE examples cvAdvDiff_sludist: advection-diffusion example using the SuperLU_DIST linear solver - -The following CMake command was used to configure SUNDIALS: - -cmake \ - -DSUNDIALS_INDEX_SIZE=64 \ - \ - -DCMAKE_INSTALL_PREFIX="${INST_DIR}" \ - -DEXAMPLES_INSTALL_PATH="${INST_DIR}/examples" \ - \ - -DENABLE_MPI=ON \ - -DMPI_C_COMPILER="${MPIDIR}/bin/mpicc" \ - -DMPI_CXX_COMPILER="${MPIDIR}/bin/mpicxx" \ - -DMPIEXEC_EXECUTABLE="${MPIDIR}/bin/mpirun" \ - \ - -DENABLE_OPENMP=ON \ - \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_CVODE=ON \ - -DBUILD_CVODES=OFF \ - -DBUILD_IDA=OFF \ - -DBUILD_IDAS=OFF \ - -DBUILD_ARKODE=ON \ - -DBUILD_KINSOL=OFF \ - -DBUILD_TESTING=ON \ - -DEXAMPLES_ENABLE_CXX=ON \ - \ - -DBLAS_ENABLE=OFF \ - -DBLAS_LIBRARIES="${BLAS_LIBRARIES}" \ - \ - -DENABLE_LAPACK=OFF \ - -DLAPACK_LIBRARIES="${LAPACK_LIBRARIES}" \ - \ - -DENABLE_SUPERLUDIST=ON \ - -DSUPERLUDIST_LIBRARY_DIR="${SUPERLUDIST_DIR}/lib64" \ - -DSUPERLUDIST_INCLUDE_DIR="${SUPERLUDIST_DIR}/include" \ - -DSUPERLUDIST_LIBRARIES="${LAPACK_LIBRARIES};${PARMETIS_LIBRARIES}" \ - -DSUPERLUDIST_OpenMP=ON \ - \ - ../ - - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz - Operating System: Red Hat 7.3 - C/Fortran Compilers: gcc/gfortran v4.9.4 - MPI: Open MPI v3.1.2 diff --git a/examples/cvodes/CMakeLists.txt b/examples/cvodes/CMakeLists.txt index b87fdfd5f9..093d9e33ab 100644 --- a/examples/cvodes/CMakeLists.txt +++ b/examples/cvodes/CMakeLists.txt @@ -18,16 +18,16 @@ # --------------------------------------------------------------- # C examples -if(EXAMPLES_ENABLE_C) +if(SUNDIALS_EXAMPLES_ENABLE_C) add_subdirectory(serial) - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) endif() - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(C_openmp) endif() endif() -if(BUILD_FORTRAN_MODULE_INTERFACE AND EXAMPLES_ENABLE_F2003) +if(SUNDIALS_ENABLE_FORTRAN AND SUNDIALS_EXAMPLES_ENABLE_FORTRAN) add_subdirectory(F2003_serial) endif() diff --git a/examples/cvodes/C_openmp/CMakeLists.txt b/examples/cvodes/C_openmp/CMakeLists.txt index 4032f3e6bc..4423072a1f 100644 --- a/examples/cvodes/C_openmp/CMakeLists.txt +++ b/examples/cvodes/C_openmp/CMakeLists.txt @@ -60,23 +60,24 @@ foreach(example_tuple ${CVODES_examples_OMP}) EXAMPLE_TYPE ${example_type}) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) endif() endforeach(example_tuple ${CVODES_examples_OMP}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) # Install the extra files foreach(extrafile ${CVODES_extras_OMP}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -96,7 +97,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvodes/C_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/C_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -110,7 +111,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvodes/C_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/C_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/C_openmp RENAME Makefile) endif() diff --git a/examples/cvodes/C_openmp/README b/examples/cvodes/C_openmp/README index a2fb8bb15e..22e31c02eb 100644 --- a/examples/cvodes/C_openmp/README +++ b/examples/cvodes/C_openmp/README @@ -1,46 +1,3 @@ List of C_openmp CVODES examples cvsAdvDiff_bnd_omp: banded example using OpenMP - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvodes/F2003_serial/CMakeLists.txt b/examples/cvodes/F2003_serial/CMakeLists.txt index 5875a94361..810f22c4f6 100644 --- a/examples/cvodes/F2003_serial/CMakeLists.txt +++ b/examples/cvodes/F2003_serial/CMakeLists.txt @@ -73,14 +73,14 @@ foreach(example_tuple ${FCVODES_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/F2003_serial) endif() endforeach(example_tuple ${FCVODES_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODES") @@ -101,7 +101,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/cvodes/F2003_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/F2003_serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -115,7 +115,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvodes/F2003_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/F2003_serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/F2003_serial RENAME Makefile) endif() diff --git a/examples/cvodes/parallel/CMakeLists.txt b/examples/cvodes/parallel/CMakeLists.txt index 52b183b6d3..0162a7d895 100644 --- a/examples/cvodes/parallel/CMakeLists.txt +++ b/examples/cvodes/parallel/CMakeLists.txt @@ -94,18 +94,19 @@ foreach(example_tuple ${CVODES_examples}) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/parallel) endif() endforeach(example_tuple ${CVODES_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/parallel) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "CVODES") @@ -124,7 +125,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvodes/parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -138,7 +139,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvodes/parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/parallel RENAME Makefile) endif() diff --git a/examples/cvodes/parallel/README b/examples/cvodes/parallel/README index b67d7cc4ee..31a334dcec 100644 --- a/examples/cvodes/parallel/README +++ b/examples/cvodes/parallel/README @@ -20,46 +20,3 @@ List of parallel CVODES examples cvsAdvDiff_ASAp_non_p : 1-D advection-diffusion (nonstiff) cvsAtmDisp_ASAi_kry_bbd_p : 2-D (or 3-D) advection-diffusion-reaction PDE BDF/SPGMR/BBD - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvodes/serial/CMakeLists.txt b/examples/cvodes/serial/CMakeLists.txt index 923e756208..03241b6e3e 100644 --- a/examples/cvodes/serial/CMakeLists.txt +++ b/examples/cvodes/serial/CMakeLists.txt @@ -54,7 +54,7 @@ set(CVODES_examples "cvsRoberts_dns_constraints\;\;develop" "cvsRoberts_dns_uw\;\;develop") -if(SUNDIALS_BUILD_WITH_MONITORING) +if(SUNDIALS_ENABLE_MONITORING) list(APPEND CVODE_examples "cvsKrylovDemo_ls\;0 1\;develop") endif() @@ -131,15 +131,16 @@ foreach(example_tuple ${CVODES_examples}) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) endif() endforeach(example_tuple ${CVODES_examples}) # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackband @@ -184,9 +185,9 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) endif() endforeach(example_tuple ${CVODES_examples_BL}) @@ -194,7 +195,7 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) endif() # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_sunlinsolklu) @@ -241,9 +242,9 @@ if(BUILD_SUNLINSOL_KLU) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) endif() endforeach(example_tuple ${CVODES_examples_KLU}) @@ -251,7 +252,7 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) # Sundials SuperLU_MT linear solver module set(SUNLINSOLSLUMT_LIBS sundials_sunlinsolsuperlumt) @@ -304,9 +305,9 @@ if(BUILD_SUNLINSOL_SUPERLUMT) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) endif() endforeach(example_tuple ${CVODES_examples_SUPERLUMT}) @@ -314,15 +315,16 @@ if(BUILD_SUNLINSOL_SUPERLUMT) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) # Install the extra files foreach(extrafile ${CVODES_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -331,19 +333,20 @@ if(EXAMPLES_INSTALL) examples2string(CVODES_examples EXAMPLES) - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) examples2string(CVODES_examples_BL EXAMPLES_BL) else() set(EXAMPLES_BL "") endif() - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) examples2string(CVODES_examples_KLU EXAMPLES_KLU) else() set(EXAMPLES_KLU "") endif() - if(BUILD_SUNLINSOL_SUPERLUMT) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) examples2string(CVODES_examples_SUPERLUMT EXAMPLES_SLUMT) if(SUNDIALS_SUPERLUMT_THREAD_TYPE STREQUAL "PTHREAD") set(THREAD_LIBRARY_SLUMT ${CMAKE_THREAD_LIBS_INIT}) @@ -366,7 +369,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/cvodes/serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -380,7 +383,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/cvodes/serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvodes/serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/cvodes/serial RENAME Makefile) endif() diff --git a/examples/cvodes/serial/README b/examples/cvodes/serial/README index dfa2889c9c..599905f196 100644 --- a/examples/cvodes/serial/README +++ b/examples/cvodes/serial/README @@ -37,46 +37,3 @@ List of serial CVODES examples cvsRoberts_ASAi_dns_constraints : kinetics - ASA with dense linear solver and constraint checking cvsRoberts_ASAi_klu : kinetics - ASA with KLU sparse linear solver cvsRoberts_ASAi_sps : kinetics - ASA with SuperLUMT sparse linear solver - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/ida/CMakeLists.txt b/examples/ida/CMakeLists.txt index 9cd5ad18e9..46888bebe4 100644 --- a/examples/ida/CMakeLists.txt +++ b/examples/ida/CMakeLists.txt @@ -19,51 +19,51 @@ # --------------------------------------------------------------- # C examples -if(EXAMPLES_ENABLE_C) +if(SUNDIALS_EXAMPLES_ENABLE_C) add_subdirectory(serial) - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(C_openmp) endif() - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) endif() - if(ENABLE_PETSC AND PETSC_FOUND) + if(SUNDIALS_ENABLE_PETSC AND PETSC_FOUND) add_subdirectory(petsc) endif() endif() # C++ examples -if(EXAMPLES_ENABLE_CXX) - if(ENABLE_RAJA AND RAJA_FOUND) +if(SUNDIALS_EXAMPLES_ENABLE_CXX) + if(SUNDIALS_ENABLE_RAJA AND RAJA_FOUND) add_subdirectory(raja) - if(ENABLE_MPI + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND AND (SUNDIALS_RAJA_BACKENDS MATCHES "CUDA")) add_subdirectory(mpiraja) endif() endif() - if(ENABLE_TRILINOS AND Trilinos_FOUND) + if(SUNDIALS_ENABLE_TRILINOS AND Trilinos_FOUND) add_subdirectory(trilinos) endif() endif() # Fortran examples -if(BUILD_FORTRAN_MODULE_INTERFACE AND EXAMPLES_ENABLE_F2003) +if(SUNDIALS_ENABLE_FORTRAN AND SUNDIALS_EXAMPLES_ENABLE_FORTRAN) add_subdirectory(F2003_serial) - if(ENABLE_MPI) + if(SUNDIALS_ENABLE_MPI) add_subdirectory(F2003_parallel) endif() - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(F2003_openmp) endif() endif() # cuda examples -if(EXAMPLES_ENABLE_CUDA) +if(SUNDIALS_EXAMPLES_ENABLE_CUDA) - if(ENABLE_CUDA AND CMAKE_CUDA_COMPILER) + if(SUNDIALS_ENABLE_CUDA AND CMAKE_CUDA_COMPILER) add_subdirectory(cuda) - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(mpicuda) endif() endif() diff --git a/examples/ida/C_openmp/CMakeLists.txt b/examples/ida/C_openmp/CMakeLists.txt index 496ec17566..fef273c217 100644 --- a/examples/ida/C_openmp/CMakeLists.txt +++ b/examples/ida/C_openmp/CMakeLists.txt @@ -58,18 +58,19 @@ foreach(example_tuple ${IDA_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/C_openmp) endif() endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/C_openmp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/C_openmp) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -88,7 +89,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/C_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/C_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -102,7 +103,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/C_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/C_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/C_openmp RENAME Makefile) endif() diff --git a/examples/ida/C_openmp/README b/examples/ida/C_openmp/README index 7fe8cd430c..ff270f7846 100644 --- a/examples/ida/C_openmp/README +++ b/examples/ida/C_openmp/README @@ -2,46 +2,3 @@ List of C_openmp examples for IDAS idaFoodWeb_bnd_omp : 2-D food web system, banded Jacobian idaFoodWeb_kry_omp : 2-D food web system using Krylov solver - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/ida/F2003_openmp/CMakeLists.txt b/examples/ida/F2003_openmp/CMakeLists.txt index 8b20e37ff3..3b0488af4c 100644 --- a/examples/ida/F2003_openmp/CMakeLists.txt +++ b/examples/ida/F2003_openmp/CMakeLists.txt @@ -75,14 +75,14 @@ foreach(example_tuple ${FIDA_examples_OMP}) EXAMPLE_TYPE ${example_type}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${test_name}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_openmp) endif() endforeach(example_tuple ${FIDA_examples_OMP}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -102,7 +102,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/F2003_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -116,7 +116,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/F2003_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_openmp RENAME Makefile) endif() diff --git a/examples/ida/F2003_parallel/CMakeLists.txt b/examples/ida/F2003_parallel/CMakeLists.txt index 39de54188a..f079451e0d 100644 --- a/examples/ida/F2003_parallel/CMakeLists.txt +++ b/examples/ida/F2003_parallel/CMakeLists.txt @@ -77,20 +77,20 @@ foreach(example_tuple ${FIDA_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_parallel) endif() endforeach(example_tuple ${FIDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${IDA_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_parallel) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -117,7 +117,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/F2003_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -131,7 +131,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/F2003_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_parallel RENAME Makefile) endif() diff --git a/examples/ida/F2003_serial/CMakeLists.txt b/examples/ida/F2003_serial/CMakeLists.txt index 1fcffe2e85..65f6caadde 100644 --- a/examples/ida/F2003_serial/CMakeLists.txt +++ b/examples/ida/F2003_serial/CMakeLists.txt @@ -60,14 +60,14 @@ foreach(example_tuple ${FIDA_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_serial) endif() endforeach(example_tuple ${FIDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -87,7 +87,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/F2003_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -101,7 +101,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/F2003_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/F2003_serial RENAME Makefile) endif() diff --git a/examples/ida/cuda/CMakeLists.txt b/examples/ida/cuda/CMakeLists.txt index 8448e439f2..33f1e4ca12 100644 --- a/examples/ida/cuda/CMakeLists.txt +++ b/examples/ida/cuda/CMakeLists.txt @@ -59,18 +59,18 @@ foreach(example_tuple ${IDA_examples}) target_link_libraries(${example} PRIVATE ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cu ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/cuda) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/cuda) endif() endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/cuda) + install(FILES README DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/cuda) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -90,7 +90,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/cuda/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/cuda) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/cuda) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -104,7 +104,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/cuda/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/cuda + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/cuda RENAME Makefile) endif() diff --git a/examples/ida/cuda/README b/examples/ida/cuda/README index 8359f9b09b..a49a29540c 100644 --- a/examples/ida/cuda/README +++ b/examples/ida/cuda/README @@ -1,4 +1,3 @@ List of CUDA IDA examples idaHeat2D_kry_cuda : 2D heat equation with SPGMR, diagonal preconditioner and CUDA vector - diff --git a/examples/ida/mpicuda/CMakeLists.txt b/examples/ida/mpicuda/CMakeLists.txt index aba8aac4d3..36e645e492 100644 --- a/examples/ida/mpicuda/CMakeLists.txt +++ b/examples/ida/mpicuda/CMakeLists.txt @@ -59,18 +59,19 @@ foreach(example_tuple ${IDA_examples}) target_link_libraries(${example} PRIVATE MPI::MPI_CXX ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cu ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/mpicuda) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/mpicuda) endif() endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/mpicuda) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/mpicuda) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -89,7 +90,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/mpicuda/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/mpicuda) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/mpicuda) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -103,7 +104,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/mpicuda/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/mpicuda + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/mpicuda RENAME Makefile) endif() diff --git a/examples/ida/mpicuda/README b/examples/ida/mpicuda/README index f91a7c5a46..63692cf9b8 100644 --- a/examples/ida/mpicuda/README +++ b/examples/ida/mpicuda/README @@ -1,5 +1,3 @@ List of MPI+CUDA IDA examples idaHeat2D_kry_p_mpicuda : 2D heat equation with SPGMR, diagonal preconditioner and MPI+CUDA vector - - diff --git a/examples/ida/mpiraja/CMakeLists.txt b/examples/ida/mpiraja/CMakeLists.txt index 66ee9e8e55..3ae23e9648 100644 --- a/examples/ida/mpiraja/CMakeLists.txt +++ b/examples/ida/mpiraja/CMakeLists.txt @@ -71,7 +71,7 @@ foreach(example_tuple ${IDA_examples}) endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) if((RAJA_BACKENDS MATCHES "TARGET_OPENMP") OR (RAJA_BACKENDS MATCHES "OPENMP" )) diff --git a/examples/ida/mpiraja/README b/examples/ida/mpiraja/README index 829b6b6c32..f97bc07fd5 100644 --- a/examples/ida/mpiraja/README +++ b/examples/ida/mpiraja/README @@ -1,5 +1,3 @@ List of MPI+RAJA IDA examples idaHeat2D_kry_p_mpiraja : 2D heat equation with SPGMR, diagonal preconditioner and MPI+RAJA vector - - diff --git a/examples/ida/parallel/CMakeLists.txt b/examples/ida/parallel/CMakeLists.txt index 18e20284ef..0cb5bc31f0 100644 --- a/examples/ida/parallel/CMakeLists.txt +++ b/examples/ida/parallel/CMakeLists.txt @@ -71,18 +71,19 @@ foreach(example_tuple ${IDA_examples}) endif() # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/parallel) endif() endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/parallel) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -101,7 +102,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -115,7 +116,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/parallel RENAME Makefile) endif() diff --git a/examples/ida/parallel/README b/examples/ida/parallel/README index c34f1f3e48..bd58f71af0 100644 --- a/examples/ida/parallel/README +++ b/examples/ida/parallel/README @@ -4,46 +4,3 @@ List of parallel IDA examples idaFoodWeb_kry_p : 2-D food web, block-diagonal preconditioner idaHeat2D_kry_bbd_p : 2-D heat equation, BBD preconditioner idaHeat2D_kry_p : 2-D heat equation, diagonal preconditioner - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/ida/petsc/CMakeLists.txt b/examples/ida/petsc/CMakeLists.txt index 606c28e793..5e49791825 100644 --- a/examples/ida/petsc/CMakeLists.txt +++ b/examples/ida/petsc/CMakeLists.txt @@ -96,17 +96,17 @@ foreach(example_tuple ${IDA_examples}) file(GLOB example_out ${example}*.out) # install example - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/petsc) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/petsc) endif() endforeach(example_tuple ${IDA_examples}) -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/petsc) + install(FILES README DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/petsc) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -125,7 +125,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/petsc/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/petsc) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/petsc) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -139,7 +139,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/petsc/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/petsc + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/petsc RENAME Makefile) endif() diff --git a/examples/ida/petsc/README b/examples/ida/petsc/README index d3e2e1f8bf..ae7176d5b5 100644 --- a/examples/ida/petsc/README +++ b/examples/ida/petsc/README @@ -1,25 +1,4 @@ List of PETSc IDA examples - idaHeat2D_petsc_spgmr : 2D heat equation with Newton, SPGMR and PETSc vector - idaHeat2D_petsc_snes : 2D heat equation with PETSc SNES/KSP/PC - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=ON \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_PETSC=ON \ --DPETSC_DIR=/path/to/petsc/ -../sundials + idaHeat2D_petsc_spgmr : 2D heat equation with Newton, SPGMR and PETSc vector + idaHeat2D_petsc_snes : 2D heat equation with PETSc SNES/KSP/PC diff --git a/examples/ida/raja/CMakeLists.txt b/examples/ida/raja/CMakeLists.txt index 2744d16d6a..bc6a8dd28d 100644 --- a/examples/ida/raja/CMakeLists.txt +++ b/examples/ida/raja/CMakeLists.txt @@ -68,7 +68,7 @@ foreach(example_tuple ${IDA_examples}) endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) if((RAJA_BACKENDS MATCHES "TARGET_OPENMP") OR (RAJA_BACKENDS MATCHES "OPENMP" )) diff --git a/examples/ida/raja/README b/examples/ida/raja/README index 386a14ce82..ba86275824 100644 --- a/examples/ida/raja/README +++ b/examples/ida/raja/README @@ -1,5 +1,3 @@ List of RAJA IDA examples idaHeat2D_kry_raja : 2D heat equation with SPGMR, diagonal preconditioner and RAJA vector - - diff --git a/examples/ida/serial/CMakeLists.txt b/examples/ida/serial/CMakeLists.txt index 014ad75582..1999014ccb 100644 --- a/examples/ida/serial/CMakeLists.txt +++ b/examples/ida/serial/CMakeLists.txt @@ -97,15 +97,16 @@ foreach(example_tuple ${IDA_examples}) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) endif() endforeach(example_tuple ${IDA_examples}) # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackband @@ -150,9 +151,9 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) endif() endforeach(example_tuple ${IDA_examples_BL}) @@ -160,7 +161,7 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) endif() # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_sunlinsolklu) @@ -207,9 +208,9 @@ if(BUILD_SUNLINSOL_KLU) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) endif() endforeach(example_tuple ${IDA_examples_KLU}) @@ -217,7 +218,7 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) # Sundials SuperLU_MT linear solver module set(SUNLINSOLSLUMT_LIBS sundials_sunlinsolsuperlumt) @@ -270,9 +271,9 @@ if(BUILD_SUNLINSOL_SUPERLUMT) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) endif() endforeach(example_tuple ${IDA_examples_SUPERLUMT}) @@ -280,14 +281,15 @@ if(BUILD_SUNLINSOL_SUPERLUMT) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + install(FILES README DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) # Install the extra files foreach(extrafile ${IDA_extras}) - install(FILES ${extrafile} DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + install(FILES ${extrafile} + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -296,19 +298,20 @@ if(EXAMPLES_INSTALL) examples2string(IDA_examples EXAMPLES) - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) examples2string(IDA_examples_BL EXAMPLES_BL) else() set(EXAMPLES_BL "") endif() - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) examples2string(IDA_examples_KLU EXAMPLES_KLU) else() set(EXAMPLES_KLU "") endif() - if(BUILD_SUNLINSOL_SUPERLUMT) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) examples2string(IDA_examples_SUPERLUMT EXAMPLES_SLUMT) if(SUNDIALS_SUPERLUMT_THREAD_TYPE STREQUAL "PTHREAD") set(THREAD_LIBRARY_SLUMT ${CMAKE_THREAD_LIBS_INIT}) @@ -331,7 +334,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -345,7 +348,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/serial RENAME Makefile) endif() diff --git a/examples/ida/serial/README b/examples/ida/serial/README index b3d31c82b9..8484630ee9 100644 --- a/examples/ida/serial/README +++ b/examples/ida/serial/README @@ -11,46 +11,3 @@ List of serial IDA examples idaRoberts_klu : Robertson system with KLU sparse linear solver idaRoberts_sps : Robertson system with SuperLUMT sparse linear solver idaSlCrank_dns : slider-crank example (stabilized index-2 DAE) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/ida/trilinos/CMakeLists.txt b/examples/ida/trilinos/CMakeLists.txt index 5c659a773b..b4a14fb521 100644 --- a/examples/ida/trilinos/CMakeLists.txt +++ b/examples/ida/trilinos/CMakeLists.txt @@ -61,18 +61,19 @@ foreach(example_tuple ${IDA_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS} ${EXE_EXTRA_LINK_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/trilinos) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/trilinos) endif() endforeach(example_tuple ${IDA_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/trilinos) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/trilinos) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDA") @@ -91,7 +92,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/ida/trilinos/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/trilinos) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/trilinos) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -105,7 +106,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/ida/trilinos/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/trilinos + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/ida/trilinos RENAME Makefile) endif() diff --git a/examples/ida/trilinos/README b/examples/ida/trilinos/README index ece2b1a764..d34b5e74df 100644 --- a/examples/ida/trilinos/README +++ b/examples/ida/trilinos/README @@ -2,5 +2,3 @@ List of Trilinos IDA examples idaHeat2D_kry_tpetra : 2D heat equation with SPGMR, diagonal preconditioner, single node and Tpetra vector idaHeat2D_kry_p_tpetra : 2D heat equation with SPGMR, diagonal preconditioner, 4 MPI ranks and Tpetra vector - - diff --git a/examples/idas/CMakeLists.txt b/examples/idas/CMakeLists.txt index b9118ea045..1cca3e54be 100644 --- a/examples/idas/CMakeLists.txt +++ b/examples/idas/CMakeLists.txt @@ -18,16 +18,16 @@ # --------------------------------------------------------------- # C examples -if(EXAMPLES_ENABLE_C) +if(SUNDIALS_EXAMPLES_ENABLE_C) add_subdirectory(serial) - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(C_openmp) endif() - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) endif() endif() -if(BUILD_FORTRAN_MODULE_INTERFACE AND EXAMPLES_ENABLE_F2003) +if(SUNDIALS_ENABLE_FORTRAN AND SUNDIALS_EXAMPLES_ENABLE_FORTRAN) add_subdirectory(F2003_serial) endif() diff --git a/examples/idas/C_openmp/CMakeLists.txt b/examples/idas/C_openmp/CMakeLists.txt index f5fe6fa6f4..a1742fe3ad 100644 --- a/examples/idas/C_openmp/CMakeLists.txt +++ b/examples/idas/C_openmp/CMakeLists.txt @@ -68,23 +68,24 @@ foreach(example_tuple ${IDAS_examples}) endif() # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/C_openmp) endif() endforeach(example_tuple ${IDAS_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/C_openmp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/C_openmp) # Install the extra files foreach(extrafile ${IDAS_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/C_openmp) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -104,7 +105,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/idas/C_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/C_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -118,7 +119,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/idas/C_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/C_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/C_openmp RENAME Makefile) endif() diff --git a/examples/idas/C_openmp/README b/examples/idas/C_openmp/README index 16df732f48..cdba15f507 100644 --- a/examples/idas/C_openmp/README +++ b/examples/idas/C_openmp/README @@ -2,46 +2,3 @@ List of C_openmp examples for IDAS idasFoodWeb_bnd_omp : 2-D food web system, banded Jacobian idasFoodWeb_kry_omp : 2-D food web system using Krylov solver - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/idas/F2003_serial/CMakeLists.txt b/examples/idas/F2003_serial/CMakeLists.txt index 9078c6dc88..3b92c88b98 100644 --- a/examples/idas/F2003_serial/CMakeLists.txt +++ b/examples/idas/F2003_serial/CMakeLists.txt @@ -58,14 +58,14 @@ foreach(example_tuple ${FIDAS_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/F2003_serial) endif() endforeach(example_tuple ${FIDAS_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDAS") @@ -85,7 +85,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/idas/F2003_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/F2003_serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -99,7 +99,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/idas/F2003_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/F2003_serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/F2003_serial RENAME Makefile) endif() diff --git a/examples/idas/parallel/CMakeLists.txt b/examples/idas/parallel/CMakeLists.txt index d2aaef592a..1102c74553 100644 --- a/examples/idas/parallel/CMakeLists.txt +++ b/examples/idas/parallel/CMakeLists.txt @@ -93,18 +93,19 @@ foreach(example_tuple ${IDAS_examples}) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/parallel) endif() endforeach(example_tuple ${IDAS_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/parallel) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "IDAS") @@ -123,7 +124,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/idas/parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -137,7 +138,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/idas/parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/parallel RENAME Makefile) endif() diff --git a/examples/idas/parallel/README b/examples/idas/parallel/README index 0e894f3c0a..2ab514954d 100644 --- a/examples/idas/parallel/README +++ b/examples/idas/parallel/README @@ -8,46 +8,3 @@ List of parallel IDAS examples idasHeat2D_FSA_kry_bbd_p : 2-D heat equation, BBD preconditioner, FSA idasHeat2D_kry_bbd_p : 2-D heat equation, BBD preconditioner idasHeat2D_kry_p : 2-D heat equation, diagonal preconditioner - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/idas/serial/CMakeLists.txt b/examples/idas/serial/CMakeLists.txt index 669f04f7e6..cd8d9c7641 100644 --- a/examples/idas/serial/CMakeLists.txt +++ b/examples/idas/serial/CMakeLists.txt @@ -106,15 +106,16 @@ foreach(example_tuple ${IDAS_examples}) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) endif() endforeach(example_tuple ${IDAS_examples}) # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackband @@ -159,9 +160,9 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) endif() endforeach(example_tuple ${IDAS_examples_BL}) @@ -169,7 +170,7 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) endif() # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_sunlinsolklu) @@ -216,9 +217,9 @@ if(BUILD_SUNLINSOL_KLU) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) endif() endforeach(example_tuple ${IDAS_examples_KLU}) @@ -226,7 +227,7 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) # Sundials SuperLU_MT linear solver module set(SUNLINSOLSLUMT_LIBS sundials_sunlinsolsuperlumt) @@ -279,9 +280,9 @@ if(BUILD_SUNLINSOL_SUPERLUMT) file(GLOB example_out ${example}*.out) # install example source and .out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) endif() endforeach(example_tuple ${IDAS_examples_SUPERLUMT}) @@ -289,14 +290,16 @@ if(BUILD_SUNLINSOL_SUPERLUMT) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) # Install the extra files foreach(extrafile ${IDAS_extras}) - install(FILES ${extrafile} DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + install(FILES ${extrafile} + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -305,19 +308,20 @@ if(EXAMPLES_INSTALL) examples2string(IDAS_examples EXAMPLES) - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) examples2string(IDAS_examples_BL EXAMPLES_BL) else() set(EXAMPLES_BL "") endif() - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) examples2string(IDAS_examples_KLU EXAMPLES_KLU) else() set(EXAMPLES_KLU "") endif() - if(BUILD_SUNLINSOL_SUPERLUMT) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) examples2string(IDAS_examples_SUPERLUMT EXAMPLES_SLUMT) if(SUNDIALS_SUPERLUMT_THREAD_TYPE STREQUAL "PTHREAD") set(THREAD_LIBRARY_SLUMT ${CMAKE_THREAD_LIBS_INIT}) @@ -340,7 +344,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/idas/serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -354,7 +358,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/idas/serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/idas/serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/idas/serial RENAME Makefile) endif() diff --git a/examples/idas/serial/README b/examples/idas/serial/README index cea28862a6..389fe0dc2a 100644 --- a/examples/idas/serial/README +++ b/examples/idas/serial/README @@ -18,47 +18,3 @@ List of serial IDAS examples idasRoberts_ASAi_sps : ASA for Robertson system with SuperLUMT sparse solver idasSlCrank_dns : slider-crank simulation idasSlCrank_FSA_dns : forward sensitivity for slider-crank - - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/kinsol/CMakeLists.txt b/examples/kinsol/CMakeLists.txt index 4fd48aae68..03e0a8fc12 100644 --- a/examples/kinsol/CMakeLists.txt +++ b/examples/kinsol/CMakeLists.txt @@ -19,42 +19,42 @@ # --------------------------------------------------------------- # C examples -if(EXAMPLES_ENABLE_C) +if(SUNDIALS_EXAMPLES_ENABLE_C) add_subdirectory(serial) - if(ENABLE_OPENMP AND OPENMP_FOUND) + if(SUNDIALS_ENABLE_OPENMP AND OPENMP_FOUND) # the only example here need special handling from testrunner (not yet # implemented) add_subdirectory(C_openmp) endif() - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) endif() endif() # C++ examples -if(EXAMPLES_ENABLE_CXX) - if(ENABLE_MPI AND MPI_CXX_FOUND) +if(SUNDIALS_EXAMPLES_ENABLE_CXX) + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND) add_subdirectory(CXX_parallel) endif() - if(ENABLE_MPI + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND - AND ENABLE_HYPRE + AND SUNDIALS_ENABLE_HYPRE AND HYPRE_FOUND) add_subdirectory(CXX_parhyp) endif() endif() # CUDA examples -if(EXAMPLES_ENABLE_CUDA) - if(ENABLE_MPI AND MPI_CXX_FOUND) +if(SUNDIALS_EXAMPLES_ENABLE_CUDA) + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND) add_subdirectory(CUDA_mpi) endif() endif() # Fortran examples -if(BUILD_FORTRAN_MODULE_INTERFACE AND EXAMPLES_ENABLE_F2003) +if(SUNDIALS_ENABLE_FORTRAN AND SUNDIALS_EXAMPLES_ENABLE_FORTRAN) add_subdirectory(F2003_serial) - if(ENABLE_MPI) + if(SUNDIALS_ENABLE_MPI) add_subdirectory(F2003_parallel) endif() endif() diff --git a/examples/kinsol/CUDA_mpi/CMakeLists.txt b/examples/kinsol/CUDA_mpi/CMakeLists.txt index fcb0797b08..edc689fd15 100644 --- a/examples/kinsol/CUDA_mpi/CMakeLists.txt +++ b/examples/kinsol/CUDA_mpi/CMakeLists.txt @@ -63,7 +63,7 @@ foreach(example_tuple ${KINSOL_examples}) endforeach() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( kinsol KINSOL_examples diff --git a/examples/kinsol/CXX_parallel/CMakeLists.txt b/examples/kinsol/CXX_parallel/CMakeLists.txt index 0c62945ab4..89347724ae 100644 --- a/examples/kinsol/CXX_parallel/CMakeLists.txt +++ b/examples/kinsol/CXX_parallel/CMakeLists.txt @@ -71,7 +71,7 @@ foreach(example_tuple ${KINSOL_examples}) endforeach() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) sundials_install_examples( kinsol KINSOL_examples diff --git a/examples/kinsol/CXX_parallel/README b/examples/kinsol/CXX_parallel/README index 58018e3e14..645c8fb7f1 100644 --- a/examples/kinsol/CXX_parallel/README +++ b/examples/kinsol/CXX_parallel/README @@ -2,51 +2,3 @@ List of parallel KINSOL C++ examples kin_heat2D_nonlin_p : steady-state 2-D heat equation with added nonlinear term kin_em_p : expectation-maximization problem for mixture densities - -Sample results: - - The example output was produced by running: - - mpiexec -n 4 ./kin_heat2D_nonlin_p --np 2 2 - -The following CMake command was used to configure SUNDIALS: - -export OMP_NUM_THREADS=8 -cmake \ - -DSUNDIALS_INDEX_SIZE=64 \ - \ - -DCMAKE_INSTALL_PREFIX="${INST_DIR}" \ - -DEXAMPLES_INSTALL_PATH="${INST_DIR}/examples" \ - \ - -DENABLE_MPI=ON \ - -DMPI_C_COMPILER="${MPIDIR}/bin/mpicc" \ - -DMPI_CXX_COMPILER="${MPIDIR}/bin/mpicxx" \ - -DMPIEXEC_EXECUTABLE="${MPIDIR}/bin/mpirun" \ - \ - -DENABLE_OPENMP=ON \ - \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_CVODE=ON \ - -DBUILD_CVODES=OFF \ - -DBUILD_IDA=OFF \ - -DBUILD_IDAS=OFF \ - -DBUILD_ARKODE=OFF \ - -DBUILD_KINSOL=ON \ - -DBUILD_TESTING=ON \ - -DEXAMPLES_ENABLE_CXX=ON \ - \ - -DBLAS_ENABLE=OFF \ - -DBLAS_LIBRARIES="${BLAS_LIBRARIES}" \ - \ - -DENABLE_LAPACK=OFF \ - -DLAPACK_LIBRARIES="${LAPACK_LIBRARIES}" \ - \ - ../ - - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz - Operating System: Red Hat 7.6 - C/Fortran Compilers: gcc/gfortran v4.9.4 - MPI: Open MPI v3.1.2 diff --git a/examples/kinsol/CXX_parhyp/CMakeLists.txt b/examples/kinsol/CXX_parhyp/CMakeLists.txt index cdfb9aa25c..20f210f710 100644 --- a/examples/kinsol/CXX_parhyp/CMakeLists.txt +++ b/examples/kinsol/CXX_parhyp/CMakeLists.txt @@ -78,24 +78,25 @@ foreach(example_tuple ${KINSOL_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.cpp ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) endif() endforeach(example_tuple ${KINSOL_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the header files foreach(extrafile ${KINSOL_headers}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) endforeach() # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "KINSOL") @@ -114,7 +115,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/kinsol/CXX_parhyp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -128,7 +129,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/CXX_parhyp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/CXX_parhyp RENAME Makefile) endif() diff --git a/examples/kinsol/CXX_parhyp/README b/examples/kinsol/CXX_parhyp/README index daf55a839e..222c1894a2 100644 --- a/examples/kinsol/CXX_parhyp/README +++ b/examples/kinsol/CXX_parhyp/README @@ -1,58 +1,4 @@ List of parallel KINSOL C++ examples kin_heat2D_nonlin_hypre_pfmg : steady-state 2-D heat equation with added nonlinear term - kin_bratu2D_hypre_pfmg : 2-D Bratu problem - -Sample results: - - The example outputs were produced by running: - - mpiexec -n 4 ./kin_heat2D_nonlin_hypre_pfmg --np 2 2 - mpiexec -n 4 ./kin_bratu2D_hypre_pfmg --np 2 2 - -The following CMake command was used to configure SUNDIALS: - -export OMP_NUM_THREADS=8 -cmake \ - -DSUNDIALS_INDEX_SIZE=64 \ - \ - -DCMAKE_INSTALL_PREFIX="${INST_DIR}" \ - -DEXAMPLES_INSTALL_PATH="${INST_DIR}/examples" \ - \ - -DENABLE_MPI=ON \ - -DMPI_C_COMPILER="${MPIDIR}/bin/mpicc" \ - -DMPI_CXX_COMPILER="${MPIDIR}/bin/mpicxx" \ - -DMPIEXEC_EXECUTABLE="${MPIDIR}/bin/mpirun" \ - \ - -DENABLE_OPENMP=ON \ - \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_CVODE=ON \ - -DBUILD_CVODES=OFF \ - -DBUILD_IDA=OFF \ - -DBUILD_IDAS=OFF \ - -DBUILD_ARKODE=OFF \ - -DBUILD_KINSOL=ON \ - -DBUILD_TESTING=ON \ - -DEXAMPLES_ENABLE_CXX=ON \ - \ - -DBLAS_ENABLE=OFF \ - -DBLAS_LIBRARIES="${BLAS_LIBRARIES}" \ - \ - -DENABLE_LAPACK=OFF \ - -DLAPACK_LIBRARIES="${LAPACK_LIBRARIES}" \ - \ - -DENABLE_HYPRE=ON \ - -DHYPRE_LIBRARIES="${HYPRE_DIR}/lib/libHYPRE.a" - -DHYPRE_INCLUDE_DIR="${HYPRE_DIR}/lib" - -DHYPRE_LIBRARY_DIR="${HYPRE_DIR}/include" - \ - ../ - - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz - Operating System: Red Hat 7.6 - C/Fortran Compilers: gcc/gfortran v4.9.4 - MPI: Open MPI v3.1.2 + kin_bratu2D_hypre_pfmg : 2-D Bratu problem diff --git a/examples/kinsol/C_openmp/CMakeLists.txt b/examples/kinsol/C_openmp/CMakeLists.txt index 218cf54100..57a735827b 100644 --- a/examples/kinsol/C_openmp/CMakeLists.txt +++ b/examples/kinsol/C_openmp/CMakeLists.txt @@ -58,18 +58,19 @@ foreach(example_tuple ${KINSOL_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/C_openmp) endif() endforeach(example_tuple ${KINSOL_examples_OMP}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/C_openmp) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/C_openmp) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "KINSOL") @@ -88,7 +89,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/kinsol/C_openmp/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/C_openmp) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/C_openmp) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -102,7 +103,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/C_openmp/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/C_openmp + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/C_openmp RENAME Makefile) endif() diff --git a/examples/kinsol/C_openmp/README b/examples/kinsol/C_openmp/README index fdfffa42c9..f864425320 100644 --- a/examples/kinsol/C_openmp/README +++ b/examples/kinsol/C_openmp/README @@ -1,46 +1,3 @@ List of C_openmp KINSOL examples kinFoodWeb_kry_omp: 2-D food web system, block-diagonal preconditioner - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/kinsol/F2003_parallel/CMakeLists.txt b/examples/kinsol/F2003_parallel/CMakeLists.txt index e13328644f..78af0681be 100644 --- a/examples/kinsol/F2003_parallel/CMakeLists.txt +++ b/examples/kinsol/F2003_parallel/CMakeLists.txt @@ -75,20 +75,20 @@ foreach(example_tuple ${FKINSOL_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example_out} - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel) endif() endforeach(example_tuple ${FKINSOL_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the extra files foreach(extrafile ${KINSOL_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -116,7 +116,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/F2003_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -130,7 +130,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/F2003_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_parallel RENAME Makefile) endif() diff --git a/examples/kinsol/F2003_serial/CMakeLists.txt b/examples/kinsol/F2003_serial/CMakeLists.txt index 5fba59ce3b..527e3a09e8 100644 --- a/examples/kinsol/F2003_serial/CMakeLists.txt +++ b/examples/kinsol/F2003_serial/CMakeLists.txt @@ -61,14 +61,14 @@ foreach(example_tuple ${FKINSOL_examples}) target_link_libraries(${example} ${SUNDIALS_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_serial) endif() endforeach(example_tuple ${FKINSOL_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "KINSOL") @@ -89,7 +89,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/F2003_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -103,7 +103,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/F2003_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/F2003_serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/F2003_serial RENAME Makefile) endif() diff --git a/examples/kinsol/parallel/CMakeLists.txt b/examples/kinsol/parallel/CMakeLists.txt index 034101de8f..388e08c494 100644 --- a/examples/kinsol/parallel/CMakeLists.txt +++ b/examples/kinsol/parallel/CMakeLists.txt @@ -69,18 +69,19 @@ foreach(example_tuple ${KINSOL_examples}) endif() # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/parallel) endif() endforeach(example_tuple ${KINSOL_examples}) # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/parallel) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/parallel) # Prepare substitution variables for Makefile and/or CMakeLists templates set(SOLVER "KINSOL") @@ -99,7 +100,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/kinsol/parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/parallel) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/parallel) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -113,7 +114,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/parallel + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/parallel RENAME Makefile) endif() diff --git a/examples/kinsol/parallel/README b/examples/kinsol/parallel/README index 3051052e95..5c70f5278f 100644 --- a/examples/kinsol/parallel/README +++ b/examples/kinsol/parallel/README @@ -2,46 +2,3 @@ List of parallel KINSOL examples kinFoodWeb_kry_bbd_p: 2-D food web system, BBD preconditioner kinFoodWeb_kry_p: 2-D food web system, block-diagonal preconditioner - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/kinsol/serial/CMakeLists.txt b/examples/kinsol/serial/CMakeLists.txt index 6b45b5f667..1e1a06ea58 100644 --- a/examples/kinsol/serial/CMakeLists.txt +++ b/examples/kinsol/serial/CMakeLists.txt @@ -104,15 +104,16 @@ foreach(example_tuple ${KINSOL_examples}) file(GLOB example_out ${example}*.out) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) endif() endforeach(example_tuple ${KINSOL_examples}) # Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) # Sundials LAPACK linear solver modules set(SUNLINSOLLAPACK_LIBS sundials_sunlinsollapackband @@ -140,9 +141,9 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLLAPACK_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) endif() endforeach(example_tuple ${KINSOL_examples_BL}) @@ -150,7 +151,7 @@ if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) endif() # Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) # Sundials KLU linear solver module set(SUNLINSOLKLU_LIBS sundials_sunlinsolklu) @@ -180,9 +181,9 @@ if(BUILD_SUNLINSOL_KLU) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) endif() endforeach(example_tuple ${KINSOL_examples_KLU}) @@ -190,7 +191,7 @@ if(BUILD_SUNLINSOL_KLU) endif() # Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) # Sundials SuperLU_MT linear solver module set(SUNLINSOLSLUMT_LIBS sundials_sunlinsolsuperlumt) @@ -220,9 +221,9 @@ if(BUILD_SUNLINSOL_SUPERLUMT) target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLSLUMT_LIBS}) # install example source and out files - if(EXAMPLES_INSTALL) + if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) install(FILES ${example}.c ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) endif() endforeach(example_tuple ${KINSOL_examples_SUPERLUMT}) @@ -230,15 +231,16 @@ if(BUILD_SUNLINSOL_SUPERLUMT) endif() # create Makefile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) +if(SUNDIALS_EXAMPLES_ENABLE_INSTALL) # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + install(FILES README + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) # Install the extra files foreach(extrafile ${KINSOL_extras}) install(FILES ${extrafile} - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) endforeach() # Prepare substitution variables for Makefile and/or CMakeLists templates @@ -247,19 +249,20 @@ if(EXAMPLES_INSTALL) examples2string(KINSOL_examples EXAMPLES) - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) + if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND + AND SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) examples2string(KINSOL_examples_BL EXAMPLES_BL) else() set(EXAMPLES_BL "") endif() - if(BUILD_SUNLINSOL_KLU) + if(SUNDIALS_ENABLE_SUNLINSOL_KLU) examples2string(KINSOL_examples_KLU EXAMPLES_KLU) else() set(EXAMPLES_KLU "") endif() - if(BUILD_SUNLINSOL_SUPERLUMT) + if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) examples2string(KINSOL_examples_SUPERLUMT EXAMPLES_SLUMT) if(SUNDIALS_SUPERLUMT_THREAD_TYPE STREQUAL "PTHREAD") set(THREAD_LIBRARY_SLUMT ${CMAKE_THREAD_LIBS_INIT}) @@ -282,7 +285,7 @@ if(EXAMPLES_INSTALL) # install CMakelists.txt install(FILES ${PROJECT_BINARY_DIR}/examples/kinsol/serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial) + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial) # On UNIX-type platforms, we also generate and install a makefile for # building the examples. This makefile can then be used as a template for the @@ -296,7 +299,7 @@ if(EXAMPLES_INSTALL) # install the configured Makefile_ex as Makefile install( FILES ${PROJECT_BINARY_DIR}/examples/kinsol/serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/kinsol/serial + DESTINATION ${SUNDIALS_EXAMPLES_INSTALL_PATH}/kinsol/serial RENAME Makefile) endif() diff --git a/examples/kinsol/serial/README b/examples/kinsol/serial/README index 03e64453fa..ed1c3ad7fb 100644 --- a/examples/kinsol/serial/README +++ b/examples/kinsol/serial/README @@ -9,46 +9,3 @@ List of serial KINSOL examples kinRoberts_fp: 3-eqn chemical kinetics, accelerated fixed point kinRoboKin_dns: Robot kinematics problem (DENSE) kinRoboKin_slu: Robot problem with SuperLUMT sparse linear solver - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/include/sundials/sundials_config.in b/include/sundials/sundials_config.in index 1ae5facb0b..662807c61d 100644 --- a/include/sundials/sundials_config.in +++ b/include/sundials/sundials_config.in @@ -46,7 +46,6 @@ * Define SUNDIALS version numbers * -----------------------------------------------------------------*/ - #define SUNDIALS_VERSION "@PACKAGE_VERSION@" #define SUNDIALS_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@ #define SUNDIALS_VERSION_MINOR @PACKAGE_VERSION_MINOR@ @@ -54,7 +53,6 @@ #define SUNDIALS_VERSION_LABEL "@PACKAGE_VERSION_LABEL@" #define SUNDIALS_GIT_VERSION "@SUNDIALS_GIT_VERSION@" - /* ------------------------------------------------------------------ * SUNDIALS build information * -----------------------------------------------------------------*/ @@ -98,13 +96,13 @@ #cmakedefine SUNDIALS_HAVE_POSIX_TIMERS /* BUILD CVODE with fused kernel functionality */ -#cmakedefine SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#cmakedefine SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS /* BUILD SUNDIALS with monitoring functionalities */ -#cmakedefine SUNDIALS_BUILD_WITH_MONITORING +#cmakedefine SUNDIALS_ENABLE_MONITORING /* BUILD SUNDIALS with profiling functionalities */ -#cmakedefine SUNDIALS_BUILD_WITH_PROFILING +#cmakedefine SUNDIALS_ENABLE_PROFILING /* Enable error checking within SUNDIALS */ #cmakedefine SUNDIALS_ENABLE_ERROR_CHECKS @@ -286,4 +284,26 @@ @SUNDIALS_CONFIGH_BUILDS@ +/* ------------------------------------------------------------------ + * SUNDIALS deprecated macros + * -----------------------------------------------------------------*/ + +/* DEPRECATION NOTICE: SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS will be removed in + * the next major release. Use SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS instead. */ +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS +#define SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#endif + +/* DEPRECATION NOTICE: SUNDIALS_BUILD_WITH_MONITORING will be removed in the + * next major release. Use SUNDIALS_ENABLE_MONITORING instead. */ +#ifdef SUNDIALS_ENABLE_MONITORING +#define SUNDIALS_BUILD_WITH_MONITORING +#endif + +/* DEPRECATION NOTICE: SUNDIALS_BUILD_WITH_PROFILING will be removed in the next + * major release. Use SUNDIALS_ENABLE_PROFILING instead. */ +#ifdef SUNDIALS_ENABLE_PROFILING +#define SUNDIALS_BUILD_WITH_PROFILING +#endif + #endif /* _SUNDIALS_CONFIG_H */ diff --git a/include/sundials/sundials_profiler.h b/include/sundials/sundials_profiler.h index c7caba0892..301b749015 100644 --- a/include/sundials/sundials_profiler.h +++ b/include/sundials/sundials_profiler.h @@ -22,7 +22,7 @@ #include #include -#if defined(SUNDIALS_BUILD_WITH_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) +#if defined(SUNDIALS_ENABLE_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) #include "caliper/cali.h" #endif @@ -55,7 +55,7 @@ SUNErrCode SUNProfiler_Print(SUNProfiler p, FILE* fp); SUNDIALS_EXPORT SUNErrCode SUNProfiler_Reset(SUNProfiler p); -#if defined(SUNDIALS_BUILD_WITH_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) +#if defined(SUNDIALS_ENABLE_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) #define SUNDIALS_MARK_FUNCTION_BEGIN(profobj) CALI_MARK_FUNCTION_BEGIN @@ -68,7 +68,7 @@ SUNErrCode SUNProfiler_Reset(SUNProfiler p); #define SUNDIALS_MARK_END(profobj, name) CALI_MARK_END(name) -#elif defined(SUNDIALS_BUILD_WITH_PROFILING) +#elif defined(SUNDIALS_ENABLE_PROFILING) #define SUNDIALS_MARK_FUNCTION_BEGIN(profobj) \ SUNProfiler_Begin(profobj, __func__) diff --git a/include/sundials/sundials_profiler.hpp b/include/sundials/sundials_profiler.hpp index 10a8e5365d..90830a75fd 100644 --- a/include/sundials/sundials_profiler.hpp +++ b/include/sundials/sundials_profiler.hpp @@ -25,9 +25,9 @@ #include #include -#if defined(SUNDIALS_BUILD_WITH_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) +#if defined(SUNDIALS_ENABLE_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) #define SUNDIALS_CXX_MARK_FUNCTION(projobj) CALI_CXX_MARK_FUNCTION -#elif defined(SUNDIALS_BUILD_WITH_PROFILING) +#elif defined(SUNDIALS_ENABLE_PROFILING) #define SUNDIALS_CXX_MARK_FUNCTION(profobj) \ sundials::ProfilerMarkScope ProfilerMarkScope__(profobj, __func__) #else diff --git a/scripts/spack/packages/sundials/5.5.0-xsdk-patches.patch b/scripts/spack/packages/sundials/5.5.0-xsdk-patches.patch index fccdbaec2e..4018f90897 100644 --- a/scripts/spack/packages/sundials/5.5.0-xsdk-patches.patch +++ b/scripts/spack/packages/sundials/5.5.0-xsdk-patches.patch @@ -51,7 +51,7 @@ diff --git a/cmake/tpl/SundialsHypre.cmake b/cmake/tpl/SundialsHypre.cmake index 9633f1c11..19d4bf201 100644 --- a/cmake/tpl/SundialsHypre.cmake +++ b/cmake/tpl/SundialsHypre.cmake -@@ -78,15 +78,14 @@ if(HYPRE_FOUND AND (NOT HYPRE_WORKS)) +@@ -78,15 +78,14 @@ if(HYPRE_FOUND AND (NOT SUNDIALS_HYPRE_WORKS)) "ADD_EXECUTABLE(ltest ltest.c)\n" "TARGET_LINK_LIBRARIES(ltest ${HYPRE_LIBRARIES})\n") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 82cd83ee34..5142feac74 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,36 +30,31 @@ add_subdirectory(sunadjointcheckpointscheme) add_subdirectory(sundomeigest) # ARKODE library -if(BUILD_ARKODE) +if(SUNDIALS_ENABLE_ARKODE) add_subdirectory(arkode) endif() # CVODE library -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) add_subdirectory(cvode) endif() # CVODES library -if(BUILD_CVODES) +if(SUNDIALS_ENABLE_CVODES) add_subdirectory(cvodes) endif() # IDA library -if(BUILD_IDA) +if(SUNDIALS_ENABLE_IDA) add_subdirectory(ida) endif() # IDAS library -if(BUILD_IDAS) +if(SUNDIALS_ENABLE_IDAS) add_subdirectory(idas) endif() # KINSOL library -if(BUILD_KINSOL) +if(SUNDIALS_ENABLE_KINSOL) add_subdirectory(kinsol) endif() - -# CPODES library -if(BUILD_CPODES) - add_subdirectory(cpodes) -endif() diff --git a/src/arkode/CMakeLists.txt b/src/arkode/CMakeLists.txt index 43debd44c9..80e5a842f8 100644 --- a/src/arkode/CMakeLists.txt +++ b/src/arkode/CMakeLists.txt @@ -123,11 +123,11 @@ sundials_add_library( message(STATUS "Added ARKODE module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() # Add ARKODE XBraid interface -if(ENABLE_XBRAID) +if(SUNDIALS_ENABLE_XBRAID) add_subdirectory(xbraid) endif() diff --git a/src/arkode/fmod_int32/CMakeLists.txt b/src/arkode/fmod_int32/CMakeLists.txt index 8b630056b2..474c9ea769 100644 --- a/src/arkode/fmod_int32/CMakeLists.txt +++ b/src/arkode/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/arkode/fmod_int64/CMakeLists.txt b/src/arkode/fmod_int64/CMakeLists.txt index 8b630056b2..474c9ea769 100644 --- a/src/arkode/fmod_int64/CMakeLists.txt +++ b/src/arkode/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/cvode/CMakeLists.txt b/src/cvode/CMakeLists.txt index 73f7022161..33e0879142 100644 --- a/src/cvode/CMakeLists.txt +++ b/src/cvode/CMakeLists.txt @@ -47,9 +47,9 @@ set(cvode_HEADERS add_prefix(${SUNDIALS_SOURCE_DIR}/include/cvode/ cvode_HEADERS) # Build fused kernel libraries -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) - if(BUILD_NVECTOR_CUDA) + if(SUNDIALS_ENABLE_NVECTOR_CUDA) set_source_files_properties(cvode_fused_gpu.cpp PROPERTIES LANGUAGE CUDA) @@ -63,7 +63,7 @@ if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) SOVERSION ${cvodelib_SOVERSION}) endif() - if(BUILD_NVECTOR_HIP) + if(SUNDIALS_ENABLE_NVECTOR_HIP) sundials_add_library( sundials_cvode_fused_hip SOURCES cvode_fused_gpu.cpp @@ -117,6 +117,6 @@ sundials_add_library( message(STATUS "Added CVODE module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 4cc3a62433..7c07dd65ac 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -3232,7 +3232,7 @@ static int cvCheckConstraints(CVodeMem cv_mem, int* nflagPtr, * * 6. Zero out entries where the constraints passed, v = mask * v */ -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { cvCheckConstraints_fused(cv_mem->cv_constraints, cv_mem->cv_ewt, @@ -3596,7 +3596,7 @@ static void cvCompleteStep(CVodeMem cv_mem) cv_mem->cv_indx_acor = cv_mem->cv_qmax; } -#ifdef SUNDIALS_BUILD_WITH_MONITORING +#ifdef SUNDIALS_ENABLE_MONITORING /* If user access function was provided, call it now */ if (cv_mem->cv_monitorfun != NULL && !(cv_mem->cv_nst % cv_mem->cv_monitor_interval)) @@ -4880,7 +4880,7 @@ int cvEwtSet(N_Vector ycur, N_Vector weight, void* data) static int cvEwtSetSS(CVodeMem cv_mem, N_Vector ycur, N_Vector weight) { -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { /* We compute weight (inverse of tempv) regardless of the component test @@ -4920,7 +4920,7 @@ static int cvEwtSetSS(CVodeMem cv_mem, N_Vector ycur, N_Vector weight) static int cvEwtSetSV(CVodeMem cv_mem, N_Vector ycur, N_Vector weight) { -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { /* We compute weight (inverse of tempv) regardless of the component test diff --git a/src/cvode/cvode_diag.c b/src/cvode/cvode_diag.c index 394cfeb8c3..62911a811b 100644 --- a/src/cvode/cvode_diag.c +++ b/src/cvode/cvode_diag.c @@ -316,7 +316,7 @@ static int CVDiagSetup(CVodeMem cv_mem, SUNDIALS_MAYBE_UNUSED int convfail, /* Form y with perturbation = FRACT*(func. iter. correction) */ r = FRACT * cv_mem->cv_rl1; -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { cvDiagSetup_formY(cv_mem->cv_h, r, fpred, cv_mem->cv_zn[1], ypred, ftemp, y); @@ -345,7 +345,7 @@ static int CVDiagSetup(CVodeMem cv_mem, SUNDIALS_MAYBE_UNUSED int convfail, } /* Construct M = I - gamma*J with J = diag(deltaf_i/deltay_i) */ -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { cvDiagSetup_buildM(FRACT, cv_mem->cv_uround, cv_mem->cv_h, ftemp, fpred, @@ -410,7 +410,7 @@ static int CVDiagSolve(CVodeMem cv_mem, N_Vector b, if (cvdiag_mem->di_gammasv != cv_mem->cv_gamma) { r = cv_mem->cv_gamma / cvdiag_mem->di_gammasv; -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { cvDiagSolve_updateM(r, cvdiag_mem->di_M); } else #endif diff --git a/src/cvode/cvode_impl.h b/src/cvode/cvode_impl.h index bd1b9aae58..73cf16b9b8 100644 --- a/src/cvode/cvode_impl.h +++ b/src/cvode/cvode_impl.h @@ -641,7 +641,7 @@ void cvRestore(CVodeMem cv_mem, sunrealtype saved_t); void cvRescale(CVodeMem cv_mem); -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS int cvEwtSetSS_fused(const sunbooleantype atolmin0, const sunrealtype reltol, const sunrealtype Sabstol, const N_Vector ycur, N_Vector tempv, N_Vector weight); diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index 872d563218..7a99daeb79 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -105,7 +105,7 @@ int CVodeSetMonitorFn(void* cvode_mem, CVMonitorFn fn) cv_mem = (CVodeMem)cvode_mem; -#ifdef SUNDIALS_BUILD_WITH_MONITORING +#ifdef SUNDIALS_ENABLE_MONITORING cv_mem->cv_monitorfun = fn; return (CV_SUCCESS); #else @@ -142,7 +142,7 @@ int CVodeSetMonitorFrequency(void* cvode_mem, long int nst) cv_mem = (CVodeMem)cvode_mem; -#ifdef SUNDIALS_BUILD_WITH_MONITORING +#ifdef SUNDIALS_ENABLE_MONITORING cv_mem->cv_monitor_interval = nst; return (CV_SUCCESS); #else @@ -1069,7 +1069,7 @@ int CVodeGetNumConstraintCorrections(void* cvode_mem, int CVodeSetUseIntegratorFusedKernels(void* cvode_mem, sunbooleantype onoff) { CVodeMem cv_mem; -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS N_Vector_ID id; #endif @@ -1081,7 +1081,7 @@ int CVodeSetUseIntegratorFusedKernels(void* cvode_mem, sunbooleantype onoff) cv_mem = (CVodeMem)cvode_mem; -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS id = N_VGetVectorID(cv_mem->cv_ewt); if (!cv_mem->cv_MallocDone || (id != SUNDIALS_NVEC_CUDA && id != SUNDIALS_NVEC_HIP)) diff --git a/src/cvode/cvode_nls.c b/src/cvode/cvode_nls.c index ea614f39bb..9a65585b9e 100644 --- a/src/cvode/cvode_nls.c +++ b/src/cvode/cvode_nls.c @@ -382,7 +382,7 @@ static int cvNlsResidual(N_Vector ycor, N_Vector res, void* cvode_mem) if (retval < 0) { return (CV_RHSFUNC_FAIL); } if (retval > 0) { return (RHSFUNC_RECVR); } -#ifdef SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS +#ifdef SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS if (cv_mem->cv_usefused) { cvNlsResid_fused(cv_mem->cv_rl1, -cv_mem->cv_gamma, cv_mem->cv_zn[1], ycor, diff --git a/src/cvode/fmod_int32/CMakeLists.txt b/src/cvode/fmod_int32/CMakeLists.txt index 22645e65ac..f6bd98cdad 100644 --- a/src/cvode/fmod_int32/CMakeLists.txt +++ b/src/cvode/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/cvode/fmod_int64/CMakeLists.txt b/src/cvode/fmod_int64/CMakeLists.txt index 22645e65ac..f6bd98cdad 100644 --- a/src/cvode/fmod_int64/CMakeLists.txt +++ b/src/cvode/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/cvodes/CMakeLists.txt b/src/cvodes/CMakeLists.txt index 5a6c2f859e..f85613f97f 100644 --- a/src/cvodes/CMakeLists.txt +++ b/src/cvodes/CMakeLists.txt @@ -81,6 +81,6 @@ sundials_add_library( message(STATUS "Added CVODES module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/cvodes/cvodea.c b/src/cvodes/cvodea.c index 8eff80b902..332b5ebd9d 100644 --- a/src/cvodes/cvodea.c +++ b/src/cvodes/cvodea.c @@ -48,7 +48,7 @@ /* Shortcuts */ /*=================================================================*/ -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) #define CV_PROFILER cv_mem->cv_sunctx->profiler #endif diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index ff991182c3..1f188d72d7 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -7896,7 +7896,7 @@ static void cvCompleteStep(CVodeMem cv_mem) cv_mem->cv_indx_acor = cv_mem->cv_qmax; } -#ifdef SUNDIALS_BUILD_WITH_MONITORING +#ifdef SUNDIALS_ENABLE_MONITORING /* If user access function was provided, call it now */ if (cv_mem->cv_monitorfun != NULL && !(cv_mem->cv_nst % cv_mem->cv_monitor_interval)) diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index 6621b77a3e..dd3792b77a 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -105,7 +105,7 @@ int CVodeSetMonitorFn(void* cvode_mem, CVMonitorFn fn) cv_mem = (CVodeMem)cvode_mem; -#ifdef SUNDIALS_BUILD_WITH_MONITORING +#ifdef SUNDIALS_ENABLE_MONITORING cv_mem->cv_monitorfun = fn; return (CV_SUCCESS); #else @@ -142,7 +142,7 @@ int CVodeSetMonitorFrequency(void* cvode_mem, long int nst) cv_mem = (CVodeMem)cvode_mem; -#ifdef SUNDIALS_BUILD_WITH_MONITORING +#ifdef SUNDIALS_ENABLE_MONITORING cv_mem->cv_monitor_interval = nst; return (CV_SUCCESS); #else diff --git a/src/cvodes/fmod_int32/CMakeLists.txt b/src/cvodes/fmod_int32/CMakeLists.txt index 1d27b75c6e..eaac169bcb 100644 --- a/src/cvodes/fmod_int32/CMakeLists.txt +++ b/src/cvodes/fmod_int32/CMakeLists.txt @@ -17,7 +17,7 @@ # CMakeLists.txt file for the F2003 cvodes object library # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/cvodes/fmod_int64/CMakeLists.txt b/src/cvodes/fmod_int64/CMakeLists.txt index 1d27b75c6e..eaac169bcb 100644 --- a/src/cvodes/fmod_int64/CMakeLists.txt +++ b/src/cvodes/fmod_int64/CMakeLists.txt @@ -17,7 +17,7 @@ # CMakeLists.txt file for the F2003 cvodes object library # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/ida/CMakeLists.txt b/src/ida/CMakeLists.txt index b583921bf8..3dd65507c7 100644 --- a/src/ida/CMakeLists.txt +++ b/src/ida/CMakeLists.txt @@ -66,6 +66,6 @@ sundials_add_library( message(STATUS "Added IDA module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/ida/fmod_int32/CMakeLists.txt b/src/ida/fmod_int32/CMakeLists.txt index 34ec9a53d2..8ad1954ee1 100644 --- a/src/ida/fmod_int32/CMakeLists.txt +++ b/src/ida/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/ida/fmod_int64/CMakeLists.txt b/src/ida/fmod_int64/CMakeLists.txt index 34ec9a53d2..8ad1954ee1 100644 --- a/src/ida/fmod_int64/CMakeLists.txt +++ b/src/ida/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/idas/CMakeLists.txt b/src/idas/CMakeLists.txt index 653b2d1605..e824e953cd 100644 --- a/src/idas/CMakeLists.txt +++ b/src/idas/CMakeLists.txt @@ -70,6 +70,6 @@ sundials_add_library( message(STATUS "Added IDAS module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/idas/fmod_int32/CMakeLists.txt b/src/idas/fmod_int32/CMakeLists.txt index 55d2d6beee..aad0cee9dc 100644 --- a/src/idas/fmod_int32/CMakeLists.txt +++ b/src/idas/fmod_int32/CMakeLists.txt @@ -17,7 +17,7 @@ # CMakeLists.txt file for the F2003 IDAS object library # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/idas/fmod_int64/CMakeLists.txt b/src/idas/fmod_int64/CMakeLists.txt index 55d2d6beee..aad0cee9dc 100644 --- a/src/idas/fmod_int64/CMakeLists.txt +++ b/src/idas/fmod_int64/CMakeLists.txt @@ -17,7 +17,7 @@ # CMakeLists.txt file for the F2003 IDAS object library # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/idas/idaa.c b/src/idas/idaa.c index 0e8deb25d8..54630cb611 100644 --- a/src/idas/idaa.c +++ b/src/idas/idaa.c @@ -43,7 +43,7 @@ /* Shortcuts */ /*=================================================================*/ -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) #define IDA_PROFILER IDA_mem->ida_sunctx->profiler #endif diff --git a/src/kinsol/CMakeLists.txt b/src/kinsol/CMakeLists.txt index ebc134b3c6..675190b264 100644 --- a/src/kinsol/CMakeLists.txt +++ b/src/kinsol/CMakeLists.txt @@ -64,6 +64,6 @@ sundials_add_library( message(STATUS "Added KINSOL module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/kinsol/fmod_int32/CMakeLists.txt b/src/kinsol/fmod_int32/CMakeLists.txt index 1295253b84..31b0808a5d 100644 --- a/src/kinsol/fmod_int32/CMakeLists.txt +++ b/src/kinsol/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/kinsol/fmod_int64/CMakeLists.txt b/src/kinsol/fmod_int64/CMakeLists.txt index 1295253b84..31b0808a5d 100644 --- a/src/kinsol/fmod_int64/CMakeLists.txt +++ b/src/kinsol/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/kinsol/kinsol.c b/src/kinsol/kinsol.c index 67bdd3a777..8be7c750ce 100644 --- a/src/kinsol/kinsol.c +++ b/src/kinsol/kinsol.c @@ -160,7 +160,7 @@ /* Shortcuts */ /*=================================================================*/ -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) #define KIN_PROFILER kin_mem->kin_sunctx->profiler #endif diff --git a/src/nvector/CMakeLists.txt b/src/nvector/CMakeLists.txt index eb34d79a78..f448e7111b 100644 --- a/src/nvector/CMakeLists.txt +++ b/src/nvector/CMakeLists.txt @@ -20,64 +20,64 @@ # required modules add_subdirectory(serial) -if(BUILD_NVECTOR_MANYVECTOR OR BUILD_NVECTOR_MPIMANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR OR SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR) add_subdirectory(manyvector) endif() -if(BUILD_NVECTOR_PARALLEL) +if(SUNDIALS_ENABLE_NVECTOR_PARALLEL) add_subdirectory(parallel) endif() -if(BUILD_NVECTOR_MPIPLUSX) +if(SUNDIALS_ENABLE_NVECTOR_MPIPLUSX) add_subdirectory(mpiplusx) endif() -if(BUILD_NVECTOR_PARHYP) +if(SUNDIALS_ENABLE_NVECTOR_PARHYP) add_subdirectory(parhyp) endif() -if(BUILD_NVECTOR_OPENMP) +if(SUNDIALS_ENABLE_NVECTOR_OPENMP) add_subdirectory(openmp) endif() -if(BUILD_NVECTOR_OPENMPDEV) +if(SUNDIALS_ENABLE_NVECTOR_OPENMPDEV) add_subdirectory(openmpdev) endif() -if(BUILD_NVECTOR_PTHREADS) +if(SUNDIALS_ENABLE_NVECTOR_PTHREADS) add_subdirectory(pthreads) endif() -if(BUILD_NVECTOR_PETSC) +if(SUNDIALS_ENABLE_NVECTOR_PETSC) add_subdirectory(petsc) endif() -if(BUILD_NVECTOR_CUDA) +if(SUNDIALS_ENABLE_NVECTOR_CUDA) add_subdirectory(cuda) endif() -if(BUILD_NVECTOR_HIP) +if(SUNDIALS_ENABLE_NVECTOR_HIP) add_subdirectory(hip) endif() -if(BUILD_NVECTOR_SYCL) +if(SUNDIALS_ENABLE_NVECTOR_SYCL) add_subdirectory(sycl) endif() -if(BUILD_NVECTOR_RAJA) +if(SUNDIALS_ENABLE_NVECTOR_RAJA) add_subdirectory(raja) endif() -if(BUILD_NVECTOR_TRILINOS) +if(SUNDIALS_ENABLE_NVECTOR_TRILINOS) add_subdirectory(trilinos) endif() -if(BUILD_NVECTOR_KOKKOS) +if(SUNDIALS_ENABLE_NVECTOR_KOKKOS) install(CODE "MESSAGE(\"\nInstall NVECTOR_KOKKOS\n\")") - message(STATUS "Added BUILD_NVECTOR_KOKKOS module") + message(STATUS "Added SUNDIALS_ENABLE_NVECTOR_KOKKOS module") add_library(sundials_nveckokkos INTERFACE) target_link_libraries(sundials_nveckokkos INTERFACE sundials_core) - if(ENABLE_HIP) + if(SUNDIALS_ENABLE_HIP) target_link_libraries(sundials_nveckokkos INTERFACE Kokkos::kokkos hip::device) else() diff --git a/src/nvector/manyvector/CMakeLists.txt b/src/nvector/manyvector/CMakeLists.txt index 5b3e9dfef5..58fb4c6577 100644 --- a/src/nvector/manyvector/CMakeLists.txt +++ b/src/nvector/manyvector/CMakeLists.txt @@ -19,7 +19,7 @@ # --------------------------------------------------------------- # Create the sundials_nvecmanyvector library -if(BUILD_NVECTOR_MANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR) install(CODE "MESSAGE(\"\nInstall NVECTOR_MANYVECTOR\n\")") sundials_add_library( @@ -36,7 +36,7 @@ if(BUILD_NVECTOR_MANYVECTOR) endif() # Create the sundials_nvecmpimanyvector library -if(BUILD_NVECTOR_MPIMANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR) install(CODE "MESSAGE(\"\nInstall NVECTOR_MPIMANYVECTOR\n\")") if(MPI_C_COMPILER) @@ -63,6 +63,6 @@ if(BUILD_NVECTOR_MPIMANYVECTOR) endif() # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/nvector/manyvector/fmod_int32/CMakeLists.txt b/src/nvector/manyvector/fmod_int32/CMakeLists.txt index a7ba926f87..fcd0bdbbfc 100644 --- a/src/nvector/manyvector/fmod_int32/CMakeLists.txt +++ b/src/nvector/manyvector/fmod_int32/CMakeLists.txt @@ -18,12 +18,12 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() -if(BUILD_NVECTOR_MANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR) sundials_add_f2003_library( sundials_fnvecmanyvector_mod SOURCES fnvector_manyvector_mod.f90 fnvector_manyvector_mod.c @@ -34,7 +34,7 @@ if(BUILD_NVECTOR_MANYVECTOR) message(STATUS "Added NVECTOR_MANYVECTOR F2003 Interface") endif() -if(BUILD_NVECTOR_MPIMANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR) if(MPI_C_COMPILER) # use MPI wrapper as the compiler diff --git a/src/nvector/manyvector/fmod_int64/CMakeLists.txt b/src/nvector/manyvector/fmod_int64/CMakeLists.txt index a7ba926f87..fcd0bdbbfc 100644 --- a/src/nvector/manyvector/fmod_int64/CMakeLists.txt +++ b/src/nvector/manyvector/fmod_int64/CMakeLists.txt @@ -18,12 +18,12 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() -if(BUILD_NVECTOR_MANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR) sundials_add_f2003_library( sundials_fnvecmanyvector_mod SOURCES fnvector_manyvector_mod.f90 fnvector_manyvector_mod.c @@ -34,7 +34,7 @@ if(BUILD_NVECTOR_MANYVECTOR) message(STATUS "Added NVECTOR_MANYVECTOR F2003 Interface") endif() -if(BUILD_NVECTOR_MPIMANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR) if(MPI_C_COMPILER) # use MPI wrapper as the compiler diff --git a/src/nvector/mpiplusx/CMakeLists.txt b/src/nvector/mpiplusx/CMakeLists.txt index 26e3e9c550..5d9378c7c2 100644 --- a/src/nvector/mpiplusx/CMakeLists.txt +++ b/src/nvector/mpiplusx/CMakeLists.txt @@ -42,6 +42,6 @@ sundials_add_library( message(STATUS "Added NVECTOR_MPIPLUSX module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/nvector/mpiplusx/fmod_int32/CMakeLists.txt b/src/nvector/mpiplusx/fmod_int32/CMakeLists.txt index 464a14c868..c21888213e 100644 --- a/src/nvector/mpiplusx/fmod_int32/CMakeLists.txt +++ b/src/nvector/mpiplusx/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/mpiplusx/fmod_int64/CMakeLists.txt b/src/nvector/mpiplusx/fmod_int64/CMakeLists.txt index 464a14c868..c21888213e 100644 --- a/src/nvector/mpiplusx/fmod_int64/CMakeLists.txt +++ b/src/nvector/mpiplusx/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/openmp/CMakeLists.txt b/src/nvector/openmp/CMakeLists.txt index 44968bc763..5515a788c4 100644 --- a/src/nvector/openmp/CMakeLists.txt +++ b/src/nvector/openmp/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added NVECTOR_OPENMP module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/nvector/openmp/fmod_int32/CMakeLists.txt b/src/nvector/openmp/fmod_int32/CMakeLists.txt index 9ef7c0b73b..267ff41818 100644 --- a/src/nvector/openmp/fmod_int32/CMakeLists.txt +++ b/src/nvector/openmp/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/openmp/fmod_int64/CMakeLists.txt b/src/nvector/openmp/fmod_int64/CMakeLists.txt index 9ef7c0b73b..267ff41818 100644 --- a/src/nvector/openmp/fmod_int64/CMakeLists.txt +++ b/src/nvector/openmp/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/parallel/CMakeLists.txt b/src/nvector/parallel/CMakeLists.txt index 5652723259..6328ccf2ea 100644 --- a/src/nvector/parallel/CMakeLists.txt +++ b/src/nvector/parallel/CMakeLists.txt @@ -42,6 +42,6 @@ sundials_add_library( message(STATUS "Added NVECTOR_PARALLEL module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/nvector/parallel/fmod_int32/CMakeLists.txt b/src/nvector/parallel/fmod_int32/CMakeLists.txt index 433cbc76bb..02d8eaf871 100644 --- a/src/nvector/parallel/fmod_int32/CMakeLists.txt +++ b/src/nvector/parallel/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/parallel/fmod_int64/CMakeLists.txt b/src/nvector/parallel/fmod_int64/CMakeLists.txt index 433cbc76bb..02d8eaf871 100644 --- a/src/nvector/parallel/fmod_int64/CMakeLists.txt +++ b/src/nvector/parallel/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/pthreads/CMakeLists.txt b/src/nvector/pthreads/CMakeLists.txt index 4cf4a5f37e..1e783a792e 100644 --- a/src/nvector/pthreads/CMakeLists.txt +++ b/src/nvector/pthreads/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added NVECTOR_PTHREADS module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/nvector/pthreads/fmod_int32/CMakeLists.txt b/src/nvector/pthreads/fmod_int32/CMakeLists.txt index 6dd113851f..79d7573010 100644 --- a/src/nvector/pthreads/fmod_int32/CMakeLists.txt +++ b/src/nvector/pthreads/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/pthreads/fmod_int64/CMakeLists.txt b/src/nvector/pthreads/fmod_int64/CMakeLists.txt index 6dd113851f..79d7573010 100644 --- a/src/nvector/pthreads/fmod_int64/CMakeLists.txt +++ b/src/nvector/pthreads/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/serial/CMakeLists.txt b/src/nvector/serial/CMakeLists.txt index f6617c0bd8..39ffe3daaf 100644 --- a/src/nvector/serial/CMakeLists.txt +++ b/src/nvector/serial/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added NVECTOR_SERIAL module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/nvector/serial/fmod_int32/CMakeLists.txt b/src/nvector/serial/fmod_int32/CMakeLists.txt index 70a979e6f3..7d101de15d 100644 --- a/src/nvector/serial/fmod_int32/CMakeLists.txt +++ b/src/nvector/serial/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/nvector/serial/fmod_int64/CMakeLists.txt b/src/nvector/serial/fmod_int64/CMakeLists.txt index 0086433174..4488420a88 100644 --- a/src/nvector/serial/fmod_int64/CMakeLists.txt +++ b/src/nvector/serial/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadaptcontroller/imexgus/CMakeLists.txt b/src/sunadaptcontroller/imexgus/CMakeLists.txt index de43eb5f86..f154202f9b 100644 --- a/src/sunadaptcontroller/imexgus/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/CMakeLists.txt @@ -26,6 +26,6 @@ sundials_add_library( OBJECT_LIB_ONLY) # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt index 8b7be019f7..53387dfa90 100644 --- a/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt @@ -16,7 +16,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt b/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt index 8b7be019f7..53387dfa90 100644 --- a/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt @@ -16,7 +16,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadaptcontroller/mrihtol/CMakeLists.txt b/src/sunadaptcontroller/mrihtol/CMakeLists.txt index 31f893511f..539e6f3ee5 100644 --- a/src/sunadaptcontroller/mrihtol/CMakeLists.txt +++ b/src/sunadaptcontroller/mrihtol/CMakeLists.txt @@ -26,6 +26,6 @@ sundials_add_library( OBJECT_LIB_ONLY) # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunadaptcontroller/mrihtol/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/mrihtol/fmod_int32/CMakeLists.txt index 5f73b9fea1..1641d37cfa 100644 --- a/src/sunadaptcontroller/mrihtol/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/mrihtol/fmod_int32/CMakeLists.txt @@ -16,7 +16,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadaptcontroller/mrihtol/fmod_int64/CMakeLists.txt b/src/sunadaptcontroller/mrihtol/fmod_int64/CMakeLists.txt index 5f73b9fea1..1641d37cfa 100644 --- a/src/sunadaptcontroller/mrihtol/fmod_int64/CMakeLists.txt +++ b/src/sunadaptcontroller/mrihtol/fmod_int64/CMakeLists.txt @@ -16,7 +16,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadaptcontroller/soderlind/CMakeLists.txt b/src/sunadaptcontroller/soderlind/CMakeLists.txt index c94f1929d2..5a7599caf6 100644 --- a/src/sunadaptcontroller/soderlind/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/CMakeLists.txt @@ -26,6 +26,6 @@ sundials_add_library( OBJECT_LIB_ONLY) # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt index df53e0fe31..fb08828575 100644 --- a/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt @@ -16,7 +16,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt b/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt index df53e0fe31..fb08828575 100644 --- a/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt @@ -16,7 +16,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadjointcheckpointscheme/fixed/CMakeLists.txt b/src/sunadjointcheckpointscheme/fixed/CMakeLists.txt index 1e07531937..3459fbf042 100644 --- a/src/sunadjointcheckpointscheme/fixed/CMakeLists.txt +++ b/src/sunadjointcheckpointscheme/fixed/CMakeLists.txt @@ -26,6 +26,6 @@ sundials_add_library( OBJECT_LIB_ONLY) # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunadjointcheckpointscheme/fixed/fmod_int32/CMakeLists.txt b/src/sunadjointcheckpointscheme/fixed/fmod_int32/CMakeLists.txt index 1070ca7dc7..95e8fe50e4 100644 --- a/src/sunadjointcheckpointscheme/fixed/fmod_int32/CMakeLists.txt +++ b/src/sunadjointcheckpointscheme/fixed/fmod_int32/CMakeLists.txt @@ -14,7 +14,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunadjointcheckpointscheme/fixed/fmod_int64/CMakeLists.txt b/src/sunadjointcheckpointscheme/fixed/fmod_int64/CMakeLists.txt index 1070ca7dc7..95e8fe50e4 100644 --- a/src/sunadjointcheckpointscheme/fixed/fmod_int64/CMakeLists.txt +++ b/src/sunadjointcheckpointscheme/fixed/fmod_int64/CMakeLists.txt @@ -14,7 +14,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sundials/CMakeLists.txt b/src/sundials/CMakeLists.txt index fe4e2f3b43..98c20d63fa 100644 --- a/src/sundials/CMakeLists.txt +++ b/src/sundials/CMakeLists.txt @@ -67,24 +67,24 @@ set(sundials_HEADERS sundials_types.h sundials_version.h) -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) list(APPEND sundials_HEADERS sundials_mpi_errors.h) endif() -if(ENABLE_CUDA) +if(SUNDIALS_ENABLE_CUDA) list(APPEND sundials_HEADERS sundials_cuda_policies.hpp) endif() -if(ENABLE_HIP) +if(SUNDIALS_ENABLE_HIP) list(APPEND sundials_HEADERS sundials_hip_policies.hpp) endif() -if(ENABLE_SYCL) +if(SUNDIALS_ENABLE_SYCL) list(APPEND sundials_HEADERS sundials_sycl_policies.hpp) endif() # If enabled, add the XBraid interface header -if(ENABLE_XBRAID) +if(SUNDIALS_ENABLE_XBRAID) list(APPEND sundials_HEADERS sundials_xbraid.h) endif() @@ -119,23 +119,23 @@ set(sundials_SOURCES sundials_profiler.c sundials_version.c) -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) list(APPEND sundials_SOURCES sundials_mpi_errors.c) endif() # Add prefix with complete path to the source files add_prefix(${SUNDIALS_SOURCE_DIR}/src/sundials/ sundials_SOURCES) -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) set(_link_mpi_if_needed PUBLIC MPI::MPI_C $<$:MPI::MPI_CXX>) endif() -if(SUNDIALS_BUILD_WITH_PROFILING) - if(ENABLE_CALIPER) +if(SUNDIALS_ENABLE_PROFILING) + if(SUNDIALS_ENABLE_CALIPER) set(_link_caliper_if_needed PUBLIC caliper) endif() - if(ENABLE_ADIAK) + if(SUNDIALS_ENABLE_ADIAK) set(_link_adiak_if_needed PUBLIC adiak::adiak ${CMAKE_DL_LIBS}) endif() endif() @@ -158,7 +158,7 @@ install( ${SUNDIALS_SOURCE_DIR}/include/sundials/priv/sundials_logger_macros.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials/priv") -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) install( FILES ${SUNDIALS_SOURCE_DIR}/include/sundials/priv/sundials_mpi_errors_impl.h @@ -172,6 +172,6 @@ generate_export_header( "${PROJECT_BINARY_DIR}/include/sundials/sundials_export.h") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sundials/fmod_int32/CMakeLists.txt b/src/sundials/fmod_int32/CMakeLists.txt index 8f7b144ec0..e0d9f48ead 100644 --- a/src/sundials/fmod_int32/CMakeLists.txt +++ b/src/sundials/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sundials/fmod_int64/CMakeLists.txt b/src/sundials/fmod_int64/CMakeLists.txt index 8f7b144ec0..e0d9f48ead 100644 --- a/src/sundials/fmod_int64/CMakeLists.txt +++ b/src/sundials/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sundials/sundials_context.c b/src/sundials/sundials_context.c index af24814493..bba275c27a 100644 --- a/src/sundials/sundials_context.c +++ b/src/sundials/sundials_context.c @@ -89,7 +89,7 @@ SUNErrCode SUNContext_Create(SUNComm comm, SUNContext* sunctx_out) if (err) { break; } #endif -#if defined(SUNDIALS_BUILD_WITH_PROFILING) && !defined(SUNDIALS_CALIPER_ENABLED) +#if defined(SUNDIALS_ENABLE_PROFILING) && !defined(SUNDIALS_CALIPER_ENABLED) err = SUNProfiler_Create(comm, "SUNContext Default", &profiler); SUNCheckCallNoRet(err); if (err) { break; } @@ -112,7 +112,7 @@ SUNErrCode SUNContext_Create(SUNComm comm, SUNContext* sunctx_out) if (err) { -#if defined(SUNDIALS_BUILD_WITH_PROFILING) && !defined(SUNDIALS_CALIPER_ENABLED) +#if defined(SUNDIALS_ENABLE_PROFILING) && !defined(SUNDIALS_CALIPER_ENABLED) SUNCheckCallNoRet(SUNProfiler_Free(&profiler)); #endif SUNCheckCallNoRet(SUNLogger_Destroy(&logger)); @@ -193,7 +193,7 @@ SUNErrCode SUNContext_GetProfiler(SUNContext sunctx, SUNProfiler* profiler) SUNFunctionBegin(sunctx); -#ifdef SUNDIALS_BUILD_WITH_PROFILING +#ifdef SUNDIALS_ENABLE_PROFILING /* get profiler */ *profiler = sunctx->profiler; #else @@ -209,7 +209,7 @@ SUNErrCode SUNContext_SetProfiler(SUNContext sunctx, SUNProfiler profiler) SUNFunctionBegin(sunctx); -#ifdef SUNDIALS_BUILD_WITH_PROFILING +#ifdef SUNDIALS_ENABLE_PROFILING /* free any existing profiler */ if (sunctx->profiler && sunctx->own_profiler) { @@ -267,7 +267,7 @@ SUNErrCode SUNContext_Free(SUNContext* sunctx) if (!sunctx || !(*sunctx)) { return SUN_SUCCESS; } -#if defined(SUNDIALS_BUILD_WITH_PROFILING) && !defined(SUNDIALS_CALIPER_ENABLED) +#if defined(SUNDIALS_ENABLE_PROFILING) && !defined(SUNDIALS_CALIPER_ENABLED) /* Find out where we are printing to */ FILE* fp = NULL; char* sunprofiler_print_env = getenv("SUNPROFILER_PRINT"); diff --git a/src/sundials/sundials_domeigestimator.c b/src/sundials/sundials_domeigestimator.c index 2349c6da2b..54efcc9002 100644 --- a/src/sundials/sundials_domeigestimator.c +++ b/src/sundials/sundials_domeigestimator.c @@ -26,7 +26,7 @@ #include -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) static SUNProfiler getSUNProfiler(SUNDomEigEstimator DEE) { return (DEE->sunctx->profiler); diff --git a/src/sundials/sundials_linearsolver.c b/src/sundials/sundials_linearsolver.c index beea4642ef..1f3267c1f1 100644 --- a/src/sundials/sundials_linearsolver.c +++ b/src/sundials/sundials_linearsolver.c @@ -29,7 +29,7 @@ #include #include "sundials_logger_impl.h" -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) static SUNProfiler getSUNProfiler(SUNLinearSolver S) { return (S->sunctx->profiler); diff --git a/src/sundials/sundials_matrix.c b/src/sundials/sundials_matrix.c index 51ed9070a2..499b8d6d05 100644 --- a/src/sundials/sundials_matrix.c +++ b/src/sundials/sundials_matrix.c @@ -30,7 +30,7 @@ #include "sundials/sundials_errors.h" #include "sundials/sundials_types.h" -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) static SUNProfiler getSUNProfiler(SUNMatrix A) { return (A->sunctx->profiler); } #endif diff --git a/src/sundials/sundials_memory.c b/src/sundials/sundials_memory.c index f4c73d4795..e40e64fea8 100644 --- a/src/sundials/sundials_memory.c +++ b/src/sundials/sundials_memory.c @@ -27,7 +27,7 @@ #include "sundials/sundials_types.h" #include "sundials_debug.h" -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) static SUNProfiler getSUNProfiler(SUNMemoryHelper H) { return (H->sunctx->profiler); diff --git a/src/sundials/sundials_nonlinearsolver.c b/src/sundials/sundials_nonlinearsolver.c index 7670911c5e..5b53ca2e62 100644 --- a/src/sundials/sundials_nonlinearsolver.c +++ b/src/sundials/sundials_nonlinearsolver.c @@ -27,7 +27,7 @@ #include #include "sundials_logger_impl.h" -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) static SUNProfiler getSUNProfiler(SUNNonlinearSolver NLS) { return (NLS->sunctx->profiler); diff --git a/src/sundials/sundials_nvector.c b/src/sundials/sundials_nvector.c index f4517835fc..ef3d9a62a9 100644 --- a/src/sundials/sundials_nvector.c +++ b/src/sundials/sundials_nvector.c @@ -31,7 +31,7 @@ #include "sundials/sundials_errors.h" #include "sundials/sundials_types.h" -#if defined(SUNDIALS_BUILD_WITH_PROFILING) +#if defined(SUNDIALS_ENABLE_PROFILING) static inline SUNProfiler getSUNProfiler(N_Vector v) { return (v->sunctx->profiler); diff --git a/src/sundomeigest/CMakeLists.txt b/src/sundomeigest/CMakeLists.txt index c325f39a6c..ec66f660d7 100644 --- a/src/sundomeigest/CMakeLists.txt +++ b/src/sundomeigest/CMakeLists.txt @@ -20,6 +20,6 @@ # required native dominant eigenvalue estimators add_subdirectory(power) -if(ENABLE_LAPACK) +if(SUNDIALS_ENABLE_LAPACK) add_subdirectory(arnoldi) endif() diff --git a/src/sundomeigest/arnoldi/CMakeLists.txt b/src/sundomeigest/arnoldi/CMakeLists.txt index 3f1ff8cab5..f7e1f8abbf 100644 --- a/src/sundomeigest/arnoldi/CMakeLists.txt +++ b/src/sundomeigest/arnoldi/CMakeLists.txt @@ -42,6 +42,6 @@ sundials_add_library( message(STATUS "Added SUNDOMEIGEST_ARNOLDI module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sundomeigest/arnoldi/fmod_int32/CMakeLists.txt b/src/sundomeigest/arnoldi/fmod_int32/CMakeLists.txt index f99f5ef755..fe3f8368a4 100644 --- a/src/sundomeigest/arnoldi/fmod_int32/CMakeLists.txt +++ b/src/sundomeigest/arnoldi/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sundomeigest/arnoldi/fmod_int64/CMakeLists.txt b/src/sundomeigest/arnoldi/fmod_int64/CMakeLists.txt index 470a75b499..f9bf669f20 100644 --- a/src/sundomeigest/arnoldi/fmod_int64/CMakeLists.txt +++ b/src/sundomeigest/arnoldi/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sundomeigest/power/CMakeLists.txt b/src/sundomeigest/power/CMakeLists.txt index 683b967136..114c997977 100644 --- a/src/sundomeigest/power/CMakeLists.txt +++ b/src/sundomeigest/power/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNDOMEIGEST_POWER module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sundomeigest/power/fmod_int32/CMakeLists.txt b/src/sundomeigest/power/fmod_int32/CMakeLists.txt index 9c71a8c074..83c62788a7 100644 --- a/src/sundomeigest/power/fmod_int32/CMakeLists.txt +++ b/src/sundomeigest/power/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sundomeigest/power/fmod_int64/CMakeLists.txt b/src/sundomeigest/power/fmod_int64/CMakeLists.txt index f6bddb60a7..95f31049af 100644 --- a/src/sundomeigest/power/fmod_int64/CMakeLists.txt +++ b/src/sundomeigest/power/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/CMakeLists.txt b/src/sunlinsol/CMakeLists.txt index 4d26da1898..d979139569 100644 --- a/src/sunlinsol/CMakeLists.txt +++ b/src/sunlinsol/CMakeLists.txt @@ -27,13 +27,13 @@ add_subdirectory(spgmr) add_subdirectory(sptfqmr) # optional TPL linear solvers -if(BUILD_SUNLINSOL_CUSOLVERSP) +if(SUNDIALS_ENABLE_SUNLINSOL_CUSOLVERSP) add_subdirectory(cusolversp) endif() -if(BUILD_SUNLINSOL_GINKGO) +if(SUNDIALS_ENABLE_SUNLINSOL_GINKGO) install(CODE "MESSAGE(\"\nInstall SUNLINSOL_GINKGO\n\")") - message(STATUS "Added BUILD_SUNLINSOL_GINKGO module") + message(STATUS "Added SUNDIALS_ENABLE_SUNLINSOL_GINKGO module") add_library(sundials_sunlinsolginkgo INTERFACE) target_link_libraries(sundials_sunlinsolginkgo INTERFACE sundials_core) target_include_directories( @@ -51,13 +51,13 @@ if(BUILD_SUNLINSOL_GINKGO) CACHE INTERNAL "" FORCE) endif() -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) add_subdirectory(klu) endif() -if(BUILD_SUNLINSOL_KOKKOSDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_KOKKOSDENSE) install(CODE "MESSAGE(\"\nInstall SUNLINSOL_KOKKOSDENSE\n\")") - message(STATUS "Added BUILD_SUNLINSOL_KOKKOSDENSE module") + message(STATUS "Added SUNDIALS_ENABLE_SUNLINSOL_KOKKOSDENSE module") add_library(sundials_sunlinsolkokkosdense INTERFACE) target_link_libraries( sundials_sunlinsolkokkosdense INTERFACE sundials_core Kokkos::kokkos @@ -76,26 +76,26 @@ if(BUILD_SUNLINSOL_KOKKOSDENSE) CACHE INTERNAL "" FORCE) endif() -if(BUILD_SUNLINSOL_LAPACKBAND) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND) add_subdirectory(lapackband) endif() -if(BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) add_subdirectory(lapackdense) endif() -if(BUILD_SUNLINSOL_MAGMADENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_MAGMADENSE) add_subdirectory(magmadense) endif() -if(BUILD_SUNLINSOL_ONEMKLDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_ONEMKLDENSE) add_subdirectory(onemkldense) endif() -if(BUILD_SUNLINSOL_SUPERLUDIST) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUDIST) add_subdirectory(superludist) endif() -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) add_subdirectory(superlumt) endif() diff --git a/src/sunlinsol/band/CMakeLists.txt b/src/sunlinsol/band/CMakeLists.txt index 9f6a036a2a..f22423af7c 100644 --- a/src/sunlinsol/band/CMakeLists.txt +++ b/src/sunlinsol/band/CMakeLists.txt @@ -36,6 +36,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_BAND module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/band/fmod_int32/CMakeLists.txt b/src/sunlinsol/band/fmod_int32/CMakeLists.txt index 8980400356..993e98b612 100644 --- a/src/sunlinsol/band/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/band/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # ---------------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/band/fmod_int64/CMakeLists.txt b/src/sunlinsol/band/fmod_int64/CMakeLists.txt index d54bfd8f70..cc5006c3de 100644 --- a/src/sunlinsol/band/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/band/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # ---------------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/dense/CMakeLists.txt b/src/sunlinsol/dense/CMakeLists.txt index ca1cdae706..99cc9c9838 100644 --- a/src/sunlinsol/dense/CMakeLists.txt +++ b/src/sunlinsol/dense/CMakeLists.txt @@ -36,6 +36,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_DENSE module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/dense/fmod_int32/CMakeLists.txt b/src/sunlinsol/dense/fmod_int32/CMakeLists.txt index 40e4ef1a11..01a3c9cb4d 100644 --- a/src/sunlinsol/dense/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/dense/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # ---------------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/dense/fmod_int64/CMakeLists.txt b/src/sunlinsol/dense/fmod_int64/CMakeLists.txt index 273cebfda9..52577ca384 100644 --- a/src/sunlinsol/dense/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/dense/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # ---------------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/klu/CMakeLists.txt b/src/sunlinsol/klu/CMakeLists.txt index d679f65a6e..c39595f0eb 100644 --- a/src/sunlinsol/klu/CMakeLists.txt +++ b/src/sunlinsol/klu/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_KLU module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/klu/fmod_int32/CMakeLists.txt b/src/sunlinsol/klu/fmod_int32/CMakeLists.txt index 8982b983ff..d9d57f6217 100644 --- a/src/sunlinsol/klu/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/klu/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/klu/fmod_int64/CMakeLists.txt b/src/sunlinsol/klu/fmod_int64/CMakeLists.txt index 42df79d066..d3191fc808 100644 --- a/src/sunlinsol/klu/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/klu/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/lapackdense/CMakeLists.txt b/src/sunlinsol/lapackdense/CMakeLists.txt index 20c2ac726a..6a7a4f78dd 100644 --- a/src/sunlinsol/lapackdense/CMakeLists.txt +++ b/src/sunlinsol/lapackdense/CMakeLists.txt @@ -42,6 +42,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_LAPACKDENSE module") # Add module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/lapackdense/fmod_int32/CMakeLists.txt b/src/sunlinsol/lapackdense/fmod_int32/CMakeLists.txt index d6bf278ac1..1562e291ab 100644 --- a/src/sunlinsol/lapackdense/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/lapackdense/fmod_int32/CMakeLists.txt @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/lapackdense/fmod_int64/CMakeLists.txt b/src/sunlinsol/lapackdense/fmod_int64/CMakeLists.txt index 40e2d45de7..9d9df3f9d2 100644 --- a/src/sunlinsol/lapackdense/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/lapackdense/fmod_int64/CMakeLists.txt @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/pcg/CMakeLists.txt b/src/sunlinsol/pcg/CMakeLists.txt index 59c5616241..bdc12643b5 100644 --- a/src/sunlinsol/pcg/CMakeLists.txt +++ b/src/sunlinsol/pcg/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_PCG module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/pcg/fmod_int32/CMakeLists.txt b/src/sunlinsol/pcg/fmod_int32/CMakeLists.txt index 158f80f18f..1436f3a349 100644 --- a/src/sunlinsol/pcg/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/pcg/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/pcg/fmod_int64/CMakeLists.txt b/src/sunlinsol/pcg/fmod_int64/CMakeLists.txt index 66c05c0c5a..19ad16db74 100644 --- a/src/sunlinsol/pcg/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/pcg/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/spbcgs/CMakeLists.txt b/src/sunlinsol/spbcgs/CMakeLists.txt index c9026a051a..fc5d571246 100644 --- a/src/sunlinsol/spbcgs/CMakeLists.txt +++ b/src/sunlinsol/spbcgs/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_SPBCGS module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/spbcgs/fmod_int32/CMakeLists.txt b/src/sunlinsol/spbcgs/fmod_int32/CMakeLists.txt index 24436c7e4a..84ff7ebb38 100644 --- a/src/sunlinsol/spbcgs/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/spbcgs/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/spbcgs/fmod_int64/CMakeLists.txt b/src/sunlinsol/spbcgs/fmod_int64/CMakeLists.txt index c1f850e77a..94e67e684c 100644 --- a/src/sunlinsol/spbcgs/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/spbcgs/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/spfgmr/CMakeLists.txt b/src/sunlinsol/spfgmr/CMakeLists.txt index cb738ae9a6..dc1ebb298a 100644 --- a/src/sunlinsol/spfgmr/CMakeLists.txt +++ b/src/sunlinsol/spfgmr/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_SPFGMR module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/spfgmr/fmod_int32/CMakeLists.txt b/src/sunlinsol/spfgmr/fmod_int32/CMakeLists.txt index 76ce4cace7..9c297533d7 100644 --- a/src/sunlinsol/spfgmr/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/spfgmr/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------ # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/spfgmr/fmod_int64/CMakeLists.txt b/src/sunlinsol/spfgmr/fmod_int64/CMakeLists.txt index 9e56f63ed3..c68e36b4b1 100644 --- a/src/sunlinsol/spfgmr/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/spfgmr/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------ # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/spgmr/CMakeLists.txt b/src/sunlinsol/spgmr/CMakeLists.txt index 5a9c5a5714..382add4e3a 100644 --- a/src/sunlinsol/spgmr/CMakeLists.txt +++ b/src/sunlinsol/spgmr/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_SPGMR module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/spgmr/fmod_int32/CMakeLists.txt b/src/sunlinsol/spgmr/fmod_int32/CMakeLists.txt index 3c6a16c991..97e2b40374 100644 --- a/src/sunlinsol/spgmr/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/spgmr/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------ # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/spgmr/fmod_int64/CMakeLists.txt b/src/sunlinsol/spgmr/fmod_int64/CMakeLists.txt index 7a815ad286..853c8b05ac 100644 --- a/src/sunlinsol/spgmr/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/spgmr/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------ # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/sptfqmr/CMakeLists.txt b/src/sunlinsol/sptfqmr/CMakeLists.txt index 55bb36287b..07228e1216 100644 --- a/src/sunlinsol/sptfqmr/CMakeLists.txt +++ b/src/sunlinsol/sptfqmr/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNLINSOL_SPTFQMR module") # Add F90 module if F2003 interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunlinsol/sptfqmr/fmod_int32/CMakeLists.txt b/src/sunlinsol/sptfqmr/fmod_int32/CMakeLists.txt index befb4983b9..cab3e32349 100644 --- a/src/sunlinsol/sptfqmr/fmod_int32/CMakeLists.txt +++ b/src/sunlinsol/sptfqmr/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------ # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunlinsol/sptfqmr/fmod_int64/CMakeLists.txt b/src/sunlinsol/sptfqmr/fmod_int64/CMakeLists.txt index b9b9b1073d..012ca77808 100644 --- a/src/sunlinsol/sptfqmr/fmod_int64/CMakeLists.txt +++ b/src/sunlinsol/sptfqmr/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------ # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmatrix/CMakeLists.txt b/src/sunmatrix/CMakeLists.txt index 19660923a6..e61aed9513 100644 --- a/src/sunmatrix/CMakeLists.txt +++ b/src/sunmatrix/CMakeLists.txt @@ -23,13 +23,13 @@ add_subdirectory(dense) add_subdirectory(sparse) # optional TPL matrices -if(BUILD_SUNMATRIX_CUSPARSE) +if(SUNDIALS_ENABLE_SUNMATRIX_CUSPARSE) add_subdirectory(cusparse) endif() -if(BUILD_SUNMATRIX_GINKGO) +if(SUNDIALS_ENABLE_SUNMATRIX_GINKGO) install(CODE "MESSAGE(\"\nInstall SUNMATRIX_GINKGO\n\")") - message(STATUS "Added BUILD_SUNMATRIX_GINKGO module") + message(STATUS "Added SUNDIALS_ENABLE_SUNMATRIX_GINKGO module") add_library(sundials_sunmatrixginkgo INTERFACE) target_link_libraries(sundials_sunmatrixginkgo INTERFACE sundials_core) target_include_directories( @@ -47,9 +47,9 @@ if(BUILD_SUNMATRIX_GINKGO) CACHE INTERNAL "" FORCE) endif() -if(BUILD_SUNMATRIX_KOKKOSDENSE) +if(SUNDIALS_ENABLE_SUNMATRIX_KOKKOSDENSE) install(CODE "MESSAGE(\"\nInstall SUNMATRIX_KOKKOSDENSE\n\")") - message(STATUS "Added BUILD_SUNMATRIX_KOKKOSDENSE module") + message(STATUS "Added SUNDIALS_ENABLE_SUNMATRIX_KOKKOSDENSE module") add_library(sundials_sunmatrixkokkosdense INTERFACE) target_link_libraries( sundials_sunmatrixkokkosdense INTERFACE sundials_core Kokkos::kokkos @@ -68,14 +68,14 @@ if(BUILD_SUNMATRIX_KOKKOSDENSE) CACHE INTERNAL "" FORCE) endif() -if(BUILD_SUNMATRIX_MAGMADENSE) +if(SUNDIALS_ENABLE_SUNMATRIX_MAGMADENSE) add_subdirectory(magmadense) endif() -if(BUILD_SUNMATRIX_ONEMKLDENSE) +if(SUNDIALS_ENABLE_SUNMATRIX_ONEMKLDENSE) add_subdirectory(onemkldense) endif() -if(BUILD_SUNMATRIX_SLUNRLOC) +if(SUNDIALS_ENABLE_SUNMATRIX_SLUNRLOC) add_subdirectory(slunrloc) endif() diff --git a/src/sunmatrix/band/CMakeLists.txt b/src/sunmatrix/band/CMakeLists.txt index fb2d470023..1e7849a17e 100644 --- a/src/sunmatrix/band/CMakeLists.txt +++ b/src/sunmatrix/band/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNMATRIX_BAND module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunmatrix/band/fmod_int32/CMakeLists.txt b/src/sunmatrix/band/fmod_int32/CMakeLists.txt index 234628a3b3..14a2a99def 100644 --- a/src/sunmatrix/band/fmod_int32/CMakeLists.txt +++ b/src/sunmatrix/band/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmatrix/band/fmod_int64/CMakeLists.txt b/src/sunmatrix/band/fmod_int64/CMakeLists.txt index 73a54d8da5..25c8f90678 100644 --- a/src/sunmatrix/band/fmod_int64/CMakeLists.txt +++ b/src/sunmatrix/band/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmatrix/dense/CMakeLists.txt b/src/sunmatrix/dense/CMakeLists.txt index 0f7ca6668e..2eb04b0652 100644 --- a/src/sunmatrix/dense/CMakeLists.txt +++ b/src/sunmatrix/dense/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added SUNMATRIX_DENSE module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunmatrix/dense/fmod_int32/CMakeLists.txt b/src/sunmatrix/dense/fmod_int32/CMakeLists.txt index c45f0cd980..915141116a 100644 --- a/src/sunmatrix/dense/fmod_int32/CMakeLists.txt +++ b/src/sunmatrix/dense/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmatrix/dense/fmod_int64/CMakeLists.txt b/src/sunmatrix/dense/fmod_int64/CMakeLists.txt index 5b07c51ccf..b5ad73e705 100644 --- a/src/sunmatrix/dense/fmod_int64/CMakeLists.txt +++ b/src/sunmatrix/dense/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmatrix/sparse/CMakeLists.txt b/src/sunmatrix/sparse/CMakeLists.txt index 40ba571ae4..d311c2d0f2 100644 --- a/src/sunmatrix/sparse/CMakeLists.txt +++ b/src/sunmatrix/sparse/CMakeLists.txt @@ -35,6 +35,6 @@ sundials_add_library( message(STATUS "Added SUNMATRIX_SPARSE module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunmatrix/sparse/fmod_int32/CMakeLists.txt b/src/sunmatrix/sparse/fmod_int32/CMakeLists.txt index 7d51734b53..aab04f85a6 100644 --- a/src/sunmatrix/sparse/fmod_int32/CMakeLists.txt +++ b/src/sunmatrix/sparse/fmod_int32/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmatrix/sparse/fmod_int64/CMakeLists.txt b/src/sunmatrix/sparse/fmod_int64/CMakeLists.txt index c22e2d61b5..f3e5f7c121 100644 --- a/src/sunmatrix/sparse/fmod_int64/CMakeLists.txt +++ b/src/sunmatrix/sparse/fmod_int64/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunmemory/CMakeLists.txt b/src/sunmemory/CMakeLists.txt index 850a5d636b..e74574a965 100644 --- a/src/sunmemory/CMakeLists.txt +++ b/src/sunmemory/CMakeLists.txt @@ -17,20 +17,20 @@ # SUNMemory level CMakeLists.txt for SUNDIALS # ------------------------------------------------------------------------------ -if(ENABLE_CALIPER AND SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_CALIPER AND SUNDIALS_ENABLE_PROFILING) include_directories(${caliper_INCLUDE_DIR}) endif() add_subdirectory(system) -if(ENABLE_CUDA) +if(SUNDIALS_ENABLE_CUDA) add_subdirectory(cuda) endif() -if(ENABLE_HIP) +if(SUNDIALS_ENABLE_HIP) add_subdirectory(hip) endif() -if(ENABLE_SYCL) +if(SUNDIALS_ENABLE_SYCL) add_subdirectory(sycl) endif() diff --git a/src/sunnonlinsol/CMakeLists.txt b/src/sunnonlinsol/CMakeLists.txt index 36020f29a9..a71641a653 100644 --- a/src/sunnonlinsol/CMakeLists.txt +++ b/src/sunnonlinsol/CMakeLists.txt @@ -21,6 +21,6 @@ add_subdirectory(newton) add_subdirectory(fixedpoint) -if(BUILD_SUNNONLINSOL_PETSCSNES) +if(SUNDIALS_ENABLE_SUNNONLINSOL_PETSCSNES) add_subdirectory(petscsnes) endif() diff --git a/src/sunnonlinsol/fixedpoint/CMakeLists.txt b/src/sunnonlinsol/fixedpoint/CMakeLists.txt index a6a0910ce9..7297a544d2 100644 --- a/src/sunnonlinsol/fixedpoint/CMakeLists.txt +++ b/src/sunnonlinsol/fixedpoint/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNNONLINSOL_FIXEDPOINT module") # Add F2003 module if the interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunnonlinsol/fixedpoint/fmod_int32/CMakeLists.txt b/src/sunnonlinsol/fixedpoint/fmod_int32/CMakeLists.txt index b15c6d9ff6..2692846ace 100644 --- a/src/sunnonlinsol/fixedpoint/fmod_int32/CMakeLists.txt +++ b/src/sunnonlinsol/fixedpoint/fmod_int32/CMakeLists.txt @@ -19,7 +19,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunnonlinsol/fixedpoint/fmod_int64/CMakeLists.txt b/src/sunnonlinsol/fixedpoint/fmod_int64/CMakeLists.txt index 0c33b9ed45..869c1e59ac 100644 --- a/src/sunnonlinsol/fixedpoint/fmod_int64/CMakeLists.txt +++ b/src/sunnonlinsol/fixedpoint/fmod_int64/CMakeLists.txt @@ -19,7 +19,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunnonlinsol/newton/CMakeLists.txt b/src/sunnonlinsol/newton/CMakeLists.txt index 0e4ec28fb4..1e5caaf76c 100644 --- a/src/sunnonlinsol/newton/CMakeLists.txt +++ b/src/sunnonlinsol/newton/CMakeLists.txt @@ -34,6 +34,6 @@ sundials_add_library( message(STATUS "Added SUNNONLINSOL_NEWTON module") # Add F2003 module if interface is enabled -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory("fmod_int${SUNDIALS_INDEX_SIZE}") endif() diff --git a/src/sunnonlinsol/newton/fmod_int32/CMakeLists.txt b/src/sunnonlinsol/newton/fmod_int32/CMakeLists.txt index a031b1d912..f04654befe 100644 --- a/src/sunnonlinsol/newton/fmod_int32/CMakeLists.txt +++ b/src/sunnonlinsol/newton/fmod_int32/CMakeLists.txt @@ -19,7 +19,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/src/sunnonlinsol/newton/fmod_int64/CMakeLists.txt b/src/sunnonlinsol/newton/fmod_int64/CMakeLists.txt index eab6911cbe..d16e352f14 100644 --- a/src/sunnonlinsol/newton/fmod_int64/CMakeLists.txt +++ b/src/sunnonlinsol/newton/fmod_int64/CMakeLists.txt @@ -19,7 +19,7 @@ # --------------------------------------------------------------- # Disable warnings from unused SWIG macros which we can't control -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-macros") endif() diff --git a/test/env/docker.sh b/test/env/docker.sh index 16d4973fd6..b26abc1cd1 100644 --- a/test/env/docker.sh +++ b/test/env/docker.sh @@ -112,7 +112,7 @@ if [ "$compilername" == "gcc" ]; then export CUDAFLAGS="-g -O3" fi - # additional Fortran flags not currently added by ENABLE_ALL_WARNINGS + # additional Fortran flags not currently added by SUNDIALS_ENABLE_ALL_WARNINGS export FFLAGS="${FFLAGS} -fcheck=all,no-pointer,no-recursion" fi diff --git a/test/env/jenkins.sh b/test/env/jenkins.sh index bfcf56ba48..d389271c27 100644 --- a/test/env/jenkins.sh +++ b/test/env/jenkins.sh @@ -86,6 +86,9 @@ export CUDAFLAGS="-O0" # SUNDIALS Options # ------------------------------------------------------------------------------ +# Unset deprecated CMake options after copying the value to the new option +export SUNDIALS_ENABLE_UNSET_DEPRECATED=ON + # Verbose build export CMAKE_VERBOSE_MAKEFILE=OFF diff --git a/test/testRunner b/test/testRunner index 5d7f064585..71710dab42 100755 --- a/test/testRunner +++ b/test/testRunner @@ -19,7 +19,7 @@ # SUNDIALS Copyright End # --------------------------------------------------------------- # Sundials test runner for CTest. Note examples must be enabled -# to use the test runner (e.g. EXAMPLES_ENABLE_C=ON). +# to use the test runner (e.g. SUNDIALS_EXAMPLES_ENABLE_C=ON). # # All output from the test runner output will be collected in # /Testing/Temporary/LastTest.log diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index f865b90b6d..0771a7acc2 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -20,34 +20,34 @@ message("Adding units tests") # Disable some warnings for tests -if(ENABLE_ALL_WARNINGS) +if(SUNDIALS_ENABLE_ALL_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") endif() add_subdirectory(sundials) -if(BUILD_ARKODE) +if(SUNDIALS_ENABLE_ARKODE) add_subdirectory(arkode) endif() -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) add_subdirectory(cvode) endif() -if(BUILD_CVODES) +if(SUNDIALS_ENABLE_CVODES) add_subdirectory(cvodes) endif() -if(BUILD_IDA) +if(SUNDIALS_ENABLE_IDA) add_subdirectory(ida) endif() -if(BUILD_IDAS) +if(SUNDIALS_ENABLE_IDAS) add_subdirectory(idas) endif() -if(BUILD_KINSOL) +if(SUNDIALS_ENABLE_KINSOL) add_subdirectory(kinsol) endif() @@ -68,7 +68,7 @@ add_subdirectory(sundomeigest) if(CXX_FOUND) add_subdirectory(logging) add_subdirectory(sunmemory) - if(SUNDIALS_BUILD_WITH_PROFILING) + if(SUNDIALS_ENABLE_PROFILING) add_subdirectory(profiling) endif() endif() diff --git a/test/unit_tests/arkode/CMakeLists.txt b/test/unit_tests/arkode/CMakeLists.txt index 0825e29b31..ea85ff3dae 100644 --- a/test/unit_tests/arkode/CMakeLists.txt +++ b/test/unit_tests/arkode/CMakeLists.txt @@ -26,12 +26,12 @@ if(CXX_FOUND) if(SUNDIALS_TEST_ENABLE_GTEST) add_subdirectory(gtest) endif() - if(ENABLE_MPI AND MPI_CXX_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_CXX_FOUND) add_subdirectory(CXX_parallel) endif() endif() # F2003 unit tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) add_subdirectory(F2003_serial) endif() diff --git a/test/unit_tests/constraints/CMakeLists.txt b/test/unit_tests/constraints/CMakeLists.txt index e9b5dccfff..cfd3a59f51 100644 --- a/test/unit_tests/constraints/CMakeLists.txt +++ b/test/unit_tests/constraints/CMakeLists.txt @@ -18,23 +18,23 @@ # List of test tuples of the form "name" set(unit_tests) -if(BUILD_ARKODE) +if(SUNDIALS_ENABLE_ARKODE) list(APPEND unit_tests "test_constraints_arkode.cpp") endif() -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) list(APPEND unit_tests "test_constraints_cvode.cpp") endif() -if(BUILD_CVODES) +if(SUNDIALS_ENABLE_CVODES) list(APPEND unit_tests "test_constraints_cvodes.cpp") endif() -if(BUILD_IDA) +if(SUNDIALS_ENABLE_IDA) list(APPEND unit_tests "test_constraints_ida.cpp") endif() -if(BUILD_IDAS) +if(SUNDIALS_ENABLE_IDAS) list(APPEND unit_tests "test_constraints_idas.cpp") endif() diff --git a/test/unit_tests/cvode/gtest/CMakeLists.txt b/test/unit_tests/cvode/gtest/CMakeLists.txt index 6be2a120e1..926a404617 100644 --- a/test/unit_tests/cvode/gtest/CMakeLists.txt +++ b/test/unit_tests/cvode/gtest/CMakeLists.txt @@ -21,7 +21,7 @@ target_include_directories( PRIVATE $ ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src) -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) +if(SUNDIALS_ENABLE_PACKAGE_FUSED_KERNELS) set(_fused_link_lib sundials_cvode_fused_stubs_obj) endif() diff --git a/test/unit_tests/logging/CMakeLists.txt b/test/unit_tests/logging/CMakeLists.txt index 502081b917..eb5b72b616 100644 --- a/test/unit_tests/logging/CMakeLists.txt +++ b/test/unit_tests/logging/CMakeLists.txt @@ -18,7 +18,7 @@ # List of test tuples of the form "name\;args" set(unit_tests) -if(BUILD_ARKODE) +if(SUNDIALS_ENABLE_ARKODE) # ARKStep list(APPEND unit_tests "test_logging_arkode_arkstep.cpp\;0") # ERK list(APPEND unit_tests "test_logging_arkode_arkstep.cpp\;1 1 1") # DIRK Newton @@ -86,29 +86,30 @@ if(BUILD_ARKODE) # sum endif() -if(BUILD_CVODE) +if(SUNDIALS_ENABLE_CVODE) list(APPEND unit_tests "test_logging_cvode.cpp\;1 1") # Newton + Dense list(APPEND unit_tests "test_logging_cvode.cpp\;1 0") # Newton + GMRES list(APPEND unit_tests "test_logging_cvode.cpp\;0") # Fixed-point endif() -if(BUILD_CVODES) +if(SUNDIALS_ENABLE_CVODES) list(APPEND unit_tests "test_logging_cvodes.cpp\;1 1") # Newton + Dense list(APPEND unit_tests "test_logging_cvodes.cpp\;1 0") # Newton + GMRES list(APPEND unit_tests "test_logging_cvodes.cpp\;0") # Fixed-point endif() -if(BUILD_IDA) +if(SUNDIALS_ENABLE_IDA) list(APPEND unit_tests "test_logging_ida.cpp\;1") # Newton + Dense list(APPEND unit_tests "test_logging_ida.cpp\;0") # Newton + GMRES endif() -if(BUILD_IDAS) +if(SUNDIALS_ENABLE_IDAS) list(APPEND unit_tests "test_logging_idas.cpp\;1") # Newton + Dense list(APPEND unit_tests "test_logging_idas.cpp\;0") # Newton + GMRES endif() -# if(BUILD_KINSOL) list(APPEND unit_tests "test_logging_kinsol.cpp\;") endif() +# if(SUNDIALS_ENABLE_KINSOL) list(APPEND unit_tests "test_logging_kinsol.cpp\;") +# endif() # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/nvector/CMakeLists.txt b/test/unit_tests/nvector/CMakeLists.txt index d0f316d449..2819f49e97 100644 --- a/test/unit_tests/nvector/CMakeLists.txt +++ b/test/unit_tests/nvector/CMakeLists.txt @@ -18,7 +18,7 @@ # test/unit_tests/nvector level CMakeLists.txt for SUNDIALS # --------------------------------------------------------------- -if(ENABLE_CALIPER AND SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_CALIPER AND SUNDIALS_ENABLE_PROFILING) include_directories(${caliper_INCLUDE_DIR}) set(EXE_EXTRA_LINK_LIBS ${EXE_EXTRA_LINK_LIBS} caliper) endif() @@ -35,9 +35,9 @@ if(BUILD_SHARED_LIBS) endif() target_link_libraries(test_nvector_obj PRIVATE sundials_nvecserial) -if(ENABLE_MPI AND MPI_C_FOUND) +if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) - if(BUILD_NVECTOR_MPIMANYVECTOR) + if(SUNDIALS_ENABLE_NVECTOR_MPIMANYVECTOR) add_subdirectory(mpimanyvector) endif() add_subdirectory(mpiplusx) @@ -50,56 +50,56 @@ if(ENABLE_MPI AND MPI_C_FOUND) target_link_libraries(test_nvectormpi_obj PRIVATE MPI::MPI_C sundials_nvecparallel) endif() -if(BUILD_NVECTOR_MANYVECTOR) +if(SUNDIALS_ENABLE_NVECTOR_MANYVECTOR) add_subdirectory(manyvector) endif() -if(BUILD_NVECTOR_PARHYP) +if(SUNDIALS_ENABLE_NVECTOR_PARHYP) add_subdirectory(parhyp) endif() -if(BUILD_NVECTOR_PTHREADS) +if(SUNDIALS_ENABLE_NVECTOR_PTHREADS) add_subdirectory(pthreads) endif() -if(BUILD_NVECTOR_OPENMP) +if(SUNDIALS_ENABLE_NVECTOR_OPENMP) add_subdirectory(C_openmp) endif() -if(BUILD_NVECTOR_OPENMPDEV) +if(SUNDIALS_ENABLE_NVECTOR_OPENMPDEV) add_subdirectory(openmpdev) endif() -if(BUILD_NVECTOR_PETSC) +if(SUNDIALS_ENABLE_NVECTOR_PETSC) add_subdirectory(petsc) endif() -if(BUILD_NVECTOR_CUDA) +if(SUNDIALS_ENABLE_NVECTOR_CUDA) add_subdirectory(cuda) - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(mpicuda) endif() endif() -if(BUILD_NVECTOR_HIP) +if(SUNDIALS_ENABLE_NVECTOR_HIP) add_subdirectory(hip) endif() -if(BUILD_NVECTOR_SYCL) +if(SUNDIALS_ENABLE_NVECTOR_SYCL) add_subdirectory(sycl) endif() -if(BUILD_NVECTOR_RAJA) +if(SUNDIALS_ENABLE_NVECTOR_RAJA) add_subdirectory(raja) - if(ENABLE_MPI AND MPI_C_FOUND) + if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(mpiraja) endif() endif() -if(BUILD_NVECTOR_TRILINOS) +if(SUNDIALS_ENABLE_NVECTOR_TRILINOS) add_subdirectory(trilinos) endif() -if(BUILD_NVECTOR_KOKKOS) +if(SUNDIALS_ENABLE_NVECTOR_KOKKOS) add_subdirectory(kokkos) endif() diff --git a/test/unit_tests/nvector/C_openmp/CMakeLists.txt b/test/unit_tests/nvector/C_openmp/CMakeLists.txt index 0f28f1429c..2bae0ec30a 100644 --- a/test/unit_tests/nvector/C_openmp/CMakeLists.txt +++ b/test/unit_tests/nvector/C_openmp/CMakeLists.txt @@ -30,7 +30,7 @@ set(nvector_openmp_examples set(nvector_examples_dependencies test_nvector) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_openmp_fortran_examples "test_fnvector_openmp_mod\;\;") endif() @@ -39,7 +39,7 @@ include_directories(. ..) # Specify libraries to link against set(NVECS_LIB sundials_nvecopenmp) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND NVECS_LIB sundials_fnvecopenmp_mod) endif() diff --git a/test/unit_tests/nvector/manyvector/CMakeLists.txt b/test/unit_tests/nvector/manyvector/CMakeLists.txt index cfa96781be..8bfb214d8e 100644 --- a/test/unit_tests/nvector/manyvector/CMakeLists.txt +++ b/test/unit_tests/nvector/manyvector/CMakeLists.txt @@ -28,7 +28,7 @@ set(nvector_manyvector_examples "test_nvector_manyvector\;1000 100 0\;" set(nvector_examples_dependencies test_nvector) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_manyvector_fortran_examples "test_fnvector_manyvector_mod\;\;") endif() @@ -37,7 +37,7 @@ include_directories(. ..) # Specify libraries to link against set(NVECS_LIB sundials_nvecserial sundials_nvecmanyvector) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND NVECS_LIB sundials_fnvecserial_mod sundials_fnvecmanyvector_mod) endif() diff --git a/test/unit_tests/nvector/mpimanyvector/CMakeLists.txt b/test/unit_tests/nvector/mpimanyvector/CMakeLists.txt index eba85ab5c6..feb3d7eb10 100644 --- a/test/unit_tests/nvector/mpimanyvector/CMakeLists.txt +++ b/test/unit_tests/nvector/mpimanyvector/CMakeLists.txt @@ -32,7 +32,7 @@ set(nvector_mpimanyvector_examples set(nvector_examples_dependencies test_nvector test_mpinvector) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_mpimanyvector_fortran_examples "test_fnvector_mpimanyvector_mod\;\;1\;1\;" "test_fnvector_mpimanyvector_mod\;\;1\;4\;") @@ -44,7 +44,7 @@ include_directories(. ..) # Specify libraries to link against set(NVECS_LIB sundials_nvecmpimanyvector sundials_nvecparallel sundials_nvecserial) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND NVECS_LIB sundials_fnvecmpimanyvector_mod sundials_fnvecserial_mod) endif() @@ -60,7 +60,7 @@ else() include_directories(${MPI_INCLUDE_PATH}) endif() -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) if(MPI_Fortran_COMPILER) # use MPI wrapper as the compiler set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER}) diff --git a/test/unit_tests/nvector/mpiplusx/CMakeLists.txt b/test/unit_tests/nvector/mpiplusx/CMakeLists.txt index 5d1969477d..0d0132b479 100644 --- a/test/unit_tests/nvector/mpiplusx/CMakeLists.txt +++ b/test/unit_tests/nvector/mpiplusx/CMakeLists.txt @@ -29,7 +29,7 @@ set(nvector_mpiplusx_examples set(nvector_examples_dependencies test_nvector test_mpinvector) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_mpiplusx_fortran_examples "test_fnvector_mpiplusx_mod\;\;1\;1\;" "test_fnvector_mpiplusx_mod\;\;1\;4\;") endif() @@ -39,7 +39,7 @@ include_directories(. ..) # Specify libraries to link against set(NVECS_LIB sundials_nvecmpiplusx sundials_nvecparallel sundials_nvecserial) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND NVECS_LIB sundials_fnvecmpiplusx_mod sundials_fnvecserial_mod) endif() @@ -54,7 +54,7 @@ else() include_directories(${MPI_INCLUDE_PATH}) endif() -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) if(MPI_Fortran_COMPILER) # use MPI wrapper as the compiler set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER}) diff --git a/test/unit_tests/nvector/parallel/CMakeLists.txt b/test/unit_tests/nvector/parallel/CMakeLists.txt index ce23c44f6d..9a05a5e37f 100644 --- a/test/unit_tests/nvector/parallel/CMakeLists.txt +++ b/test/unit_tests/nvector/parallel/CMakeLists.txt @@ -30,7 +30,7 @@ set(nvector_parallel_examples set(nvector_examples_dependencies test_nvector test_mpinvector) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_parallel_fortran_examples "test_fnvector_parallel_mod\;\;1\;4\;") endif() @@ -45,7 +45,7 @@ else() include_directories(${MPI_INCLUDE_PATH}) endif() -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) if(MPI_Fortran_COMPILER) # use MPI wrapper as the compiler set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER}) diff --git a/test/unit_tests/nvector/pthreads/CMakeLists.txt b/test/unit_tests/nvector/pthreads/CMakeLists.txt index 62673b4f41..1bab7d3579 100644 --- a/test/unit_tests/nvector/pthreads/CMakeLists.txt +++ b/test/unit_tests/nvector/pthreads/CMakeLists.txt @@ -30,7 +30,7 @@ set(nvector_pthreads_examples set(nvector_examples_dependencies test_nvector) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_pthreads_fortran_examples "test_fnvector_pthreads_mod\;\;") endif() @@ -39,7 +39,7 @@ include_directories(. ..) # Specify libraries to link against set(NVECS_LIB sundials_nvecpthreads) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND NVECS_LIB sundials_fnvecpthreads_mod) endif() diff --git a/test/unit_tests/nvector/serial/CMakeLists.txt b/test/unit_tests/nvector/serial/CMakeLists.txt index 0c8832cb1c..f22ac64b29 100644 --- a/test/unit_tests/nvector/serial/CMakeLists.txt +++ b/test/unit_tests/nvector/serial/CMakeLists.txt @@ -25,7 +25,7 @@ set(nvector_serial_examples "test_nvector_serial\;1000 0\;" "test_nvector_serial\;10000 0\;") # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(nvector_serial_fortran_examples "test_fnvector_serial_mod\;\;") endif() @@ -34,7 +34,7 @@ include_directories(. ..) # Specify libraries to link against set(NVECS_LIB sundials_nvecserial) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND NVECS_LIB sundials_fnvecserial_mod) endif() diff --git a/test/unit_tests/nvector/trilinos/CMakeLists.txt b/test/unit_tests/nvector/trilinos/CMakeLists.txt index 50bffdbd66..e1e4ae153f 100644 --- a/test/unit_tests/nvector/trilinos/CMakeLists.txt +++ b/test/unit_tests/nvector/trilinos/CMakeLists.txt @@ -33,7 +33,7 @@ else() endif() # Dependencies for nvector examples -if(ENABLE_MPI) +if(SUNDIALS_ENABLE_MPI) set(nvector_examples_dependencies test_nvector test_mpinvector) else() set(nvector_examples_dependencies test_nvector) @@ -66,7 +66,7 @@ foreach(example_tuple ${nvector_trilinos_examples}) # link vector test utilities target_link_libraries(${example} PRIVATE test_nvector_obj) - if(ENABLE_MPI) + if(SUNDIALS_ENABLE_MPI) target_link_libraries(${example} PRIVATE test_nvectormpi_obj) endif() diff --git a/test/unit_tests/sundomeigest/CMakeLists.txt b/test/unit_tests/sundomeigest/CMakeLists.txt index 02e96bca61..76c324da3f 100644 --- a/test/unit_tests/sundomeigest/CMakeLists.txt +++ b/test/unit_tests/sundomeigest/CMakeLists.txt @@ -17,7 +17,7 @@ # test/unit_tests/sundomeigest level CMakeLists.txt for SUNDIALS # --------------------------------------------------------------- -if(ENABLE_CALIPER AND SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_CALIPER AND SUNDIALS_ENABLE_PROFILING) include_directories(${caliper_INCLUDE_DIR}) set(EXE_EXTRA_LINK_LIBS ${EXE_EXTRA_LINK_LIBS} caliper) endif() @@ -37,6 +37,6 @@ target_link_libraries(test_sundomeigest_obj PRIVATE sundials_sundomeigestpower) add_subdirectory(Power) # Add the Arnoldi iteration examples if LAPACK is enabled -if(ENABLE_LAPACK) +if(SUNDIALS_ENABLE_LAPACK) add_subdirectory(Arnoldi) endif() diff --git a/test/unit_tests/sunlinsol/CMakeLists.txt b/test/unit_tests/sunlinsol/CMakeLists.txt index d61b45f000..4d9606c315 100644 --- a/test/unit_tests/sunlinsol/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/CMakeLists.txt @@ -17,7 +17,7 @@ # test/unit_tests/sunlinsol level CMakeLists.txt for SUNDIALS # --------------------------------------------------------------- -if(ENABLE_CALIPER AND SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_CALIPER AND SUNDIALS_ENABLE_PROFILING) include_directories(${caliper_INCLUDE_DIR}) set(EXE_EXTRA_LINK_LIBS ${EXE_EXTRA_LINK_LIBS} caliper) endif() @@ -43,7 +43,7 @@ if(BUILD_SHARED_LIBS) endif() target_link_libraries(test_sunlinsol_obj PRIVATE sundials_sunlinsoldense) -if(ENABLE_MPI AND MPI_C_FOUND) +if(SUNDIALS_ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(pcg/parallel) add_subdirectory(spgmr/parallel) add_subdirectory(spfgmr/parallel) @@ -51,44 +51,44 @@ if(ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(sptfqmr/parallel) endif() -if(BUILD_SUNMATRIX_CUSPARSE) +if(SUNDIALS_ENABLE_SUNMATRIX_CUSPARSE) if(SUNDIALS_INDEX_SIZE MATCHES "32") add_subdirectory(cusolversp) endif() endif() -if(BUILD_SUNLINSOL_GINKGO) +if(SUNDIALS_ENABLE_SUNLINSOL_GINKGO) add_subdirectory(ginkgo) endif() -if(BUILD_SUNLINSOL_KLU) +if(SUNDIALS_ENABLE_SUNLINSOL_KLU) add_subdirectory(klu) endif() -if(BUILD_SUNLINSOL_KOKKOSDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_KOKKOSDENSE) add_subdirectory(kokkos) endif() -if(BUILD_SUNLINSOL_LAPACKBAND) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKBAND) add_subdirectory(lapackband) endif() -if(BUILD_SUNLINSOL_LAPACKDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_LAPACKDENSE) add_subdirectory(lapackdense) endif() -if(BUILD_SUNLINSOL_MAGMADENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_MAGMADENSE) add_subdirectory(magmadense) endif() -if(BUILD_SUNLINSOL_ONEMKLDENSE) +if(SUNDIALS_ENABLE_SUNLINSOL_ONEMKLDENSE) add_subdirectory(onemkldense) endif() -if(BUILD_SUNLINSOL_SUPERLUMT) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUMT) add_subdirectory(superlumt) endif() -if(BUILD_SUNLINSOL_SUPERLUDIST) +if(SUNDIALS_ENABLE_SUNLINSOL_SUPERLUDIST) add_subdirectory(superludist) endif() diff --git a/test/unit_tests/sunlinsol/band/CMakeLists.txt b/test/unit_tests/sunlinsol/band/CMakeLists.txt index b9c2e0df3b..182c7961a2 100644 --- a/test/unit_tests/sunlinsol/band/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/band/CMakeLists.txt @@ -29,7 +29,7 @@ set(sunlinsol_band_examples set(sunlinsol_band_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_band_fortran_examples "test_fsunlinsol_band_mod\;\;") endif() diff --git a/test/unit_tests/sunlinsol/dense/CMakeLists.txt b/test/unit_tests/sunlinsol/dense/CMakeLists.txt index db41198b59..d8b60d9221 100644 --- a/test/unit_tests/sunlinsol/dense/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/dense/CMakeLists.txt @@ -30,7 +30,7 @@ set(sunlinsol_dense_examples set(sunlinsol_dense_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_dense_fortran_examples "test_fsunlinsol_dense_mod\;\;") endif() diff --git a/test/unit_tests/sunlinsol/klu/CMakeLists.txt b/test/unit_tests/sunlinsol/klu/CMakeLists.txt index 0ba592d7cb..491cdb06d6 100644 --- a/test/unit_tests/sunlinsol/klu/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/klu/CMakeLists.txt @@ -29,7 +29,7 @@ set(sunlinsol_klu_examples set(sunlinsol_klu_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_klu_fortran_examples "test_fsunlinsol_klu_mod\;\;") endif() diff --git a/test/unit_tests/sunlinsol/lapackdense/CMakeLists.txt b/test/unit_tests/sunlinsol/lapackdense/CMakeLists.txt index dda0673516..3d9f30b123 100644 --- a/test/unit_tests/sunlinsol/lapackdense/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/lapackdense/CMakeLists.txt @@ -31,7 +31,7 @@ set(sunlinsol_lapackdense_examples set(sunlinsol_lapackdense_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_lapackdense_fortran_examples "test_fsunlinsol_lapackdense_mod\;10 0 0\;" "test_fsunlinsol_lapackdense_mod\;100 0 0\;" diff --git a/test/unit_tests/sunlinsol/pcg/serial/CMakeLists.txt b/test/unit_tests/sunlinsol/pcg/serial/CMakeLists.txt index 16645419b8..4274f86dca 100644 --- a/test/unit_tests/sunlinsol/pcg/serial/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/pcg/serial/CMakeLists.txt @@ -36,7 +36,7 @@ set(sunlinsol_pcg_examples "test_sunlinsol_pcg_serial\;100 500 ${TOL} 0\;") set(sunlinsol_pcg_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_pcg_fortran_examples "test_fsunlinsol_pcg_mod_serial\;\;") endif() diff --git a/test/unit_tests/sunlinsol/spbcgs/serial/CMakeLists.txt b/test/unit_tests/sunlinsol/spbcgs/serial/CMakeLists.txt index 6a12944628..86124fdcfc 100644 --- a/test/unit_tests/sunlinsol/spbcgs/serial/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/spbcgs/serial/CMakeLists.txt @@ -38,7 +38,7 @@ set(sunlinsol_spbcgs_examples set(sunlinsol_spbcgs_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_spbcgs_fortran_examples "test_fsunlinsol_spbcgs_mod_serial\;\;") endif() diff --git a/test/unit_tests/sunlinsol/spfgmr/serial/CMakeLists.txt b/test/unit_tests/sunlinsol/spfgmr/serial/CMakeLists.txt index c4ba2cc25c..2c964914f4 100644 --- a/test/unit_tests/sunlinsol/spfgmr/serial/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/spfgmr/serial/CMakeLists.txt @@ -37,7 +37,7 @@ set(sunlinsol_spfgmr_examples # Dependencies for sunlinsol examples set(sunlinsol_spfgmr_dependencies test_sunlinsol) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_spfgmr_fortran_examples "test_fsunlinsol_spfgmr_mod_serial\;\;") endif() diff --git a/test/unit_tests/sunlinsol/spgmr/serial/CMakeLists.txt b/test/unit_tests/sunlinsol/spgmr/serial/CMakeLists.txt index 4af14ffb79..7408739c8b 100644 --- a/test/unit_tests/sunlinsol/spgmr/serial/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/spgmr/serial/CMakeLists.txt @@ -40,7 +40,7 @@ set(sunlinsol_spgmr_examples set(sunlinsol_spgmr_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_spgmr_fortran_examples "test_fsunlinsol_spgmr_mod_serial\;\;") endif() diff --git a/test/unit_tests/sunlinsol/sptfqmr/serial/CMakeLists.txt b/test/unit_tests/sunlinsol/sptfqmr/serial/CMakeLists.txt index 2530f14224..a9b0b51738 100644 --- a/test/unit_tests/sunlinsol/sptfqmr/serial/CMakeLists.txt +++ b/test/unit_tests/sunlinsol/sptfqmr/serial/CMakeLists.txt @@ -38,7 +38,7 @@ set(sunlinsol_sptfqmr_examples set(sunlinsol_sptfqmr_dependencies test_sunlinsol) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunlinsol_sptfqmr_fortran_examples "test_fsunlinsol_sptfqmr_mod_serial\;\;") endif() diff --git a/test/unit_tests/sunmatrix/CMakeLists.txt b/test/unit_tests/sunmatrix/CMakeLists.txt index e7cde690ad..5a828f6222 100644 --- a/test/unit_tests/sunmatrix/CMakeLists.txt +++ b/test/unit_tests/sunmatrix/CMakeLists.txt @@ -18,7 +18,7 @@ # test/unit_tests/sunmatrix level CMakeLists.txt for SUNDIALS # --------------------------------------------------------------- -if(ENABLE_CALIPER AND SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_CALIPER AND SUNDIALS_ENABLE_PROFILING) include_directories(${caliper_INCLUDE_DIR}) set(EXE_EXTRA_LINK_LIBS ${EXE_EXTRA_LINK_LIBS} caliper) endif() @@ -38,28 +38,28 @@ if(BUILD_SHARED_LIBS) endif() target_link_libraries(test_sunmatrix_obj PRIVATE sundials_sunmatrixdense) -if(BUILD_SUNMATRIX_CUSPARSE) +if(SUNDIALS_ENABLE_SUNMATRIX_CUSPARSE) if(SUNDIALS_INDEX_SIZE MATCHES "32") add_subdirectory(cusparse) endif() endif() -if(BUILD_SUNMATRIX_GINKGO) +if(SUNDIALS_ENABLE_SUNMATRIX_GINKGO) add_subdirectory(ginkgo) endif() -if(BUILD_SUNMATRIX_KOKKOSDENSE) +if(SUNDIALS_ENABLE_SUNMATRIX_KOKKOSDENSE) add_subdirectory(kokkos) endif() -if(BUILD_SUNMATRIX_MAGMADENSE) +if(SUNDIALS_ENABLE_SUNMATRIX_MAGMADENSE) add_subdirectory(magmadense) endif() -if(BUILD_SUNMATRIX_ONEMKLDENSE) +if(SUNDIALS_ENABLE_SUNMATRIX_ONEMKLDENSE) add_subdirectory(onemkldense) endif() -if(BUILD_SUNMATRIX_SLUNRLOC) +if(SUNDIALS_ENABLE_SUNMATRIX_SLUNRLOC) add_subdirectory(slunrloc) endif() diff --git a/test/unit_tests/sunmatrix/band/CMakeLists.txt b/test/unit_tests/sunmatrix/band/CMakeLists.txt index 3bbd0b93c2..873ba999ae 100644 --- a/test/unit_tests/sunmatrix/band/CMakeLists.txt +++ b/test/unit_tests/sunmatrix/band/CMakeLists.txt @@ -30,7 +30,7 @@ set(sunmatrix_band_examples set(sunmatrix_band_dependencies test_sunmatrix) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunmatrix_band_fortran_examples "test_fsunmatrix_band_mod\;\;") endif() diff --git a/test/unit_tests/sunmatrix/dense/CMakeLists.txt b/test/unit_tests/sunmatrix/dense/CMakeLists.txt index 435fe6209f..e18235b8ac 100644 --- a/test/unit_tests/sunmatrix/dense/CMakeLists.txt +++ b/test/unit_tests/sunmatrix/dense/CMakeLists.txt @@ -30,7 +30,7 @@ set(sunmatrix_dense_examples set(sunmatrix_dense_dependencies test_sunmatrix) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunmatrix_dense_fortran_examples "test_fsunmatrix_dense_mod\;\;") endif() diff --git a/test/unit_tests/sunmatrix/sparse/CMakeLists.txt b/test/unit_tests/sunmatrix/sparse/CMakeLists.txt index 48d328047a..bbb1469d30 100644 --- a/test/unit_tests/sunmatrix/sparse/CMakeLists.txt +++ b/test/unit_tests/sunmatrix/sparse/CMakeLists.txt @@ -34,7 +34,7 @@ set(sunmatrix_sparse_examples set(sunmatrix_sparse_dependencies test_sunmatrix) # If building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(sunmatrix_sparse_fortran_examples "test_fsunmatrix_sparse_mod\;\;") endif() diff --git a/test/unit_tests/sunmemory/CMakeLists.txt b/test/unit_tests/sunmemory/CMakeLists.txt index ddd1f7f0d5..f61dc51a3b 100644 --- a/test/unit_tests/sunmemory/CMakeLists.txt +++ b/test/unit_tests/sunmemory/CMakeLists.txt @@ -15,14 +15,14 @@ add_subdirectory(sys) -if(ENABLE_CUDA) +if(SUNDIALS_ENABLE_CUDA) add_subdirectory(cuda) endif() -if(ENABLE_HIP) +if(SUNDIALS_ENABLE_HIP) add_subdirectory(hip) endif() -if(ENABLE_SYCL) +if(SUNDIALS_ENABLE_SYCL) add_subdirectory(sycl) endif() diff --git a/test/unit_tests/sunnonlinsol/CMakeLists.txt b/test/unit_tests/sunnonlinsol/CMakeLists.txt index 502eeff2d3..1c04b15874 100644 --- a/test/unit_tests/sunnonlinsol/CMakeLists.txt +++ b/test/unit_tests/sunnonlinsol/CMakeLists.txt @@ -17,7 +17,7 @@ # test/unit_tests/sunnonlinsol level CMakeLists.txt for SUNDIALS # ------------------------------------------------------------------------------ -if(ENABLE_CALIPER AND SUNDIALS_BUILD_WITH_PROFILING) +if(SUNDIALS_ENABLE_CALIPER AND SUNDIALS_ENABLE_PROFILING) include_directories(${caliper_INCLUDE_DIR}) set(EXE_EXTRA_LINK_LIBS ${EXE_EXTRA_LINK_LIBS} caliper) endif() @@ -26,6 +26,6 @@ endif() add_subdirectory(newton) add_subdirectory(fixedpoint) -if(BUILD_SUNNONLINSOL_PETSCSNES) +if(SUNDIALS_ENABLE_SUNNONLINSOL_PETSCSNES) add_subdirectory(petsc) endif() diff --git a/test/unit_tests/sunnonlinsol/fixedpoint/CMakeLists.txt b/test/unit_tests/sunnonlinsol/fixedpoint/CMakeLists.txt index 335b3fe42d..c861108ae0 100644 --- a/test/unit_tests/sunnonlinsol/fixedpoint/CMakeLists.txt +++ b/test/unit_tests/sunnonlinsol/fixedpoint/CMakeLists.txt @@ -26,7 +26,7 @@ set(examples "test_sunnonlinsol_fixedpoint\;2 0.5\;") # if building F2003 tests -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(fortran_examples "test_fsunnonlinsol_fixedpoint_mod\;\;") endif() @@ -36,7 +36,7 @@ include_directories(.) # Specify libraries to link against set(SUNDIALS_LIBS sundials_nvecserial) list(APPEND SUNDIALS_LIBS sundials_sunnonlinsolfixedpoint) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND SUNDIALS_LIBS sundials_fnvecserial_mod) list(APPEND SUNDIALS_LIBS sundials_fsunnonlinsolfixedpoint_mod) endif() diff --git a/test/unit_tests/sunnonlinsol/newton/CMakeLists.txt b/test/unit_tests/sunnonlinsol/newton/CMakeLists.txt index 0d14de7bcd..681f542388 100644 --- a/test/unit_tests/sunnonlinsol/newton/CMakeLists.txt +++ b/test/unit_tests/sunnonlinsol/newton/CMakeLists.txt @@ -23,7 +23,7 @@ # Example programs set(examples "test_sunnonlinsol_newton\;\;") -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) set(fortran_examples "test_fsunnonlinsol_newton_mod\;\;") endif() @@ -35,7 +35,7 @@ set(SUNDIALS_LIBS sundials_nvecserial) list(APPEND SUNDIALS_LIBS sundials_sunmatrixdense) list(APPEND SUNDIALS_LIBS sundials_sunlinsoldense) list(APPEND SUNDIALS_LIBS sundials_sunnonlinsolnewton) -if(BUILD_FORTRAN_MODULE_INTERFACE) +if(SUNDIALS_ENABLE_FORTRAN) list(APPEND SUNDIALS_LIBS sundials_fnvecserial_mod) list(APPEND SUNDIALS_LIBS sundials_fsunmatrixdense_mod) list(APPEND SUNDIALS_LIBS sundials_fsunlinsoldense_mod)