Optimization of Collective Communications in HeteroMPI