MPIの初期化・集約を抽象化し、非MPIビルドでは単一ランク動作へフォールバックする。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i32), | public | :: | rank | = | 0_i32 | ||
| integer(kind=i32), | public | :: | size | = | 1_i32 | ||
| logical, | public | :: | enabled | = | .false. |
root rank (rank=0) かどうかを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx |
MPI world size を返す(size<=0 は 1 へ補正)。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in), | optional | :: | ctx |
総数 total_count をrankへ均等分割したときの局所個数を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(in) | :: | total_count | |||
| integer(kind=i32), | intent(in) | :: | rank | |||
| integer(kind=i32), | intent(in) | :: | size |
MPIを初期化して rank / size を取得する。非MPIビルドでは単一ランクを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(out) | :: | ctx |
mpi_initialize が実際に初期化した場合のみ MPI_Finalize を呼ぶ。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(inout) | :: | ctx |
mpi_context から rank/size を取得する。未指定時は単一rank(0/1)。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(out) | :: | rank | |||
| integer(kind=i32), | intent(out) | :: | size | |||
| type(mpi_context), | intent(in), | optional | :: | ctx |
倍精度配列の総和Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| real(kind=dp), | intent(inout) | :: | values(:) |
倍精度スカラの総和Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| real(kind=dp), | intent(inout) | :: | value |
倍精度配列の最小値Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| real(kind=dp), | intent(inout) | :: | values(:) |
倍精度配列の最大値Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| real(kind=dp), | intent(inout) | :: | values(:) |
32bit整数配列の総和Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| integer(kind=i32), | intent(inout) | :: | values(:) |
32bit整数スカラの総和Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| integer(kind=i32), | intent(inout) | :: | value |