Commit e0961cc1 authored by Papatheodore, Thomas's avatar Papatheodore, Thomas
Browse files

removed system-specific bus IDs

parent e6d00c4b
......@@ -82,7 +82,7 @@ int main(int argc, char *argv[]){
}
char uuid[NVML_DEVICE_UUID_BUFFER_SIZE];
char busid[64];
int gpu_id;
unsigned int gpu_id;
char uuid_list[1024] = "";
char busid_list[1024] = "";
......@@ -123,31 +123,11 @@ int main(int argc, char *argv[]){
exit(0);
}
// Map DomainID and BusID to node-local GPU ID
if(strcmp(busid, "0004:04:00.0") == 0){
gpu_id = 0;
}else if(strcmp(busid, "0004:05:00.0") == 0){
gpu_id = 1;
}else if(strcmp(busid, "0004:06:00.0") == 0){
gpu_id = 2;
}else if(strcmp(busid, "0035:03:00.0") == 0){
gpu_id = 3;
}else if(strcmp(busid, "0035:04:00.0") == 0){
gpu_id = 4;
}else if(strcmp(busid, "0035:05:00.0") == 0){
gpu_id = 5;
}else if(strcmp(busid, "0002:01:00.0") == 0){
gpu_id = 0;
}else if(strcmp(busid, "0003:01:00.0") == 0){
gpu_id = 1;
}else if(strcmp(busid, "0006:01:00.0") == 0){
gpu_id = 2;
}else if(strcmp(busid, "0007:01:00.0") == 0){
gpu_id = 3;
}else{
printf("The BusID (%s) did not map correctly to a GPU. Exiting...\n", busid);
exit(0);
}
result=nvmlDeviceGetIndex(device, &gpu_id);
if(NVML_SUCCESS != result){
printf("nvmlDeviceGetIndex Failed: %s\n", nvmlErrorString(result));
exit(0);
}
// Concatenate per-MPIrank GPU info into strings for printf
sprintf(c_i, "%d", i);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment