| 1 | = jb_am_i_irank0 = |
| 2 | |
| 3 | == Name == |
| 4 | |
| 5 | //jb_am_i_irank0// - singles out one compute node process per BGAS IO node. |
| 6 | |
| 7 | == Synopsis == |
| 8 | {{{ |
| 9 | #include <mpi.h> |
| 10 | #include "jbcnl.h" |
| 11 | |
| 12 | int jb_am_i_irank0(); |
| 13 | }}} |
| 14 | |
| 15 | Include with //-I/bgsys/local/bgas/jbrt/jbcn/include//, link with //-L/bgsys/local/bgas/jbrt/jbcn/lib -ljbcn//. |
| 16 | |
| 17 | == Description == |
| 18 | |
| 19 | //jb_am_i_irank0()// chooses one compute node process (i.e. MPI task) out of the set of processes living on compute nodes connected to a given IO node. That is, for each IO node, there is exactly one MPI task which lives on a compute node connected to it and on which //jb_am_i_irank0()// returns TRUE (1). |
| 20 | |
| 21 | == Return value == |
| 22 | |
| 23 | //jb_am_i_irank0()// returns 1 if and only if the caller's MPI rank is lowest among the MPI ranks of tasks connected to the same IO node as the caller, 0 else. |
| 24 | |
| 25 | == Errors == |
| 26 | |
| 27 | None. |
| 28 | |
| 29 | == Thread safety == |
| 30 | |
| 31 | //jb_am_i_irank0()// is thread-safe. |