diff --git a/cmake/SmithBasics.cmake b/cmake/SmithBasics.cmake index b14be4acb1..c1093c7067 100644 --- a/cmake/SmithBasics.cmake +++ b/cmake/SmithBasics.cmake @@ -27,7 +27,6 @@ if (NOT SMITH_BASICS_SETUP) cmake_dependent_option(SMITH_ENABLE_TESTS "Enables Smith Tests" ON "ENABLE_TESTS" OFF) cmake_dependent_option(SMITH_ENABLE_CUDA "Enables Smith with CUDA support" ON "ENABLE_CUDA" OFF) cmake_dependent_option(SMITH_ENABLE_HIP "Enables Smith with HIP support" ON "ENABLE_HIP" OFF) - cmake_dependent_option(SMITH_ENABLE_MPI "Enables Smith with MPI support" ON "ENABLE_MPI" OFF) cmake_dependent_option(SMITH_ENABLE_OPENMP "Enables Smith with OPENMP support" ON "ENABLE_OPENMP" OFF) # Options for builtin TPLs diff --git a/cmake/smith-config.cmake.in b/cmake/smith-config.cmake.in index 228f1a6155..5ddac44fa9 100644 --- a/cmake/smith-config.cmake.in +++ b/cmake/smith-config.cmake.in @@ -29,7 +29,6 @@ if(NOT SMITH_FOUND) set(SMITH_ENABLE_CODEVELOP @SMITH_ENABLE_CODEVELOP@) set(SMITH_ENABLE_CUDA @SMITH_ENABLE_CUDA@) set(SMITH_ENABLE_HIP @SMITH_ENABLE_HIP@) - set(SMITH_ENABLE_MPI @SMITH_ENABLE_MPI@) set(SMITH_ENABLE_OPENMP @SMITH_ENABLE_OPENMP@) set(SMITH_USE_ADIAK @SMITH_USE_ADIAK@) diff --git a/cmake/thirdparty/SetupSmithThirdParty.cmake b/cmake/thirdparty/SetupSmithThirdParty.cmake index 02d45ea8dd..4618379dca 100644 --- a/cmake/thirdparty/SetupSmithThirdParty.cmake +++ b/cmake/thirdparty/SetupSmithThirdParty.cmake @@ -267,19 +267,19 @@ if (NOT SMITH_THIRD_PARTY_LIBRARIES_FOUND) set(MFEM_USE_HIP ${SMITH_ENABLE_HIP} CACHE BOOL "") set(MFEM_USE_LAPACK ON CACHE BOOL "") # mfem+mpi requires metis - set(MFEM_USE_METIS ${SMITH_ENABLE_MPI} CACHE BOOL "") - set(MFEM_USE_METIS_5 ${SMITH_ENABLE_MPI} CACHE BOOL "") - set(MFEM_USE_MPI ${SMITH_ENABLE_MPI} CACHE BOOL "") + set(MFEM_USE_METIS ON CACHE BOOL "") + set(MFEM_USE_METIS_5 ON CACHE BOOL "") + set(MFEM_USE_MPI ON CACHE BOOL "") if(NETCDF_DIR) smith_assert_is_directory(DIR_VARIABLE NETCDF_DIR) set(MFEM_USE_NETCDF ON CACHE BOOL "") endif() + # mfem+mpi also needs parmetis - if(SMITH_ENABLE_MPI) - smith_assert_is_directory(DIR_VARIABLE PARMETIS_DIR) - # Slightly different naming convention - set(ParMETIS_DIR ${PARMETIS_DIR} CACHE PATH "") - endif() + smith_assert_is_directory(DIR_VARIABLE PARMETIS_DIR) + # Slightly different naming convention + set(ParMETIS_DIR ${PARMETIS_DIR} CACHE PATH "") + set(MFEM_USE_OPENMP ${SMITH_ENABLE_OPENMP} CACHE BOOL "") if(PETSC_DIR) set(MFEM_USE_PETSC ON CACHE BOOL "") @@ -299,7 +299,7 @@ if (NOT SMITH_THIRD_PARTY_LIBRARIES_FOUND) smith_assert_is_directory(DIR_VARIABLE SUPERLUDIST_DIR) # MFEM uses a slightly different naming convention set(SuperLUDist_DIR ${SUPERLUDIST_DIR} CACHE PATH "") - set(MFEM_USE_SUPERLU ${SMITH_ENABLE_MPI} CACHE BOOL "") + set(MFEM_USE_SUPERLU ON CACHE BOOL "") endif() if(STRUMPACK_DIR) smith_assert_is_directory(DIR_VARIABLE STRUMPACK_DIR) @@ -601,8 +601,8 @@ if (NOT SMITH_THIRD_PARTY_LIBRARIES_FOUND) set(ENABLE_FORTRAN OFF CACHE BOOL "" FORCE) # Otherwise we use the submodule message(STATUS "Using Tribol submodule") - set(BUILD_REDECOMP ${SMITH_ENABLE_MPI} CACHE BOOL "") - set(TRIBOL_USE_MPI ${SMITH_ENABLE_MPI} CACHE BOOL "") + set(BUILD_REDECOMP ON CACHE BOOL "") + set(TRIBOL_USE_MPI ON CACHE BOOL "") set(TRIBOL_ENABLE_TESTS OFF CACHE BOOL "") set(TRIBOL_ENABLE_EXAMPLES OFF CACHE BOOL "") set(TRIBOL_ENABLE_DOCS OFF CACHE BOOL "") diff --git a/src/smith/physics/contact/CMakeLists.txt b/src/smith/physics/contact/CMakeLists.txt index f413bfb0b0..e8315e77a8 100644 --- a/src/smith/physics/contact/CMakeLists.txt +++ b/src/smith/physics/contact/CMakeLists.txt @@ -16,10 +16,7 @@ set(contact_sources ) set(contact_depends smith_infrastructure smith_state) -blt_list_append(TO contact_depends ELEMENTS tribol IF TRIBOL_FOUND) -if (TRIBOL_FOUND AND SMITH_ENABLE_MPI) - list(APPEND contact_depends redecomp) -endif() +blt_list_append(TO contact_depends ELEMENTS tribol redecomp IF TRIBOL_FOUND) smith_add_library( NAME smith_contact