Efficient Process Arrival Pattern Aware Collective Communication for HPC and Deep Learning