Medial Code Documentation
Loading...
Searching...
No Matches
Namespaces | Macros | Typedefs | Functions
rabit.h File Reference

This file defines rabit's Allreduce/Broadcast interface The rabit engine contains the actual implementation Code that only uses this header can also be compiled with MPI Allreduce (non fault-tolerant),. More...

#include <string>
#include <vector>
#include <functional>
#include "./internal/engine.h"
#include "./internal/rabit-inl.h"

Go to the source code of this file.

Namespaces

namespace  rabit
 namespace of rabit
 
namespace  rabit::op
 reduction operators namespace
 

Typedefs

using rabit::Stream = dmlc::Stream
 defines stream used in rabit see definition of Stream in dmlc/io.h
 
using rabit::Serializable = dmlc::Serializable
 defines serializable objects used in rabit see definition of Serializable in dmlc/io.h
 

Functions

bool rabit::Init (int argc, char *argv[])
 initializes rabit, call this once at the beginning of your program
 
bool rabit::Finalize ()
 finalizes the rabit engine, call this function after you finished with all the jobs
 
int rabit::GetRank ()
 gets rank of the current process
 
int rabit::GetWorldSize ()
 gets total number of processes
 
bool rabit::IsDistributed ()
 whether rabit env is in distributed mode
 
std::string rabit::GetProcessorName ()
 gets processor's name
 
void rabit::TrackerPrint (const std::string &msg)
 prints the msg to the tracker, this function can be used to communicate progress information to the user who monitors the tracker
 
void rabit::TrackerPrintf (const char *fmt,...)
 prints the msg to the tracker, this function may not be available in very strict c++98 compilers, though it usually is. this function can be used to communicate progress information to the user who monitors the tracker
 
void rabit::Broadcast (void *sendrecv_data, size_t size, int root)
 broadcasts a memory region to every node from the root
 
template<typename DType >
void rabit::Broadcast (std::vector< DType > *sendrecv_data, int root)
 broadcasts an std::vector<DType> to every node from root
 
void rabit::Broadcast (std::string *sendrecv_data, int root)
 broadcasts a std::string to every node from the root
 
template<typename OP , typename DType >
void rabit::Allreduce (DType *sendrecvbuf, size_t count, void(*prepare_fun)(void *)=nullptr, void *prepare_arg=nullptr)
 performs in-place Allreduce on sendrecvbuf this function is NOT thread-safe
 
template<typename DType >
void rabit::Allgather (DType *sendrecvbuf_, size_t total_size, size_t slice_begin, size_t slice_end, size_t size_prev_slice)
 Allgather function, each node have a segment of data in the ring of sendrecvbuf, the data provided by current node k is [slice_begin, slice_end), the next node's segment must start with slice_end after the call of Allgather, sendrecvbuf_ contains all the contents including all segments use a ring based algorithm.
 
int rabit::LoadCheckPoint ()
 deprecated, planned for removal after checkpoing from JVM package is removed.
 
void rabit::CheckPoint ()
 deprecated, planned for removal after checkpoing from JVM package is removed.
 
int rabit::VersionNumber ()
 

Detailed Description

This file defines rabit's Allreduce/Broadcast interface The rabit engine contains the actual implementation Code that only uses this header can also be compiled with MPI Allreduce (non fault-tolerant),.

Copyright (c) 2014 by Contributors

rabit.h and serializable.h is all what the user needs to use the rabit interface

Author
Tianqi Chen, Ignacio Cano, Tianyi Zhou