Skip to content
Merged
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
11 changes: 10 additions & 1 deletion Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,16 @@ main(int argc, char* argv[])
}
}

// Make sure to catch new failures.
#ifdef AMREX_USE_HIP
// Explicitly initialize the HIP runtime before MPI/AMReX to avoid lazy init
// race conditions at scale.
hipError_t herr = hipInit(0);
if (herr != hipSuccess) {
fprintf(stderr, "hipInit failed: %s\n", hipGetErrorString(herr));
return 1;
}
#endif

amrex::Initialize(
argc, argv, true, MPI_COMM_WORLD, override_default_parameters);
// Defined and initialized when in gnumake, but not defined in cmake and
Expand Down
Loading