[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,
|
typedef void (ReduceFunction) (const void *src,
|
||||||
void *dst, int count,
|
void *dst, int count,
|
||||||
const MPI::Datatype &dtype);
|
const MPI::Datatype &dtype);
|
||||||
|
/*! \brief virtual destructor */
|
||||||
|
virtual ~IEngine() {}
|
||||||
/*!
|
/*!
|
||||||
* \brief performs in-place Allreduce, on sendrecvbuf
|
* \brief performs in-place Allreduce, on sendrecvbuf
|
||||||
* this function is NOT thread-safe
|
* this function is NOT thread-safe
|
||||||
|
|||||||
@ -79,7 +79,7 @@ void AllreduceRobust::Allreduce(void *sendrecvbuf_,
|
|||||||
PreprocFunction prepare_fun,
|
PreprocFunction prepare_fun,
|
||||||
void *prepare_arg) {
|
void *prepare_arg) {
|
||||||
// skip action in single node
|
// skip action in single node
|
||||||
if (world_size == 1) {
|
if (world_size == 1 || world_size == -1) {
|
||||||
if (prepare_fun != NULL) prepare_fun(prepare_arg);
|
if (prepare_fun != NULL) prepare_fun(prepare_arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user