Document refactor
change badge
This commit is contained in:
26
doc/build.md
26
doc/build.md
@@ -1,5 +1,5 @@
|
||||
Build XGBoost
|
||||
====
|
||||
=============
|
||||
* Run ```bash build.sh``` (you can also type make)
|
||||
* If you have C++11 compiler, it is recommended to type ```make cxx11=1```
|
||||
- C++11 is not used by default
|
||||
@@ -12,19 +12,19 @@ Build XGBoost
|
||||
* OS X with multi-threading support: see [next section](#openmp-for-os-x)
|
||||
|
||||
Build XGBoost in OS X with OpenMP
|
||||
====
|
||||
---------------------------------
|
||||
Here is the complete solution to use OpenMp-enabled compilers to install XGBoost.
|
||||
|
||||
1. Obtain gcc with openmp support by `brew install gcc --without-multilib` **or** clang with openmp by `brew install clang-omp`. The clang one is recommended because the first method requires us compiling gcc inside the machine (more than an hour in mine)! (BTW, `brew` is the de facto standard of `apt-get` on OS X. So installing [HPC](http://hpc.sourceforge.net/) separately is not recommended, but it should work.)
|
||||
|
||||
2. **if you are planing to use clang-omp** - in step 3 and/or 4, change line 9 in `xgboost/src/utils/omp.h` to
|
||||
2. **if you are planing to use clang-omp** - in step 3 and/or 4, change line 9 in `xgboost/src/utils/omp.h` to
|
||||
|
||||
```C++
|
||||
#include <libiomp/omp.h> /* instead of #include <omp.h> */`
|
||||
#include <libiomp/omp.h> /* instead of #include <omp.h> */`
|
||||
```
|
||||
|
||||
to make it work, otherwise you might get this error
|
||||
|
||||
to make it work, otherwise you might get this error
|
||||
|
||||
`src/tree/../utils/omp.h:9:10: error: 'omp.h' file not found...`
|
||||
|
||||
|
||||
@@ -43,11 +43,11 @@ Here is the complete solution to use OpenMp-enabled compilers to install XGBoost
|
||||
export CXX = clang-omp++
|
||||
```
|
||||
|
||||
Remember to change `header` (mentioned in step 2) if using clang-omp.
|
||||
|
||||
Remember to change `header` (mentioned in step 2) if using clang-omp.
|
||||
|
||||
Then `cd xgboost` then `bash build.sh` to compile XGBoost. And go to `wrapper` sub-folder to install python version.
|
||||
|
||||
4. Set the `Makevars` file in highest piority for R.
|
||||
4. Set the `Makevars` file in highest piority for R.
|
||||
|
||||
The point is, there are three `Makevars` : `~/.R/Makevars`, `xgboost/R-package/src/Makevars`, and `/usr/local/Cellar/r/3.2.0/R.framework/Resources/etc/Makeconf` (the last one obtained by running `file.path(R.home("etc"), "Makeconf")` in R), and `SHLIB_OPENMP_CXXFLAGS` is not set by default!! After trying, it seems that the first one has highest piority (surprise!).
|
||||
|
||||
@@ -75,21 +75,21 @@ Here is the complete solution to use OpenMp-enabled compilers to install XGBoost
|
||||
|
||||
Again, remember to change `header` if using clang-omp.
|
||||
|
||||
Then inside R, run
|
||||
Then inside R, run
|
||||
|
||||
```R
|
||||
install.packages('xgboost/R-package/', repos=NULL, type='source')
|
||||
```
|
||||
|
||||
|
||||
Or
|
||||
|
||||
|
||||
```R
|
||||
devtools::install_local('xgboost/', subdir = 'R-package') # you may use devtools
|
||||
```
|
||||
|
||||
|
||||
Build with HDFS and S3 Support
|
||||
=====
|
||||
------------------------------
|
||||
* To build xgboost use with HDFS/S3 support and distributed learnig. It is recommended to build with dmlc, with the following steps
|
||||
- ```git clone https://github.com/dmlc/dmlc-core```
|
||||
- Follow instruction in dmlc-core/make/config.mk to compile libdmlc.a
|
||||
|
||||
Reference in New Issue
Block a user