From 5a42eca2d05a09052c8de139ed6f827a679c9df1 Mon Sep 17 00:00:00 2001 From: Alex Tyler Chapman Date: Thu, 22 Aug 2024 12:36:08 -0700 Subject: [PATCH 1/4] Resolve duplication issue when configuring with Ninja and codevelop --- cmake/thirdparty/SetupSeracThirdParty.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/thirdparty/SetupSeracThirdParty.cmake b/cmake/thirdparty/SetupSeracThirdParty.cmake index 626a78b1b..99c4f6327 100644 --- a/cmake/thirdparty/SetupSeracThirdParty.cmake +++ b/cmake/thirdparty/SetupSeracThirdParty.cmake @@ -306,11 +306,19 @@ if (NOT SERAC_THIRD_PARTY_LIBRARIES_FOUND) # Build MFEM shared if Serac is being built shared set(MFEM_SHARED_BUILD ${BUILD_SHARED_LIBS} CACHE BOOL "") + # Unset runtime output directory to prevent duplication issue that occurs when using Ninja + # https://github.com/LLNL/blt/issues/695 + set(tmp_cmake_runtime_output_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY CACHE) + if(${PROJECT_NAME} STREQUAL "smith") add_subdirectory(${PROJECT_SOURCE_DIR}/serac/mfem ${CMAKE_BINARY_DIR}/mfem) else() add_subdirectory(${PROJECT_SOURCE_DIR}/mfem ${CMAKE_BINARY_DIR}/mfem) endif() + + # Restore previous runtime output directory + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${tmp_cmake_runtime_output_directory} CACHE PATH "" FORCE) set(MFEM_FOUND TRUE CACHE BOOL "" FORCE) From 5435253addf42cd85604df401340d52fd53f99e9 Mon Sep 17 00:00:00 2001 From: Alex Tyler Chapman Date: Thu, 22 Aug 2024 12:36:16 -0700 Subject: [PATCH 2/4] Cleanup driver tests --- src/drivers/CMakeLists.txt | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/drivers/CMakeLists.txt b/src/drivers/CMakeLists.txt index e7f81f17d..cac612da9 100644 --- a/src/drivers/CMakeLists.txt +++ b/src/drivers/CMakeLists.txt @@ -14,29 +14,20 @@ if (SERAC_ENABLE_TESTS) set(input_files_dir ${CMAKE_CURRENT_SOURCE_DIR}/../../data/input_files) # Make sure running serac driver doesn't completely fail -#TODO: Turn these back on when input files work with the new physics modules -# blt_add_test(NAME serac_driver_default -# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default -i ${input_files_dir}/default.lua -# NUM_MPI_TASKS 1 ) + blt_add_test(NAME serac_driver_default + COMMAND ${PROJECT_BINARY_DIR}/serac -o default -i ${input_files_dir}/default.lua + NUM_MPI_TASKS 1 ) -# blt_add_test(NAME serac_driver_default_parallel -# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_parallel -i ${input_files_dir}/default.lua -# NUM_MPI_TASKS 2 ) - -# blt_add_test(NAME serac_driver_no_thermal -# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_no_thermal -i ${input_files_dir}/tests/solid/qs_linear.lua -# NUM_MPI_TASKS 1 ) - -# blt_add_test(NAME serac_driver_no_solid -# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_no_solid -i ${input_files_dir}/tests/heat_transfer/static_solve.lua -# NUM_MPI_TASKS 1 ) + blt_add_test(NAME serac_driver_default_parallel + COMMAND ${PROJECT_BINARY_DIR}/serac -o default_parallel -i ${input_files_dir}/default.lua + NUM_MPI_TASKS 2 ) blt_add_test(NAME serac_driver_help - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac --help + COMMAND ${PROJECT_BINARY_DIR}/serac --help NUM_MPI_TASKS 1 ) blt_add_test(NAME serac_driver_docs - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_docs -d -i ${input_files_dir}/default.lua + COMMAND ${PROJECT_BINARY_DIR}/serac -o default_docs -d -i ${input_files_dir}/default.lua NUM_MPI_TASKS 1 ) endif() From c47cd3069fd2b21e62a584a3096235dc5c210d40 Mon Sep 17 00:00:00 2001 From: Alex Tyler Chapman Date: Thu, 22 Aug 2024 12:39:21 -0700 Subject: [PATCH 3/4] fix path --- src/drivers/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drivers/CMakeLists.txt b/src/drivers/CMakeLists.txt index cac612da9..1266903b6 100644 --- a/src/drivers/CMakeLists.txt +++ b/src/drivers/CMakeLists.txt @@ -15,19 +15,19 @@ if (SERAC_ENABLE_TESTS) # Make sure running serac driver doesn't completely fail blt_add_test(NAME serac_driver_default - COMMAND ${PROJECT_BINARY_DIR}/serac -o default -i ${input_files_dir}/default.lua + COMMAND ${PROJECT_BINARY_DIR}/bin/serac -o default -i ${input_files_dir}/default.lua NUM_MPI_TASKS 1 ) blt_add_test(NAME serac_driver_default_parallel - COMMAND ${PROJECT_BINARY_DIR}/serac -o default_parallel -i ${input_files_dir}/default.lua + COMMAND ${PROJECT_BINARY_DIR}/bin/serac -o default_parallel -i ${input_files_dir}/default.lua NUM_MPI_TASKS 2 ) blt_add_test(NAME serac_driver_help - COMMAND ${PROJECT_BINARY_DIR}/serac --help + COMMAND ${PROJECT_BINARY_DIR}/bin/serac --help NUM_MPI_TASKS 1 ) blt_add_test(NAME serac_driver_docs - COMMAND ${PROJECT_BINARY_DIR}/serac -o default_docs -d -i ${input_files_dir}/default.lua + COMMAND ${PROJECT_BINARY_DIR}/bin/serac -o default_docs -d -i ${input_files_dir}/default.lua NUM_MPI_TASKS 1 ) endif() From b59b2993845164de252e788f6d8cb14a10ceb58c Mon Sep 17 00:00:00 2001 From: Alex Tyler Chapman Date: Thu, 22 Aug 2024 13:04:41 -0700 Subject: [PATCH 4/4] revert driver updates --- src/drivers/CMakeLists.txt | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/drivers/CMakeLists.txt b/src/drivers/CMakeLists.txt index 1266903b6..e7f81f17d 100644 --- a/src/drivers/CMakeLists.txt +++ b/src/drivers/CMakeLists.txt @@ -14,20 +14,29 @@ if (SERAC_ENABLE_TESTS) set(input_files_dir ${CMAKE_CURRENT_SOURCE_DIR}/../../data/input_files) # Make sure running serac driver doesn't completely fail - blt_add_test(NAME serac_driver_default - COMMAND ${PROJECT_BINARY_DIR}/bin/serac -o default -i ${input_files_dir}/default.lua - NUM_MPI_TASKS 1 ) +#TODO: Turn these back on when input files work with the new physics modules +# blt_add_test(NAME serac_driver_default +# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default -i ${input_files_dir}/default.lua +# NUM_MPI_TASKS 1 ) - blt_add_test(NAME serac_driver_default_parallel - COMMAND ${PROJECT_BINARY_DIR}/bin/serac -o default_parallel -i ${input_files_dir}/default.lua - NUM_MPI_TASKS 2 ) +# blt_add_test(NAME serac_driver_default_parallel +# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_parallel -i ${input_files_dir}/default.lua +# NUM_MPI_TASKS 2 ) + +# blt_add_test(NAME serac_driver_no_thermal +# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_no_thermal -i ${input_files_dir}/tests/solid/qs_linear.lua +# NUM_MPI_TASKS 1 ) + +# blt_add_test(NAME serac_driver_no_solid +# COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_no_solid -i ${input_files_dir}/tests/heat_transfer/static_solve.lua +# NUM_MPI_TASKS 1 ) blt_add_test(NAME serac_driver_help - COMMAND ${PROJECT_BINARY_DIR}/bin/serac --help + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac --help NUM_MPI_TASKS 1 ) blt_add_test(NAME serac_driver_docs - COMMAND ${PROJECT_BINARY_DIR}/bin/serac -o default_docs -d -i ${input_files_dir}/default.lua + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/serac -o default_docs -d -i ${input_files_dir}/default.lua NUM_MPI_TASKS 1 ) endif()