Commit 4a7e29ce authored by Papatheodore, Thomas's avatar Papatheodore, Thomas
Browse files

changed output format slightly

parent d0042871
......@@ -28,8 +28,7 @@ Now you can test different layouts using `jsrun`. Also, you should pipe your res
```
$ jsrun -n6 -a1 -c7 -g1 -bpacked:2 ./hello_jsrun | sort
*** MPI Ranks: 6, OpenMP Threads: 2, GPUs per Resource Set: 1 ***
---------- MPI Ranks: 6, OpenMP Threads: 2, GPUs per Resource Set: 1 ----------
MPI Rank 000, OMP_thread 00 on HWThread 000 of Node a09n13 - RT_GPU_id 0 : GPU_id 0
MPI Rank 000, OMP_thread 01 on HWThread 004 of Node a09n13 - RT_GPU_id 0 : GPU_id 0
MPI Rank 001, OMP_thread 00 on HWThread 028 of Node a09n13 - RT_GPU_id 0 : GPU_id 1
......
......@@ -32,11 +32,6 @@ int main(int argc, char *argv[]){
// Find how many GPUs CUDA runtime says are available
int num_devices = 0;
cuErr = cudaGetDeviceCount(&num_devices);
//commented out error message because it did not allow jsrun with -g0 flag
/* if(cudaSuccess != cuErr){
printf("CUDA Error - cudaGetDeviceCount: %s\n", cudaGetErrorString(cuErr));
exit(0);
}*/
// Set output based on command line argument
// => verbose shows BusID and UUID for GPUs
......@@ -62,11 +57,8 @@ int main(int argc, char *argv[]){
}
if(rank == 0){
printf("########################################################################\n");
printf("\n*** MPI Ranks: %d, OpenMP Threads: %d, GPUs per Resource Set: %d ***\n", size, num_threads, num_devices);
printf("========================================================================\n");
printf("\n---------- MPI Ranks: %d, OpenMP Threads: %d, GPUs per Resource Set: %d ----------\n", size, num_threads, num_devices);
}
MPI_Barrier(MPI_COMM_WORLD);
if(num_devices == 0){
#pragma omp parallel default(shared) private(hwthread, thread_id)
......@@ -144,14 +136,14 @@ int main(int argc, char *argv[]){
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 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);
......
Supports Markdown
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