Hyper MPI中并不是每一个算法都支持所有的场景,以下几种场景属于部分算法支持:
mpirun提交任务不指定ppn或者使用rankfile等情况下,可能出现节点进程不均衡的场景(和binomial tree相关的节点进程能感知到node层topo-aware算法(Bcast算法2,Allreduce算法2)可支持ppn不均衡的场景);其余topo感知算法目前不支持进程在socket或node上不均匀分布的情况。
当用户指定算法不支持ppn不均衡场景时,会进行算法切换并给出如下提示信息:
Current algorithm don't support ppn unbalance case, switch to default algorithm.
所有的socket-aware算法都要求socket进程数均衡;指定socket-aware算法且socket进程数不均衡时,会切换到node-aware算法并给出如下提示信息:
Warning: process number in every socket must be same in socket-aware algorithm, please make sure ppn must be even and '--map-by socket' included. Switch to corresponding node-aware algorithm already.
MPI标准支持用户在MPI_Allreduce内进行自定义数学操作,即不局限于求和(MPI_SUM)、乘积(MPI_PROC)等MPI内置的数学操作;用户在自定义数学操作时会出现操作本身不对易的情况,如矩阵乘法。Allreduce算法1和算法4支持此类操作。
当用户指定算法不是算法1或算法4时,Hyper MPI会根据数据大小切换成算法1(中小包)或者算法4(大包),并给出如下提示信息:
Current algorithm does not support non commutative operation, and switch to Recursive doubling or Ring Algorithm which may have unexpected performance.
MPI标准支持用户进行自定义数据类型,即不局限于整数类型(MPI_INT)、双精度型(MPI_DOUBLE)等MPI内置的数据类型;用户自定义的数据类型有可能过长导致出错。Allreduce算法1和算法4支持此类操作,提示信息如下:
Current algorithm does not support large datatype, and switch to Recursive doubling or Ring Algorithm which may have unexpected performance.
由于算法8实现的特殊性,当指定算法8且socket内仅有一个进程时,会被切换成算法7。
只有非拓扑算法、Allreduce算法2和Bcast算法2支持此场景;当指定算法不在这几个算法之列时,自动切换算法并给出如下提示信息:
Current algorithm demand rank number is continous. Switch default algorithm whose performance may be not the best.