return values in Init and Finalize (#96)

* make inti function return values

* address the comments
This commit is contained in:
Nan Zhu
2019-06-25 20:05:54 -07:00
committed by GitHub
parent fc85f776f4
commit 65b718a5e7
12 changed files with 253 additions and 201 deletions

View File

@@ -161,9 +161,9 @@ class IEngine {
};
/*! \brief initializes the engine module */
void Init(int argc, char *argv[]);
bool Init(int argc, char *argv[]);
/*! \brief finalizes the engine module */
void Finalize(void);
bool Finalize(void);
/*! \brief singleton method to get engine */
IEngine *GetEngine(void);

View File

@@ -103,12 +103,12 @@ inline void Reducer(const void *src_, void *dst_, int len, const MPI::Datatype &
} // namespace op
// intialize the rabit engine
inline void Init(int argc, char *argv[]) {
engine::Init(argc, argv);
inline bool Init(int argc, char *argv[]) {
return engine::Init(argc, argv);
}
// finalize the rabit engine
inline void Finalize(void) {
engine::Finalize();
inline bool Finalize(void) {
return engine::Finalize();
}
// get the rank of current process
inline int GetRank(void) {