Skip to content

Updates MPI setup in Axom export to optionally depend on Fortran#1806

Open
kennyweiss wants to merge 5 commits intodevelopfrom
feature/kweiss/skip-mpi-fortran
Open

Updates MPI setup in Axom export to optionally depend on Fortran#1806
kennyweiss wants to merge 5 commits intodevelopfrom
feature/kweiss/skip-mpi-fortran

Conversation

@kennyweiss
Copy link
Member

Summary

Allows setting up MPI in a Fortran config without an MPI_Fortran_COMPILER wrapper
@kennyweiss kennyweiss added this to the FY26 Development milestone Feb 19, 2026
@kennyweiss kennyweiss self-assigned this Feb 19, 2026
@kennyweiss kennyweiss added App Integration Issues related to integration with applications Build system Issues related to Axom's build system User Request Issues related to user requests mpi Related to MPI communication Fortan Related to Fortran labels Feb 19, 2026
@kennyweiss
Copy link
Member Author

Looks like our installing-with-blt example worked with this change, but not our installing-with-cmake, so I'll need to fix that.

@cyrush
Copy link
Member

cyrush commented Feb 19, 2026

Does axom need to use fortran mpi targets at all?

@kennyweiss
Copy link
Member Author

kennyweiss commented Feb 19, 2026

@cyrush -- we use Fortran+MPI in our quest shroud bindings and in our our quest inout interface examples

if (ENABLE_FORTRAN)
set(quest_fortran_examples quest_signed_distance_interface)
if("${AXOM_CONFIG_NAME}" STREQUAL "GNU-Debug-shared-mpi-openmp")
# The gcc-11 docker image does not work, turning off for now
set(_has_inout_fortran_example FALSE)
elseif("${CMAKE_Fortran_COMPILER}" MATCHES "amdflang$" AND
CMAKE_BUILD_TYPE MATCHES "(Debug|RelWithDebInfo)")
# The inout Fortran example fails to compile with hipcc/amdflang in debug configurations
set(_has_inout_fortran_example FALSE)
else()
set(_has_inout_fortran_example TRUE)
blt_list_append(TO quest_fortran_examples ELEMENTS quest_inout_interface)
endif()
foreach(_t ${quest_fortran_examples})
set(_example_name "${_t}_F_ex")
axom_add_executable(
NAME ${_example_name}
SOURCES ${_t}.F
OUTPUT_DIR ${EXAMPLE_OUTPUT_DIRECTORY}
DEPENDS_ON ${quest_example_depends}
FOLDER axom/quest/examples)
# When CUDA is enabled, BLT will determine the correct linker, so don't override it here
if(NOT AXOM_ENABLE_CUDA)
if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
set_target_properties(${_example_name}
PROPERTIES LINKER_LANGUAGE Fortran)
else()
set_target_properties(${_example_name}
PROPERTIES LINKER_LANGUAGE CXX)
endif()
endif()
endforeach()
if(AXOM_ENABLE_TESTS AND AXOM_DATA_DIR AND ${_has_inout_fortran_example})
set(_num_ranks 1)
if(AXOM_ENABLE_MPI)
set(_num_ranks 2)
endif()
axom_add_test(
NAME quest_inout_interface_F_test
COMMAND quest_inout_interface_F_ex ${quest_data_dir}/sphere_binary.stl
NUM_MPI_TASKS ${_num_ranks})
endif()
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Integration Issues related to integration with applications Build system Issues related to Axom's build system Fortan Related to Fortran mpi Related to MPI communication User Request Issues related to user requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants