Date: Sat, 14 Dec 2019 21:37:35 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r520144 - in head/misc: . xgboost xgboost/files Message-ID: <201912142137.xBELbZEJ094040@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Sat Dec 14 21:37:35 2019 New Revision: 520144 URL: https://svnweb.freebsd.org/changeset/ports/520144 Log: New port: misc/xgboost: Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT, GBM) Added: head/misc/xgboost/ head/misc/xgboost/Makefile (contents, props changed) head/misc/xgboost/distinfo (contents, props changed) head/misc/xgboost/files/ head/misc/xgboost/files/patch-CMakeLists.txt (contents, props changed) head/misc/xgboost/files/patch-rabit_CMakeLists.txt (contents, props changed) head/misc/xgboost/files/patch-src_common_json.cc (contents, props changed) head/misc/xgboost/files/patch-src_common_timer.cc (contents, props changed) head/misc/xgboost/pkg-descr (contents, props changed) head/misc/xgboost/pkg-plist (contents, props changed) Modified: head/misc/Makefile Modified: head/misc/Makefile ============================================================================== --- head/misc/Makefile Sat Dec 14 21:27:11 2019 (r520143) +++ head/misc/Makefile Sat Dec 14 21:37:35 2019 (r520144) @@ -535,6 +535,7 @@ SUBDIR += xfce4-weather-plugin SUBDIR += xfce4-wm-themes SUBDIR += xgas + SUBDIR += xgboost SUBDIR += xless SUBDIR += xosd SUBDIR += xtail Added: head/misc/xgboost/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/Makefile Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +PORTNAME= xgboost +DISTVERSIONPREFIX= v +DISTVERSION= 0.90-235 +DISTVERSIONSUFFIX= -gad4a1c73 +CATEGORIES= misc # machine-learning + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT, GBM) + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libdmlc.so:devel/dmlc-core + +USES= cmake compiler:c++11-lang localbase +USE_GITHUB= yes +GH_ACCOUNT= dmlc +GH_TUPLE= dmlc:rabit:2f25347:rabit/rabit \ + NVlabs:cub:b20808b:cub/cub +USE_LDCONFIG= yes + +LDFLAGS+= ${LOCALBASE}/lib/libdmlc.so -lexecinfo + +OPTIONS_DEFINE= OPENMP + +OPENMP_CMAKE_BOOL= USE_OPENMP +OPENMP_LIB_DEPENDS= libomp.so:devel/openmp +OPENMP_BROKEN= error: unsupported argument 'libomp -I/usr/local/include -L/usr/local/lib' to option 'fopenmp=' + +post-patch: # https://github.com/dmlc/rabit/issues/131 + @${FIND} ${WRKSRC} -name "*.h" -o -name "*.cc" | ${XARGS} ${REINPLACE_CMD} -i '' -e 's| _assert(| _xassert(|; s| _assert)| _xassert)|' + +.include <bsd.port.mk> Added: head/misc/xgboost/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/distinfo Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,7 @@ +TIMESTAMP = 1576356559 +SHA256 (dmlc-xgboost-v0.90-235-gad4a1c73_GH0.tar.gz) = c5fd4f9c152ba56961a43b677397251f20f78e534571926247f8d24275f9642b +SIZE (dmlc-xgboost-v0.90-235-gad4a1c73_GH0.tar.gz) = 1131611 +SHA256 (dmlc-rabit-2f25347_GH0.tar.gz) = 9a9f9b754d1f8f8f0949faded75859e791cc56c75c38928467649fc227bee7e0 +SIZE (dmlc-rabit-2f25347_GH0.tar.gz) = 90555 +SHA256 (NVlabs-cub-b20808b_GH0.tar.gz) = 5d613bf9c4bd3f60803720b982291c585e5e9cce83a93b5ef576bd3ce6d141e4 +SIZE (NVlabs-cub-b20808b_GH0.tar.gz) = 390976 Added: head/misc/xgboost/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/files/patch-CMakeLists.txt Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,26 @@ +--- CMakeLists.txt.orig 2019-12-14 20:50:22 UTC ++++ CMakeLists.txt +@@ -101,16 +101,16 @@ endif (USE_CUDA) + + # dmlc-core + msvc_use_static_runtime() +-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +-set_target_properties(dmlc PROPERTIES +- CXX_STANDARD 11 +- CXX_STANDARD_REQUIRED ON +- POSITION_INDEPENDENT_CODE ON) +-list(APPEND LINKED_LIBRARIES_PRIVATE dmlc) ++#add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) ++#set_target_properties(dmlc PROPERTIES ++# CXX_STANDARD 11 ++# CXX_STANDARD_REQUIRED ON ++# POSITION_INDEPENDENT_CODE ON) ++#list(APPEND LINKED_LIBRARIES_PRIVATE dmlc) + + # rabit + set(RABIT_BUILD_DMLC OFF) +-set(DMLC_ROOT ${xgboost_SOURCE_DIR}/dmlc-core) ++set(DMLC_ROOT ${CMAKE_INSTALL_PREFIX}) + set(RABIT_WITH_R_LIB ${R_LIB}) + add_subdirectory(rabit) + Added: head/misc/xgboost/files/patch-rabit_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/files/patch-rabit_CMakeLists.txt Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,34 @@ +--- rabit/CMakeLists.txt.orig 2019-12-14 20:43:47 UTC ++++ rabit/CMakeLists.txt +@@ -13,7 +13,7 @@ set(DMLC_ROOT ${CMAKE_CURRENT_LIST_DIR}/../dmlc-core) + + # moved from xgboost build + if(R_LIB OR MINGW OR WIN32) +- add_library(rabit src/engine_empty.cc src/c_api.cc) ++ add_library(rabit SHARED src/engine_empty.cc src/c_api.cc) + set(rabit_libs rabit) + set_target_properties(rabit + PROPERTIES CXX_STANDARD 11 +@@ -21,10 +21,10 @@ if(R_LIB OR MINGW OR WIN32) + POSITION_INDEPENDENT_CODE ON) + else() + find_package(Threads REQUIRED) +- add_library(rabit_empty src/engine_empty.cc src/c_api.cc) +- add_library(rabit_base src/allreduce_base.cc src/engine_base.cc src/c_api.cc) ++ add_library(rabit_empty SHARED src/engine_empty.cc src/c_api.cc) ++ add_library(rabit_base SHARED src/allreduce_base.cc src/engine_base.cc src/c_api.cc) + +- add_library(rabit src/allreduce_base.cc src/allreduce_robust.cc src/engine.cc src/c_api.cc) ++ add_library(rabit SHARED src/allreduce_base.cc src/allreduce_robust.cc src/engine.cc src/c_api.cc) + add_library(rabit_mock_static src/allreduce_base.cc src/allreduce_robust.cc src/engine_mock.cc src/c_api.cc) + add_library(rabit_mock SHARED src/allreduce_base.cc src/allreduce_robust.cc src/engine_mock.cc src/c_api.cc) + target_link_libraries(rabit Threads::Threads) +@@ -43,7 +43,7 @@ if(RABIT_BUILD_MPI) + if (NOT MPI_CXX_FOUND) + message(FATAL_ERROR "CXX Interface for MPI is required for building MPI backend.") + endif (NOT MPI_CXX_FOUND) +- add_library(rabit_mpi src/engine_mpi.cc ${MPI_INCLUDE_PATH}) ++ add_library(rabit_mpi SHARED src/engine_mpi.cc ${MPI_INCLUDE_PATH}) + target_link_libraries(rabit_mpi ${MPI_CXX_LIBRARIES}) + list(APPEND rabit_libs rabit_mpi) + endif() Added: head/misc/xgboost/files/patch-src_common_json.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/files/patch-src_common_json.cc Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,11 @@ +--- src/common/json.cc.orig 2019-12-14 20:32:28 UTC ++++ src/common/json.cc +@@ -630,7 +630,7 @@ Json JsonReader::ParseNumber() { + // multiply zero by inf which gives nan. + if (f != 0.0) { + // Only use exp10 from libc on gcc+linux +-#if !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) ++#if !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__) + #define exp10(val) std::pow(10, (val)) + #endif // !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) + f *= exp10(exponent); Added: head/misc/xgboost/files/patch-src_common_timer.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/files/patch-src_common_timer.cc Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,14 @@ +--- src/common/timer.cc.orig 2019-12-14 20:35:26 UTC ++++ src/common/timer.cc +@@ -44,8 +44,9 @@ std::vector<Monitor::StatMap> Monitor::CollectFromOthe + statistic[kv.first] = Object(); + auto& j_pair = statistic[kv.first]; + j_pair["count"] = Integer(kv.second.count); +- j_pair["elapsed"] = Integer(std::chrono::duration_cast<std::chrono::microseconds>( +- kv.second.timer.elapsed).count()); ++ // https://github.com/dmlc/xgboost/issues/5117 ++ j_pair["elapsed"] = 1; //Integer(std::chrono::duration_cast<std::chrono::microseconds>( ++ //kv.second.timer.elapsed).count()); + } + + std::stringstream ss; Added: head/misc/xgboost/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/pkg-descr Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,5 @@ +Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) +Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, +Hadoop, Spark, Flink and DataFlow. + +WWW: https://xgboost.ai/ Added: head/misc/xgboost/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xgboost/pkg-plist Sat Dec 14 21:37:35 2019 (r520144) @@ -0,0 +1,46 @@ +bin/xgboost +include/rabit/c_api.h +include/rabit/internal/engine.h +include/rabit/internal/io.h +include/rabit/internal/rabit-inl.h +include/rabit/internal/socket.h +include/rabit/internal/thread_local.h +include/rabit/internal/timer.h +include/rabit/internal/utils.h +include/rabit/rabit.h +include/rabit/serializable.h +include/xgboost/base.h +include/xgboost/c_api.h +include/xgboost/data.h +include/xgboost/feature_map.h +include/xgboost/gbm.h +include/xgboost/generic_parameters.h +include/xgboost/host_device_vector.h +include/xgboost/json.h +include/xgboost/json_io.h +include/xgboost/learner.h +include/xgboost/linear_updater.h +include/xgboost/logging.h +include/xgboost/metric.h +include/xgboost/model.h +include/xgboost/objective.h +include/xgboost/parameter.h +include/xgboost/predictor.h +include/xgboost/span.h +include/xgboost/tree_model.h +include/xgboost/tree_updater.h +include/xgboost/version_config.h +lib/cmake/rabit/rabitConfig.cmake +lib/cmake/rabit/rabitConfigVersion.cmake +lib/cmake/rabit/rabitTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/rabit/rabitTargets.cmake +lib/cmake/xgboost/XGBoostTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/xgboost/XGBoostTargets.cmake +lib/cmake/xgboost/xgboost-config-version.cmake +lib/cmake/xgboost/xgboost-config.cmake +lib/librabit.so +lib/librabit_base.so +lib/librabit_empty.so +lib/librabit_mock.so +lib/librabit_mock_static.a +lib/libxgboost.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912142137.xBELbZEJ094040>