Fix bugs in the training time computation for multinode.