40 | | The GW protocol supports the fragmentation of larger messages into smaller chunks of a given length, i.e., the Maximum Transfer Unit (MTU). This way, the GW daemon may benefit from pipelining effect resulting in an overlapping of the message transfer from the source to the GW daemon and from the GW daemon to the destination. The chunk size may be influenced by setting the following environment variable: |
| 43 | |
| 44 | The Gateway protocol supports the fragmentation of larger messages into smaller chunks of a given length, i.e., the Maximum Transfer Unit (MTU). |
| 45 | This way, the Gateway daemon may benefit from pipelining effect resulting in an overlapping of the message transfer from the source to the Gateway daemon and from the Gateway daemon to the destination. |
| 46 | The chunk size may be influenced by setting the following environment variable: |
| 51 | |
| 52 | |
| 53 | === API Extensions for MSA awareness === |
| 54 | |
| 55 | Besides transparent MSA support, there is the possibility for the application to adapt to modularity explicitly. |
| 56 | |
| 57 | For doing so, on the one hand, !ParaStation MPI provides a portable API addition for retrieving topology information by querying a ''Module ID'' via the `MPI_INFO_ENV` object: |
| 58 | |
| 59 | {{{ |
| 60 | int module_id; |
| 61 | char value[MPI_MAX_INFO_VAL]; |
| 62 | |
| 63 | MPI_Info_get(MPI_INFO_ENV, "msa_module_id", MPI_MAX_INFO_VAL, value, &flag); |
| 64 | |
| 65 | if (flag) { /* This MPI environment is modularity-aware! */ |
| 66 | |
| 67 | my_module_id = atoi(value); /* Determine the module affinity of this process. */ |
| 68 | |
| 69 | } else { /* This MPI environment is NOT modularity-aware! */ |
| 70 | |
| 71 | my_module_id = 0; /* Assume a flat topology for all processes. */ |
| 72 | } |
| 73 | }}} |
| 74 | |
| 75 | On the other hand, there is the possibility to use a newly added ''split type'' for the standardized `MPI_Comm_split_type()` function for creating MPI communicators according to the modular topology of an MSA system: |
| 76 | |
| 77 | {{{ |
| 78 | MPI_Comm_split(MPI_COMM_WORLD, my_module_id, 0, &module_local_comm); |
| 79 | |
| 80 | /* After the split call, module_local_comm contains from the view of each |
| 81 | * process all the other processes that belong to the same local MSA module. |
| 82 | */ |
| 83 | |
| 84 | MPI_Comm_rank(module_local_comm, &my_module_local_rank); |
| 85 | |
| 86 | printf("My module ID is %d and my module-local rank is %d\n", my_module_id, my_module_local_rank); |
| 87 | }}} |
| 352 | |
| 353 | === Testing for CUDA awareness === |
| 354 | |
| 355 | !ParaStation MPI features three API extensions for querying whether the MPI library at hand is CUDA-aware or not. |
| 356 | |
| 357 | The first targets the compile time: |
| 358 | |
| 359 | {{{ |
| 360 | #if defined(MPIX_CUDA_AWARE_SUPPORT) && MPIX_CUDA_AWARE_SUPPORT |
| 361 | printf("The MPI library is CUDA-aware\n"); |
| 362 | #endif |
| 363 | }}} |
| 364 | |
| 365 | ...and the other two also the runtime: |
| 366 | |
| 367 | {{{ |
| 368 | if (MPIX_Query_cuda_support()) |
| 369 | printf("The CUDA awareness is activated\n"); |
| 370 | }}} |
| 371 | |
| 372 | or alternatively: |
| 373 | |
| 374 | {{{ |
| 375 | MPI_Info_get(MPI_INFO_ENV, "cuda_aware", ..., value, &flag); |
| 376 | /* |
| 377 | * If flag is set, then the library was built with CUDA support. |
| 378 | * If, in addition, value points to the string "true", then the |
| 379 | * CUDA awareness is also activated (i.e., PSP_CUDA=1 is set). |
| 380 | */ |
| 381 | }}} |
| 382 | |
| 383 | Please note that the first two API extensions are similar to those that Open MPI also provides with respect to CUDA awareness, whereas the latter is specific solely to !ParaStation MPI, but which is still quite portable due to the use of the generic `MPI_INFO_ENV` object. |