start check windows compatiblity
This commit is contained in:
parent
2e444f8338
commit
db2adb6885
@ -1,5 +1,6 @@
|
|||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
#define NOMINMAX
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "./gbm.h"
|
#include "./gbm.h"
|
||||||
#include "./gbtree-inl.hpp"
|
#include "./gbtree-inl.hpp"
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
#include "./sync.h"
|
#include "./sync.h"
|
||||||
#include "../utils/utils.h"
|
#include "../utils/utils.h"
|
||||||
// no synchronization module, single thread mode does not need it anyway
|
// no synchronization module, single thread mode does not need it anyway
|
||||||
@ -26,11 +28,11 @@ std::string GetProcessorName(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void AllReduce<uint32_t>(uint32_t *sendrecvbuf, int count, ReduceOp op) {
|
void AllReduce<uint32_t>(uint32_t *sendrecvbuf, size_t count, ReduceOp op) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void AllReduce<float>(float *sendrecvbuf, int count, ReduceOp op) {
|
void AllReduce<float>(float *sendrecvbuf, size_t count, ReduceOp op) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bcast(std::string *sendrecv_data, int root) {
|
void Bcast(std::string *sendrecv_data, int root) {
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
#define NOMINMAX
|
||||||
#include "./sync.h"
|
#include "./sync.h"
|
||||||
#include "../utils/utils.h"
|
#include "../utils/utils.h"
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
|
|||||||
@ -4,6 +4,9 @@
|
|||||||
* with use non-block socket and tree-shape reduction
|
* with use non-block socket and tree-shape reduction
|
||||||
* \author Tianqi Chen
|
* \author Tianqi Chen
|
||||||
*/
|
*/
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
#define NOMINMAX
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -34,13 +37,13 @@ class SyncManager {
|
|||||||
this->SetParam("reduce_buffer", "256MB");
|
this->SetParam("reduce_buffer", "256MB");
|
||||||
}
|
}
|
||||||
~SyncManager(void) {
|
~SyncManager(void) {
|
||||||
this->Shutdown();
|
|
||||||
}
|
}
|
||||||
inline void Shutdown(void) {
|
inline void Shutdown(void) {
|
||||||
for (size_t i = 0; i < links.size(); ++i) {
|
for (size_t i = 0; i < links.size(); ++i) {
|
||||||
links[i].sock.Close();
|
links[i].sock.Close();
|
||||||
}
|
}
|
||||||
links.clear();
|
links.clear();
|
||||||
|
TCPSocket::Finalize();
|
||||||
}
|
}
|
||||||
/*! \brief set parameters to the sync manager */
|
/*! \brief set parameters to the sync manager */
|
||||||
inline void SetParam(const char *name, const char *val) {
|
inline void SetParam(const char *name, const char *val) {
|
||||||
@ -80,6 +83,7 @@ class SyncManager {
|
|||||||
}
|
}
|
||||||
// initialize the manager
|
// initialize the manager
|
||||||
inline void Init(void) {
|
inline void Init(void) {
|
||||||
|
TCPSocket::Startup();
|
||||||
// single node mode
|
// single node mode
|
||||||
if (master_uri == "NULL") return;
|
if (master_uri == "NULL") return;
|
||||||
utils::Assert(links.size() == 0, "can only call Init once");
|
utils::Assert(links.size() == 0, "can only call Init once");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
#define NOMINMAX
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "./updater.h"
|
#include "./updater.h"
|
||||||
#include "./updater_sync-inl.hpp"
|
#include "./updater_sync-inl.hpp"
|
||||||
|
|||||||
@ -598,12 +598,12 @@ class QuantileSketchTemplate {
|
|||||||
nlevel = 1;
|
nlevel = 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
limit_size = static_cast<size_t>(ceil(nlevel / eps)) + 1;
|
limit_size = static_cast<size_t>(ceil(nlevel / eps)) + 1;
|
||||||
size_t n = (1UL << nlevel);
|
size_t n = (1UL << nlevel);
|
||||||
if (n * limit_size >= maxn) break;
|
if (n * limit_size >= maxn) break;
|
||||||
++nlevel;
|
++nlevel;
|
||||||
}
|
}
|
||||||
// check invariant
|
// check invariant
|
||||||
size_t n = (1UL << nlevel);
|
size_t n = (1UL << nlevel);
|
||||||
utils::Assert(n * limit_size >= maxn, "invalid init parameter");
|
utils::Assert(n * limit_size >= maxn, "invalid init parameter");
|
||||||
utils::Assert(nlevel <= limit_size * eps, "invalid init parameter");
|
utils::Assert(nlevel <= limit_size * eps, "invalid init parameter");
|
||||||
// lazy reserve the space, if there is only one value, no need to allocate space
|
// lazy reserve the space, if there is only one value, no need to allocate space
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
#define NOMINMAX
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user