gda/ro: validate and exit cleanly when forced GDA config is invalid (#354)

* gda: validate and exit cleanly when forced GDA config is invalid

* ro: validate and exit cleanly when forced RO config is invalid

[ROCm/rocshmem commit: 80a710ac0a]
Этот коммит содержится в:
Kutovoi, Vadim
2025-12-22 10:54:33 +00:00
коммит произвёл GitHub
родитель ed38201b90
Коммит a4b99485a9
+12
Просмотреть файл
@@ -93,9 +93,21 @@ static BackendType select_backend_type() {
if (!envstr.empty()) {
DPRINTF("Found environment variable ROCSHMEM_BACKEND, value is %s\n", envstr.c_str());
if (envstr.find("gda") != std::string::npos) {
if (GDABackend::backend_can_run() != ROCSHMEM_SUCCESS) {
fprintf(stderr, "Error: ROCSHMEM_BACKEND=gda requested but GDA backend cannot run.\n"
"No active RDMA interface found for the requested provider.\n"
"Check that the correct NIC hardware is present and the link is active.\n");
exit(1);
}
return BackendType::GDA_BACKEND;
}
if (envstr.find("ro") != std::string::npos) {
if (ROBackend::backend_can_run() != ROCSHMEM_SUCCESS) {
fprintf(stderr, "Error: ROCSHMEM_BACKEND=ro requested but RO backend cannot run.\n"
"MPI library could not be loaded.\n"
"Check that MPI is properly installed and accessible.\n");
exit(1);
}
return BackendType::RO_BACKEND;
}
if (envstr.find("ipc") != std::string::npos) {