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
Dieser Commit ist enthalten in:
committet von
GitHub
Ursprung
e8fc5e67c4
Commit
80a710ac0a
@@ -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) {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren