[RABIT] fix rabit in local mode
This commit is contained in:
parent
05b958c178
commit
112d866dc9
@ -41,6 +41,8 @@ class IEngine {
|
||||
typedef void (ReduceFunction) (const void *src,
|
||||
void *dst, int count,
|
||||
const MPI::Datatype &dtype);
|
||||
/*! \brief virtual destructor */
|
||||
virtual ~IEngine() {}
|
||||
/*!
|
||||
* \brief performs in-place Allreduce, on sendrecvbuf
|
||||
* this function is NOT thread-safe
|
||||
|
||||
@ -79,7 +79,7 @@ void AllreduceRobust::Allreduce(void *sendrecvbuf_,
|
||||
PreprocFunction prepare_fun,
|
||||
void *prepare_arg) {
|
||||
// skip action in single node
|
||||
if (world_size == 1) {
|
||||
if (world_size == 1 || world_size == -1) {
|
||||
if (prepare_fun != NULL) prepare_fun(prepare_arg);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user