Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HIP init before MPI init for MPI issue workaround on Frontier #62

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/exawind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ target_link_libraries(${EXAWIND_EXE_NAME} PRIVATE

target_include_directories(${EXAWIND_EXE_NAME} SYSTEM PRIVATE ${YAML_CPP_INCLUDE_DIR})

if(EXAWIND_ENABLE_ROCM)
target_compile_definitions(${EXAWIND_EXE_NAME} PRIVATE EXAWIND_ENABLE_ROCM)
endif()

if(CXX_FILESYSTEM_HAVE_FS)
target_compile_definitions(${EXAWIND_EXE_NAME} PRIVATE EXAWIND_HAS_STD_FILESYSTEM)
target_link_libraries(${EXAWIND_EXE_NAME} PRIVATE
Expand Down
9 changes: 9 additions & 0 deletions app/exawind/exawind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#include "yaml-cpp/yaml.h"
#include "tioga.h"

// Workaround for MPI issue on OLCF Frontier machine
#ifdef EXAWIND_ENABLE_ROCM
#include <hip/hip_runtime.h>
#endif

static std::string usage(std::string name)
{
return "usage: " + name +
Expand All @@ -36,6 +41,10 @@ replace_extension(const std::string& filepath, const std::string& newExt)

int main(int argc, char** argv)
{
// Workaround for MPI issue on OLCF Frontier machine
#ifdef EXAWIND_ENABLE_ROCM
hipInit(0);
#endif
MPI_Init(&argc, &argv);
int psize, prank;
MPI_Comm_size(MPI_COMM_WORLD, &psize);
Expand Down
Loading