try disable omp

This commit is contained in:
tqchen 2015-07-29 22:14:38 -07:00
parent 67d332e0f5
commit 6f01fa50ce
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
environment:
global:
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\python-appveyor-demo\\appveyor\\run_with_env.cmd"
DISABLE_OPENMP: 1
matrix:
- PYTHON: "C:\\Python27-x64"

View File

@ -7,10 +7,10 @@
#ifndef XGBOOST_UTILS_OMP_H_
#define XGBOOST_UTILS_OMP_H_
#if defined(_OPENMP)
#if defined(_OPENMP) && !defined(DISABLE_OPENMP)
#include <omp.h>
#else
#ifndef DISABLE_OPENMP
#if !defined(DISABLE_OPENMP)
// use pragma message instead of warning
#pragma message("Warning: OpenMP is not available,"\
"xgboost will be compiled into single-thread code."\