start check windows compatiblity

This commit is contained in:
tqchen 2014-11-23 20:59:10 -08:00
parent 2e444f8338
commit db2adb6885
7 changed files with 17 additions and 6 deletions

View File

@ -1,5 +1,6 @@
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#define NOMINMAX
#include <cstring>
#include "./gbm.h"
#include "./gbtree-inl.hpp"

View File

@ -1,3 +1,5 @@
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#include "./sync.h"
#include "../utils/utils.h"
// no synchronization module, single thread mode does not need it anyway
@ -26,11 +28,11 @@ std::string GetProcessorName(void) {
}
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<>
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) {

View File

@ -1,3 +1,6 @@
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#define NOMINMAX
#include "./sync.h"
#include "../utils/utils.h"
#include <mpi.h>

View File

@ -4,6 +4,9 @@
* with use non-block socket and tree-shape reduction
* \author Tianqi Chen
*/
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#define NOMINMAX
#include <vector>
#include <string>
#include <cstring>
@ -34,13 +37,13 @@ class SyncManager {
this->SetParam("reduce_buffer", "256MB");
}
~SyncManager(void) {
this->Shutdown();
}
inline void Shutdown(void) {
for (size_t i = 0; i < links.size(); ++i) {
links[i].sock.Close();
}
links.clear();
TCPSocket::Finalize();
}
/*! \brief set parameters to the sync manager */
inline void SetParam(const char *name, const char *val) {
@ -80,6 +83,7 @@ class SyncManager {
}
// initialize the manager
inline void Init(void) {
TCPSocket::Startup();
// single node mode
if (master_uri == "NULL") return;
utils::Assert(links.size() == 0, "can only call Init once");

View File

@ -1,5 +1,6 @@
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#define NOMINMAX
#include <cstring>
#include "./updater.h"
#include "./updater_sync-inl.hpp"

View File

@ -1,6 +1,6 @@
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#define NOMINMAX
#include <ctime>
#include <string>
#include <cstring>