Skip to content

Commit

Permalink
Merge branch 'release/3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Feb 17, 2014
2 parents 4ee2651 + 6dca06f commit 053a248
Show file tree
Hide file tree
Showing 111 changed files with 3,179 additions and 698 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ configure.log
/examples/undocumented/libshogun/*
!/examples/undocumented/libshogun/*.cpp
!/examples/undocumented/libshogun/CMakeLists.txt
examples/undocumented/python_modular/*
!/examples/undocumented/libshogun/tools/
!examples/undocumented/python_modular/graphical/
!examples/undocumented/python_modular/*.py
Expand Down
19 changes: 9 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ notifications:
- "it's %{author}'s turn to pay the next round of drinks for the massacre he caused in %{repository}: %{build_url}"
matrix:
include:
- compiler: gcc
env: CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON" CUSTOM_PKG="sudo pip install -q cpp-coveralls" COVERALLS=1
- compiler: clang
python: 2.7
language: python
env: CMAKE_OPTIONS="-DPythonModular=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON" EXTRA_PACKAGES="python-scipy swig2.0" CC=clang CXX=clang++
- compiler: clang
python: 3.3
language: python
env: CMAKE_OPTIONS="-DPythonModular=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON" EXTRA_PACKAGES="swig2.0" CC=clang CXX=clang++ PIP_ARGS=" -I --use-wheel --find-links=http://cache27diy-cpycloud.rhcloud.com/3.3/"
env: CMAKE_OPTIONS="-DPythonModular=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON" EXTRA_PACKAGES="swig2.0" CC=clang CXX=clang++ PIP_ARGS=" -I --no-index --find-links=http://cache27diy-cpycloud.rhcloud.com/3.3/"
- compiler: clang
rvm: 1.8.7
language: ruby
Expand All @@ -42,21 +44,15 @@ matrix:
allow_failures:
- compiler: clang
env: CMAKE_OPTIONS="-DRModular=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON" EXTRA_PACKAGES="r-base-core swig2.0" CC=clang CXX=clang++
- compiler: clang
python: 3.3
language: python
env: CMAKE_OPTIONS="-DPythonModular=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON" EXTRA_PACKAGES="swig2.0" CC=clang CXX=clang++ PIP_ARGS=" -I --use-wheel --find-links=http://cache27diy-cpycloud.rhcloud.com/3.3/"
- language: objective-c
env: OSX=1
virtualenv:
system_site_packages: true
before_install:
- if [ -z $OSX ] ; then sudo apt-add-repository -y ppa:kubuntu-ppa/backports ; sudo apt-get update -qq ; fi
- if [ -z $OSX ] ; then sudo apt-add-repository -y ppa:dr-graef/octave-3.6.precise ; sudo apt-get update -qq ; else brew update ; fi
- if [ -z $OSX ] ; then sudo apt-get install -qq libbz2-dev cdbs libarpack2-dev libatlas-base-dev libblas-dev libglpk-dev libhdf5-serial-dev zlib1g-dev libxml2-dev libreadline6-dev libreadline-dev libsnappy-dev liblzo2-dev liblzma-dev liblapack-dev gdb cmake python-jinja2 $EXTRA_PACKAGES ; else brew install cmake ; fi
- if [ -z $OSX ] ; then sudo apt-get install -qq libbz2-dev cdbs libarpack2-dev libatlas-base-dev libblas-dev libglpk-dev libhdf5-serial-dev zlib1g-dev libxml2-dev libreadline6-dev libreadline-dev libsnappy-dev liblzo2-dev liblzma-dev liblapack-dev gdb cmake python-jinja2 $EXTRA_PACKAGES ; else brew list cmake || brew install cmake ; fi
- if [ $OSX ] ; then curl -O https://raw.github.com/rudix-mac/package-manager/master/rudix.py && sudo python rudix.py install rudix && sudo rudix install jinja2 ; fi
- $CUSTOM_PKG
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] ; then pip install -I git+https://github.com/pypa/pip@42102e9deaea99db08b681d06906c2945f6f95e2#egg=pip ; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] ; then pip install -I git+https://github.com/pypa/pip@1.5#egg=pip ; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] ; then pip install -I -U setuptools ; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] ; then pip install wheel ; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] ; then pip install $PIP_ARGS numpy ; fi
Expand All @@ -67,6 +63,9 @@ before_script:
- cd build
script:
- cmake -DENABLE_TESTING=ON -DBUNDLE_EIGEN=ON -DBUNDLE_JSON=ON -DBUNDLE_NLOPT=ON $CMAKE_OPTIONS ..
- if [ -z $CMAKE_OPTIONS ] ; then make -j 2 ; else make -j 4 ; fi
- if [ -z "$CMAKE_OPTIONS" -o -n "$COVERALLS" ] ; then make -j 2 ; else make -j 4 ; fi
- sudo make install
- ctest --output-on-failure -j 2
after_success:
- cd ..
- coveralls -e tests -e examples -e cmake -e benchmarks -e src/interfaces -e /usr/include -e build/GoogleMock -e build/NLopt -e build/Eigen3 -e build/JSON -e build/CMakeFiles -E '.*\.h' > /dev/null
96 changes: 66 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ SET(THIRD_PARTY_DIR ${CMAKE_SOURCE_DIR}/third_party)
SET(LIBSHOGUN_SRC_DIR ${CMAKE_SOURCE_DIR}/src/shogun)
SET(COMMON_MODULAR_SRC_DIR ${CMAKE_SOURCE_DIR}/src/interfaces/modular/)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/shogun
${CMAKE_BINARY_DIR}/src
${CMAKE_BINARY_DIR}/src/shogun)

# check whether any of the modular interfaces are turned ON
IF (
PythonModular OR LuaModular OR RModular OR
Expand Down Expand Up @@ -184,15 +189,9 @@ ENDIF()
# clang with -std=c++11 and -stdlib=libc++ does not work
# well with swig generated cxx hence disable c++11 for this case.

# TODO: until swig 2.0.11 does not support compilation with libc++
# There are PRs against SWIG HEAD to fix this hence it needs to be checked
# which later version can support compilation with libc++
IF (COMPILE_MODULAR_INTERFACE AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") AND NOT SWIG_VERSION VERSION_GREATER "2.0.11")
SET(CMAKE_CXX_FLAGS "-stdlib=libstdc++ ${CMAKE_CXX_FLAGS}")
SET(SWIG_CXX_COMPILER_FLAGS "-stdlib=libstdc++ ${SWIG_CXX_COMPILER_FLAGS}")
ENDIF()

IF (NOT ((CYGWIN AND ENABLE_TESTING) OR (DARWIN AND COMPILE_MODULAR_INTERFACE)))
# this has been only fixed in swig 2.0.12 or later.
IF (NOT ((CYGWIN AND ENABLE_TESTING) OR (DARWIN AND COMPILE_MODULAR_INTERFACE
AND SWIG_VERSION VERSION_LESS "2.0.12")))
INCLUDE(CheckCXX11Features)

IF(_HAS_CXX11_FLAG)
Expand All @@ -212,6 +211,12 @@ IF (NOT ((CYGWIN AND ENABLE_TESTING) OR (DARWIN AND COMPILE_MODULAR_INTERFACE)))
IF (HAVE_CXX11_ATOMIC)
LIST(APPEND DEFINES HAVE_CXX11_ATOMIC)
ENDIF()
ELSEIF(DARWIN AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0"))
# osx clang 5.0.0 or later uses libc++ by default
# this is causing problems with source generated by swig version earlier than 3.0.0
# force to use libstdc++ for compilation of sources
SET(CMAKE_CXX_FLAGS "-stdlib=libstdc++ ${CMAKE_CXX_FLAGS}")
SET(SWIG_CXX_COMPILER_FLAGS "-stdlib=libstdc++ ${SWIG_CXX_COMPILER_FLAGS}")
ENDIF()

include(CheckIncludeFileCXX)
Expand Down Expand Up @@ -825,11 +830,15 @@ IF (PythonModular OR PythonStatic)
SET(TARGET_SWIGFLAGS "-builtin\;-modern\;-modernargs")
ENDIF()

add_subdirectory(src/interfaces/python_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/python_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/python_modular)
ENDIF()
ENDIF()

IF(PythonStatic)
add_subdirectory(src/interfaces/python_static)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/python_static)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/python_static)
ENDIF()
ENDIF()
ENDIF()

Expand All @@ -843,7 +852,9 @@ IF (LuaModular)
ENDIF ()
SET(LUA_EXECUTABLE lua)
UNSET(TARGET_SWIGFLAGS)
add_subdirectory(src/interfaces/lua_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/lua_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/lua_modular)
ENDIF()
ENDIF()

# java modular
Expand All @@ -865,7 +876,9 @@ IF (JavaModular)
ENDIF()

SET(TARGET_SWIGFLAGS "-package\;org.shogun")
add_subdirectory(src/interfaces/java_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/java_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/java_modular)
ENDIF()
ENDIF()

# ruby modular
Expand All @@ -874,7 +887,7 @@ IF (RubyModular)
FIND_PACKAGE(RubyNArray REQUIRED)
SET(NARRAY_LIB ${RUBY_NARRAY_LIBRARY})
UNSET(TARGET_SWIGFLAGS)
add_subdirectory(src/interfaces/ruby_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/ruby_modular)
ENDIF()

# octave modular
Expand All @@ -886,19 +899,25 @@ IF (OctaveModular OR OctaveStatic)

IF(OctaveModular)
UNSET(TARGET_SWIGFLAGS)
add_subdirectory(src/interfaces/octave_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/octave_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/octave_modular)
ENDIF()
ENDIF()

IF(OctaveStatic)
add_subdirectory(src/interfaces/octave_static)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/octave_static)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/octave_static)
ENDIF()
ENDIF()
ENDIF()

# csharp modular
IF (CSharpModular)
FIND_PACKAGE(CSharp REQUIRED)
UNSET(TARGET_SWIGFLAGS)
add_subdirectory(src/interfaces/csharp_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/csharp_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/csharp_modular)
ENDIF()
ENDIF()

# r modular
Expand All @@ -907,32 +926,42 @@ IF (RModular OR RStatic)

IF (RModular)
UNSET(TARGET_SWIGFLAGS)
add_subdirectory(src/interfaces/r_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/r_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/r_modular)
ENDIF()
ENDIF()

IF (RStatic)
add_subdirectory(src/interfaces/r_static)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/r_static)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/r_static)
ENDIF()
ENDIF()
ENDIF()

# perl modular
IF (PerlModular)
FIND_PACKAGE(FindPerlLibs REQUIRED)
UNSET(TARGET_SWIGFLAGS)
#add_subdirectory(src/interfaces/perl_modular)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/perl_modular)
#add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/perl_modular)
ENDIF()
ENDIF()

IF (MatlabStatic)
FIND_PACKAGE(Matlab REQUIRED)
IF(MATLAB_FOUND)
add_subdirectory(src/interfaces/matlab_static)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/matlab_modular)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/matlab_static)
ENDIF()
ELSE()
MESSAGE(FATAL_ERROR "Could not find Matlab, which is required for compiling matlab_static interface. Try setting MATLAB_ROOT enviroment variable to the right path")
ENDIF()
ENDIF()

IF (CmdLineStatic)
add_subdirectory(src/interfaces/cmdline_static)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/interfaces/cmdline_static)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/interfaces/cmdline_static)
ENDIF()
ENDIF()

IF (SVMLight)
Expand All @@ -945,6 +974,7 @@ OPTION(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of Shogun builds
IF(BUILD_DASHBOARD_REPORTS)
file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/configs/valgrind.supp" VALGRIND_SUPPRESSION_FILE)
SET(MEMORYCHECK_SUPPRESSIONS_FILE ${VALGRIND_SUPPRESSION_FILE} CACHE FILEPATH "File that contains suppressions for the memory checker")
SET(MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=full --track-origins=yes --num-callers=50 --error-exitcode=1")
include(CTest)
ENDIF()

Expand All @@ -957,13 +987,15 @@ IF(ENABLE_TESTING)
enable_testing()
ENDIF()

# add integration tests
add_subdirectory(tests/integration)
IF(EXISTS ${CMAKE_SOURCE_DIR}/tests)
# add integration tests
add_subdirectory(${CMAKE_SOURCE_DIR}/tests/integration)


# add unit tests
IF (NOT TRAVIS_DISABLE_UNIT_TESTS)
add_subdirectory(tests/unit)
# add unit tests
IF (NOT TRAVIS_DISABLE_UNIT_TESTS)
add_subdirectory(${CMAKE_SOURCE_DIR}/tests/unit)
ENDIF()
ENDIF()
ENDIF()

Expand All @@ -973,10 +1005,14 @@ SET(CONFIGURE_OPTIONS "TODO")
SET(COMPFLAGS_CPP "${MERGED_CXX_FLAGS}")
SET(LINKFLAGS "${POSTLINKFLAGS}")

add_subdirectory(src/shogun)
IF(EXISTS ${CMAKE_SOURCE_DIR}/src/shogun)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/shogun)
ENDIF()

IF(BUILD_EXAMPLES OR ENABLE_TESTING)
add_subdirectory(examples)
IF(EXISTS ${CMAKE_SOURCE_DIR}/examples)
IF(BUILD_EXAMPLES OR ENABLE_TESTING)
add_subdirectory(${CMAKE_SOURCE_DIR}/examples)
ENDIF()
ENDIF()

# general cpack settings
Expand Down
20 changes: 20 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2014-02-17 Soeren Sonnenburg <sonne@debian.org>

* SHOGUN Release version 3.2.0 (libshogun 16.0, data 0.8, parameter 1)
* This release also contains several cleanups and bugfixes:
* Features:
- Fully support python3 now
- Add mini-batch k-means [Parijat Mazumdar]
- Add k-means++ [Parijat Mazumdar]
- Add sub-sequence string kernel [lambday]
* Bugfixes:
- Compile fixes for upcoming swig3.0
- Speedup for gaussian process' apply()
- Improve unit / integration test checks
- libbmrm uninitialized memory reads
- libocas uninitialized memory reads
- Octave 3.8 compile fixes [Orion Poplawski]
- Fix java modular compile error [Bjoern Esser]
* Cleanup and API Changes:
- None

2014-01-06 Soeren Sonnenburg <sonne@debian.org>

* SHOGUN Release version 3.1.1 (libshogun 15.1, data 0.7, parameter 1)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
Develop branch build status:

[![Build Status](https://travis-ci.org/shogun-toolbox/shogun.png?branch=develop)](https://travis-ci.org/shogun-toolbox/shogun)
[![Coverage Status](https://coveralls.io/repos/shogun-toolbox/shogun/badge.png?branch=develop)](https://coveralls.io/r/shogun-toolbox/shogun?branch=develop)

Buildbot: http://buildbot.shogun-toolbox.org/waterfall.

Quick links to this file:

* [Quickstart](doc/md/QUICKSTART.md)
* [Introduction](#introduction)
* [Interfaces](#interfaces)
* [Platforms](#platforms)
Expand Down
4 changes: 2 additions & 2 deletions cmake/CommonModularInterface.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MACRO(GENERATE_MODULAR_TARGET MODULAR_NAME MODULAR_DIR MODULAR_LIBARIES)
if(SYSTEM_INCLUDES)
INCLUDE_DIRECTORIES(SYSTEM ${SYSTEM_INCLUDES})
endif()
INCLUDE_DIRECTORIES(${INCLUDES} ${CMAKE_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${INCLUDES})

# transform defines to -D<definition> string
foreach(D IN LISTS DEFINES)
Expand Down Expand Up @@ -78,4 +78,4 @@ ELSE()
#TODO add scrubing
ENDIF()

ENDMACRO()
ENDMACRO()
14 changes: 8 additions & 6 deletions cmake/FindOctave.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,16 @@ find_library( OCTAVE_OCTAVE_LIBRARY
NAMES octave liboctave
HINTS ${OCTAVE_LIBRARIES_PATHS}
)
find_library( OCTAVE_CRUFT_LIBRARY
NAMES cruft libcruft
HINTS ${OCTAVE_LIBRARIES_PATHS}
)

set ( OCTAVE_LIBRARIES ${OCTAVE_OCTINTERP_LIBRARY} )
list ( APPEND OCTAVE_LIBRARIES ${OCTAVE_OCTAVE_LIBRARY} )
list ( APPEND OCTAVE_LIBRARIES ${OCTAVE_CRUFT_LIBRARY} )

if ( ${OCTAVE_VERSION_STRING} LESS 3.8.0 )
find_library( OCTAVE_CRUFT_LIBRARY
NAMES cruft libcruft
HINTS ${OCTAVE_LIBRARIES_PATHS}
)
list ( APPEND OCTAVE_LIBRARIES ${OCTAVE_CRUFT_LIBRARY} )
endif ()

find_path ( OCTAVE_INCLUDE_DIR
NAMES mex.h
Expand Down
3 changes: 2 additions & 1 deletion cmake/checkgdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ if (RESULT)
# --args ${EXECUTABLE} ${FILE} ${ARGS}
# RESULT_VARIABLE GDB_RESULT)
#endif()
endif()
MESSAGE( FATAL_ERROR "FAIL: ${ARGS}, EXITCODE: ${RESULT}" )
endif (RESULT)
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ELSEIF(EXISTS "${ROOT_DIR}/NEWS")
SET(VERSION_SUB "0${VERSION_SUB}")
ENDIF()
SET(REVISION ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_SUB})
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import os.path,time;print time.strftime('%Y-%m-%d %H:%M', time.gmtime(os.path.getmtime('${ROOT_DIR}/NEWS')))"
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import os.path,time;print (time.strftime('%Y-%m-%d %H:%M', time.gmtime(os.path.getmtime('${ROOT_DIR}/NEWS'))))"
OUTPUT_VARIABLE DATEINFO
OUTPUT_STRIP_TRAILING_WHITESPACE
)
Expand Down
2 changes: 1 addition & 1 deletion data
Submodule data updated 747 files
Loading

0 comments on commit 053a248

Please sign in to comment.