From be2718e50835ad5802980ddb2137024b35221ba6 Mon Sep 17 00:00:00 2001 From: headmyshoulder Date: Mon, 6 Apr 2015 21:07:56 +0200 Subject: [PATCH 01/30] Update README --- README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README b/README index f34601f5..735afd52 100644 --- a/README +++ b/README @@ -1 +1,3 @@ +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/headmyshoulder/odeint-v2/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + odeint is a highly flexible library for solving ordinary differential equations. From e11cb53ee083338cbd6f864bc102d7cdf17fc706 Mon Sep 17 00:00:00 2001 From: headmyshoulder Date: Mon, 6 Apr 2015 21:08:33 +0200 Subject: [PATCH 02/30] Rename README to README.md --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 307aff4f5e5c89651264f56d7341c60294c45d6c Mon Sep 17 00:00:00 2001 From: David Seery Date: Sun, 19 Apr 2015 09:21:45 +0100 Subject: [PATCH 03/30] Switch -1 for -- in integrate_times() to allow use with bidirectional iterators --- .../boost/numeric/odeint/integrate/detail/integrate_times.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp b/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp index ac9b75d8..0ed9c4c3 100644 --- a/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp +++ b/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp @@ -130,7 +130,9 @@ size_t integrate_times( if( start_time == end_time ) return 0; - Time last_time_point = static_cast(*(end_time-1)); + auto last_time_iterator = end_time; + --last_time_iterator; + Time last_time_point = static_cast(*last_time_iterator); st.initialize( start_state , *start_time , dt ); obs( start_state , *start_time++ ); From d7d2dd57433975adfdfe9ebd1d92db4b7f123f49 Mon Sep 17 00:00:00 2001 From: David Seery Date: Sun, 19 Apr 2015 12:51:54 +0100 Subject: [PATCH 04/30] Fix formatting --- .../boost/numeric/odeint/integrate/detail/integrate_times.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp b/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp index 0ed9c4c3..d5446ba5 100644 --- a/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp +++ b/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp @@ -130,8 +130,8 @@ size_t integrate_times( if( start_time == end_time ) return 0; - auto last_time_iterator = end_time; - --last_time_iterator; + TimeIterator last_time_iterator = end_time; + --last_time_iterator; Time last_time_point = static_cast(*last_time_iterator); st.initialize( start_state , *start_time , dt ); From 25febac10ba936b20e4697d90c7c1c672bb57d76 Mon Sep 17 00:00:00 2001 From: Arash Date: Wed, 22 Apr 2015 14:32:01 +1000 Subject: [PATCH 05/30] Update integrate_adaptive.hpp This assignment inside the while loop is redundant. --- .../numeric/odeint/integrate/detail/integrate_adaptive.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/odeint/integrate/detail/integrate_adaptive.hpp b/include/boost/numeric/odeint/integrate/detail/integrate_adaptive.hpp index 15338ecd..743e5770 100644 --- a/include/boost/numeric/odeint/integrate/detail/integrate_adaptive.hpp +++ b/include/boost/numeric/odeint/integrate/detail/integrate_adaptive.hpp @@ -98,7 +98,7 @@ size_t integrate_adaptive( } size_t trials = 0; - controlled_step_result res = success; + controlled_step_result res; do { res = st.try_step( system , start_state , start_time , dt ); From 3625ae1ef103ed169c7f27ddb9b1abc218fed8b4 Mon Sep 17 00:00:00 2001 From: David Seery Date: Wed, 22 Apr 2015 11:57:17 +0100 Subject: [PATCH 06/30] Adjust allocation of bulirsch_stoer_dense_out::m_diffs to avoid segmentation fault --- .../numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp index 0036d1d2..3018524e 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp @@ -109,7 +109,7 @@ public: m_table( m_k_max ) , m_mp_states( m_k_max+1 ) , m_derivs( m_k_max+1 ) , - m_diffs( 2*m_k_max+1 ) , + m_diffs( 2*m_k_max+2 ) , STEPFAC1( 0.65 ) , STEPFAC2( 0.94 ) , STEPFAC3( 0.02 ) , STEPFAC4( 4.0 ) , KFAC1( 0.8 ) , KFAC2( 0.9 ) { BOOST_USING_STD_MIN(); @@ -139,7 +139,7 @@ public: */ } int num = 1; - for( int i = 2*(m_k_max) ; i >=0 ; i-- ) + for( int i = 2*(m_k_max)+1 ; i >=0 ; i-- ) { m_diffs[i].resize( num ); num += (i+1)%2; @@ -587,7 +587,7 @@ private: for( size_t i = 0 ; i < m_k_max+1 ; ++i ) for( size_t j = 0 ; j < m_derivs[i].size() ; ++j ) resized |= adjust_size_by_resizeability( m_derivs[i][j] , x , typename is_resizeable::type() ); - for( size_t i = 0 ; i < 2*m_k_max+1 ; ++i ) + for( size_t i = 0 ; i < 2*m_k_max+2 ; ++i ) for( size_t j = 0 ; j < m_diffs[i].size() ; ++j ) resized |= adjust_size_by_resizeability( m_diffs[i][j] , x , typename is_resizeable::type() ); From 127e0dc21243b946930fb680c97cdee22e0eb00e Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Tue, 5 May 2015 12:52:06 +0200 Subject: [PATCH 07/30] added Makefile to gmpxx example --- examples/gmpxx/Makefile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 examples/gmpxx/Makefile diff --git a/examples/gmpxx/Makefile b/examples/gmpxx/Makefile new file mode 100644 index 00000000..0a9f7cb0 --- /dev/null +++ b/examples/gmpxx/Makefile @@ -0,0 +1,5 @@ +CXXFLAGS = -I${BOOST_ROOT} -O2 -static +LDFLAGS = -lgmpxx -lgmp + +lorenz_gmpxx: lorenz_gmpxx.cpp + ${CXX} ${CXXFLAGS} lorenz_gmpxx.cpp ${LDFLAGS} -o lorenz_gmpxx From 3b110f689bdf2848a57fa6f23a1a06f352e1ec41 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Wed, 20 May 2015 12:26:25 +0200 Subject: [PATCH 08/30] fixes #164 fixed typo in the mpi tutorial that included code from the wrong source file --- doc/tutorial_parallel.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorial_parallel.qbk b/doc/tutorial_parallel.qbk index 38376f9b..92f401c5 100644 --- a/doc/tutorial_parallel.qbk +++ b/doc/tutorial_parallel.qbk @@ -134,7 +134,7 @@ Depending on the MPI implementation the code might need to be compiled with i.e. Instead of reading another thread's data, we asynchronously send and receive the relevant data from neighbouring nodes, performing some computation in the interim to hide the latency. -[phase_chain_rhs] +[phase_chain_mpi_rhs] Analogous to `openmp_state` we use `mpi_state< InnerState >`, which automatically selects `mpi_nested_algebra` and the appropriate MPI-oblivious From 84bd94c2855b301ed5ce0a3aa7631f778a63c685 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Thu, 21 May 2015 12:22:04 +0200 Subject: [PATCH 09/30] fixes #165 removed adams-moutlon from the stepper table as it is not an independent algorithm, but only does the correction step in adams-bashforth-moulton. --- doc/stepper_table.qbk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/stepper_table.qbk b/doc/stepper_table.qbk index a50cdd8e..86e10180 100644 --- a/doc/stepper_table.qbk +++ b/doc/stepper_table.qbk @@ -1,8 +1,8 @@ [/============================================================================ Boost.odeint - Copyright 2011-2012 Karsten Ahnert - Copyright 2011-2012 Mario Mulansky + Copyright 2011-2015 Karsten Ahnert + Copyright 2011-2015 Mario Mulansky Copyright 2012 Sylwester Arabas Use, modification and distribution is subject to the Boost Software License, @@ -21,7 +21,8 @@ [[Fehlberg 78] [`runge_kutta_fehlberg78`] [__error_stepper] [__system] [8] [Yes (7)] [No] [No] [Good high order method with error estimation, to be used in controlled_error_stepper.]] [[Adams Bashforth] [`adams_bashforth`] [__stepper] [__system] [configurable] [No] [No] [Yes] [Multistep method]] - [[Adams Moulton] [`adams_moulton`] [__stepper] [__system] [configurable] [No] [No] [Yes] [Multistep method]] +[/ # removed as it is not an independent algorithm. + [[Adams Moulton] [`adams_moulton`] [__stepper] [__system] [configurable] [No] [No] [Yes] [Multistep method]] \] [[Adams Bashforth Moulton] [`adams_bashforth_moulton`] [__stepper] [__system] [configurable] [No] [No] [Yes] [Combined multistep method]] [[Controlled Runge-Kutta] [`controlled_runge_kutta`] [__controlled_stepper] [__system] [depends] [Yes] [No] [depends] [Error control for __error_stepper. Requires an __error_stepper from above. Order depends on the given ErrorStepper]] From e7f25c0a3b27bee99fc3bda7f6b6a8c8426a6e85 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Sun, 14 Jun 2015 16:12:00 +0200 Subject: [PATCH 10/30] moved openmp.jam into openmp examples folder --- openmp.jam => examples/openmp/openmp.jam | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename openmp.jam => examples/openmp/openmp.jam (100%) diff --git a/openmp.jam b/examples/openmp/openmp.jam similarity index 100% rename from openmp.jam rename to examples/openmp/openmp.jam From 45fd4331c2bd55ed280b40fc6f4e47e6930cea9a Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Sun, 14 Jun 2015 16:23:54 +0200 Subject: [PATCH 11/30] fix #166 use correct iterator (const) in norm_inf of openmp_range_algebra. --- examples/openmp/lorenz_ensemble_simple.cpp | 24 ++++++++++--------- .../external/openmp/openmp_range_algebra.hpp | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/examples/openmp/lorenz_ensemble_simple.cpp b/examples/openmp/lorenz_ensemble_simple.cpp index a145c815..fbaf2499 100644 --- a/examples/openmp/lorenz_ensemble_simple.cpp +++ b/examples/openmp/lorenz_ensemble_simple.cpp @@ -57,19 +57,21 @@ int main() { state_type X(n, point_type(10, 10, 10)); - typedef runge_kutta4< - state_type, double, - state_type, double, - openmp_range_algebra - > stepper; - const double t_max = 10.0, dt = 0.01; - integrate_const( - stepper(), - sys_func(R), X, - 0.0, t_max, dt - ); + // Simple stepper with constant step size + // typedef runge_kutta4 stepper; + + // integrate_const(stepper(), sys_func(R), X, 0.0, t_max, dt); + + // Controlled stepper with variable step size + typedef runge_kutta_fehlberg78 error_stepper_type; + typedef controlled_runge_kutta controlled_stepper_type; + controlled_stepper_type controlled_stepper; + + integrate_adaptive(controlled_stepper, sys_func(R), X, 0.0, t_max, dt); copy( X.begin(), X.end(), ostream_iterator(cout, "\n") ); diff --git a/include/boost/numeric/odeint/external/openmp/openmp_range_algebra.hpp b/include/boost/numeric/odeint/external/openmp/openmp_range_algebra.hpp index f5668e4d..295db647 100644 --- a/include/boost/numeric/odeint/external/openmp/openmp_range_algebra.hpp +++ b/include/boost/numeric/odeint/external/openmp/openmp_range_algebra.hpp @@ -259,7 +259,7 @@ BOOST_ODEINT_GEN_FOR_EACH(BOOST_ODEINT_GEN_BODY) typedef typename norm_result_type< S >::type result_type; result_type init = static_cast< result_type >( 0 ); const size_t len = boost::size(s); - typename boost::range_iterator::type beg = boost::begin(s); + typename boost::range_iterator::type beg = boost::begin(s); # pragma omp parallel for reduction(max: init) schedule(dynamic) for( size_t i = 0 ; i < len ; ++i ) init = max( init , abs( beg[i] ) ); From ff755ff96e47b7cd35df88b84fc1ccf56aed3248 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 15:27:44 +0200 Subject: [PATCH 12/30] fixes #168 fixed bug in less_eq_with_sign. equality was not correctly checked for, which resulted in wrong behavior when the numeric type had std::numeric_limits::epsilon() == 0. --- .../odeint/util/detail/less_with_sign.hpp | 4 +- test/regression/Jamfile.v2 | 1 + test/regression/regression_168.cpp | 90 +++++++++++++++++++ 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 test/regression/regression_168.cpp diff --git a/include/boost/numeric/odeint/util/detail/less_with_sign.hpp b/include/boost/numeric/odeint/util/detail/less_with_sign.hpp index 8a7fda27..d90e12f7 100644 --- a/include/boost/numeric/odeint/util/detail/less_with_sign.hpp +++ b/include/boost/numeric/odeint/util/detail/less_with_sign.hpp @@ -47,9 +47,9 @@ template< typename T > bool less_eq_with_sign( T t1 , T t2 , T dt ) { if( get_unit_value(dt) > 0 ) - return t1-t2 < std::numeric_limits::epsilon(); + return t1-t2 <= std::numeric_limits::epsilon(); else - return t2-t1 < std::numeric_limits::epsilon(); + return t2-t1 <= std::numeric_limits::epsilon(); } template< typename T > diff --git a/test/regression/Jamfile.v2 b/test/regression/Jamfile.v2 index e44b5354..25bbf0c1 100644 --- a/test/regression/Jamfile.v2 +++ b/test/regression/Jamfile.v2 @@ -25,5 +25,6 @@ test-suite "odeint" : [ run regression_147.cpp ] [ compile regression_149.cpp : -std=c++0x ] + [ run regression_168.cpp ] : valgrind ; diff --git a/test/regression/regression_168.cpp b/test/regression/regression_168.cpp new file mode 100644 index 00000000..8349261a --- /dev/null +++ b/test/regression/regression_168.cpp @@ -0,0 +1,90 @@ +/* + + [begin_description] + Test case for issue 149: + Error C2582 with msvc-10 when using iterator-based integration + [end_description] + + Copyright 2011-2015 Karsten Ahnert + Copyright 2011-2015 Mario Mulansky + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or + copy at http://www.boost.org/LICENSE_1_0.txt) + */ + + +// disable checked iterator warning for msvc + +#include +#ifdef BOOST_MSVC + #pragma warning(disable:4996) +#endif + +#define BOOST_TEST_MODULE odeint_regression_147 + +#include +#include + +#include + +#include + +#include +#include + +#include +#include +#include + + +#include +#include +#include +#include +#include + +#include + + +using namespace boost::unit_test; +using namespace boost::numeric::odeint; +namespace mpl = boost::mpl; + +namespace fusion = boost::fusion; +namespace units = boost::units; +namespace si = boost::units::si; + +typedef units::quantity< si::time , double > time_type; +typedef units::quantity< si::length , double > length_type; +typedef units::quantity< si::velocity , double > velocity_type; +typedef units::quantity< si::acceleration , double > acceleration_type; +typedef units::quantity< si::frequency , double > frequency_type; + +typedef fusion::vector< length_type , velocity_type > state_type; +typedef fusion::vector< velocity_type , acceleration_type > deriv_type; + + +struct oscillator +{ + frequency_type m_omega; + + oscillator( const frequency_type &omega = 1.0 * si::hertz ) : m_omega( omega ) { } + + void operator()( const state_type &x , deriv_type &dxdt , time_type t ) const + { + fusion::at_c< 0 >( dxdt ) = fusion::at_c< 1 >( x ); + fusion::at_c< 1 >( dxdt ) = - m_omega * m_omega * fusion::at_c< 0 >( x ); + } +}; + + +BOOST_AUTO_TEST_CASE( regression_168 ) +{ + typedef runge_kutta_dopri5< state_type , double , deriv_type , time_type > stepper_type; + + state_type x( 1.0 * si::meter , 0.0 * si::meter_per_second ); + + integrate_const( make_dense_output( 1.0e-6 , 1.0e-6 , stepper_type() ) , oscillator( 2.0 * si::hertz ) , + x , 0.0 * si::second , 100.0 * si::second , 0.1 * si::second); +} \ No newline at end of file From 0fb8afce2d3f0a12c1dcc26803c225a9406bdd66 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 16:55:03 +0200 Subject: [PATCH 13/30] updated travis to use boost 1.58 --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 59e5470f..42ed66d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,11 +17,12 @@ matrix: compiler: gcc before_install: - - wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download -O /tmp/boost.tar.bz2 +# http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download + - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2/download -O /tmp/boost.tar.bz2 - tar jxf /tmp/boost.tar.bz2 - - mv boost_1_55_0 $PWD/boost-trunk -# patch the boost build system - - patch $PWD/boost-trunk/tools/build/v2/build/toolset.jam toolset.jam.patch + - mv boost_1_58_0 $PWD/boost-trunk +# patch the boost build system - not neccessary with 1.58 anymore +# - patch $PWD/boost-trunk/tools/build/v2/build/toolset.jam toolset.jam.patch - export BOOST_ROOT="$PWD/boost-trunk" - cd $BOOST_ROOT From 303c3ca962a7a16bd5b3ca0d70673d322b45d463 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 17:01:29 +0200 Subject: [PATCH 14/30] correct sourceforge url --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 42ed66d5..f121e980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ matrix: before_install: # http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download - - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2/download -O /tmp/boost.tar.bz2 + - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2?r=&ts=1435589970&use_mirror=garr -O /tmp/boost.tar.bz2 - tar jxf /tmp/boost.tar.bz2 - mv boost_1_58_0 $PWD/boost-trunk # patch the boost build system - not neccessary with 1.58 anymore From 8f96d67026dd68cca37a92e62aa4e6af756e7790 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 17:26:44 +0200 Subject: [PATCH 15/30] escaping in sourceforge url --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f121e980..9ad180a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ matrix: before_install: # http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download - - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2?r=&ts=1435589970&use_mirror=garr -O /tmp/boost.tar.bz2 + - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2\?r\=\&ts\=1435589970\&use_mirror\=garr -O /tmp/boost.tar.bz2 - tar jxf /tmp/boost.tar.bz2 - mv boost_1_58_0 $PWD/boost-trunk # patch the boost build system - not neccessary with 1.58 anymore From e4119ee1a3b1d1d35ac9f1b1b677fa6a7051595c Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 18:31:11 +0200 Subject: [PATCH 16/30] more travis troubleshooting --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ad180a3..c271cf40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ compiler: - clang env: - - CXXSTD='' - - CXXSTD='cxxflags="-std=c++0x"' + - CXXSTD='-std=c++03' + - CXXSTD='-std=c++0x' # For now disable gcc on osx as g++4.8 is not yet available matrix: @@ -30,9 +30,12 @@ before_install: - cd $TRAVIS_BUILD_DIR - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "gcc" ]; then export CC=gcc-4.8; fi - $CC --version + + - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi + - if [ "$CXX" = "clang++"]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: - - $BOOST_ROOT/b2 toolset=$CC $CXXSTD + - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $DEFINE # build in c++11 mode only with gcc # - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi From cba13f31bcef52a3d31d07fd9fb4952684614bec Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 18:59:22 +0200 Subject: [PATCH 17/30] use boost 1.57 --- .travis.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c271cf40..0bda8434 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,9 @@ matrix: compiler: gcc before_install: -# http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download - - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2\?r\=\&ts\=1435589970\&use_mirror\=garr -O /tmp/boost.tar.bz2 +# 1.55: http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download +# 1.58: http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2\?r\=\&ts\=1435589970\&use_mirror\=garr + - wget http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download -O /tmp/boost.tar.bz2 - tar jxf /tmp/boost.tar.bz2 - mv boost_1_58_0 $PWD/boost-trunk # patch the boost build system - not neccessary with 1.58 anymore @@ -31,11 +32,12 @@ before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "gcc" ]; then export CC=gcc-4.8; fi - $CC --version - - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi - - if [ "$CXX" = "clang++"]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi +# - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi +# - if [ "$CXX" = "clang++"]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: - - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $DEFINE + - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" +# - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $DEFINE # build in c++11 mode only with gcc # - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi From 214ff01789fa4f97f30b20044ae48be7916c4a30 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 19:06:52 +0200 Subject: [PATCH 18/30] use correct file name --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0bda8434..7da5d1e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_install: # 1.58: http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2\?r\=\&ts\=1435589970\&use_mirror\=garr - wget http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download -O /tmp/boost.tar.bz2 - tar jxf /tmp/boost.tar.bz2 - - mv boost_1_58_0 $PWD/boost-trunk + - mv boost_1_57_0 $PWD/boost-trunk # patch the boost build system - not neccessary with 1.58 anymore # - patch $PWD/boost-trunk/tools/build/v2/build/toolset.jam toolset.jam.patch - export BOOST_ROOT="$PWD/boost-trunk" From 1d473373cde1d6ad0aa90c58b4f95916fdd726e8 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 19:47:51 +0200 Subject: [PATCH 19/30] further travis bugfixing --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7da5d1e5..94a92c24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,12 +32,12 @@ before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "gcc" ]; then export CC=gcc-4.8; fi - $CC --version -# - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi -# - if [ "$CXX" = "clang++"]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi +- if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi +- if [ "$CXX" = "clang++"]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; export STDLIB='-stdlib=libc++'; fi script: - - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" -# - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $DEFINE +# - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" + - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $STDLIB $DEFINE # build in c++11 mode only with gcc # - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi From 4c2e8769b4da7ee7f7037a46d4c694ece4fdf4bc Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 20:02:42 +0200 Subject: [PATCH 20/30] fix travis indent --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94a92c24..82e6a982 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,12 +32,12 @@ before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "gcc" ]; then export CC=gcc-4.8; fi - $CC --version -- if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi -- if [ "$CXX" = "clang++"]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; export STDLIB='-stdlib=libc++'; fi + - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi + - if [ "$CXX" = "clang++" ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi + - if [ "$CXX" = "clang++" ]; then export STDLIB='-stdlib=libc++'; fi script: # - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $STDLIB $DEFINE # build in c++11 mode only with gcc -# - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi - +# - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi \ No newline at end of file From a10e3254d928f102d423e9b78b21ab37860b4bfd Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 20:50:57 +0200 Subject: [PATCH 21/30] further refinement --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82e6a982..3921abad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ compiler: - clang env: - - CXXSTD='-std=c++03' + - CXXSTD='-std=c++98' - CXXSTD='-std=c++0x' # For now disable gcc on osx as g++4.8 is not yet available @@ -33,8 +33,8 @@ before_install: - $CC --version - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi - - if [ "$CXX" = "clang++" ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi - if [ "$CXX" = "clang++" ]; then export STDLIB='-stdlib=libc++'; fi + - if [ "$CXX" = "clang++" ] && [ CXXSTD = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: # - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" From 5fadc5cdb00a4a91385f8098726f15b9dee37db6 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 21:08:59 +0200 Subject: [PATCH 22/30] don't explicitely specify c++98 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3921abad..b45fb45d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ compiler: - clang env: - - CXXSTD='-std=c++98' + - CXXSTD='' - CXXSTD='-std=c++0x' # For now disable gcc on osx as g++4.8 is not yet available From 3a0747f139ac0c39e5078ce1451a231c30cffdc1 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 21:38:40 +0200 Subject: [PATCH 23/30] fix if condition --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b45fb45d..5a79add9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ before_install: - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi - if [ "$CXX" = "clang++" ]; then export STDLIB='-stdlib=libc++'; fi - - if [ "$CXX" = "clang++" ] && [ CXXSTD = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi + - if [ "$CXX" = "clang++" ] && [ "$CXXSTD" = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: # - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" From 169e91343dc503eafd11215253c4b9fba2e11a98 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 22:19:59 +0200 Subject: [PATCH 24/30] check variables --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5a79add9..9382bf7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,9 @@ before_install: - if [ "$CXX" = "clang++" ] && [ "$CXXSTD" = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: + - echo $COMPAREFLAG + - echo $STDLIB + - echo $DEFINE # - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $STDLIB $DEFINE # build in c++11 mode only with gcc From d912031682644e3a28048d224268123e968d2df2 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 22:52:00 +0200 Subject: [PATCH 25/30] debug --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9382bf7f..43c4a36a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,8 @@ script: - echo $COMPAREFLAG - echo $STDLIB - echo $DEFINE + - echo $CXXSTD # - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" - - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $STDLIB $DEFINE + - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $DEFINE $STDLIB -d+2 # build in c++11 mode only with gcc # - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi \ No newline at end of file From 2f73239bf1c3719d01a53eeeafd008a521aae695 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 23:17:12 +0200 Subject: [PATCH 26/30] g++4.8 --- .travis.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 43c4a36a..db85d5de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: cpp os: - linux @@ -5,6 +6,16 @@ os: compiler: - gcc - clang +install: +- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + - clang env: - CXXSTD='' @@ -32,16 +43,12 @@ before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "gcc" ]; then export CC=gcc-4.8; fi - $CC --version - - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi - - if [ "$CXX" = "clang++" ]; then export STDLIB='-stdlib=libc++'; fi - - if [ "$CXX" = "clang++" ] && [ "$CXXSTD" = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi +# - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi +# - if [ "$CXX" = "clang++" ]; then export STDLIB='-stdlib=libc++'; fi +# - if [ "$CXX" = "clang++" ] && [ "$CXXSTD" = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: - - echo $COMPAREFLAG - - echo $STDLIB - - echo $DEFINE - - echo $CXXSTD -# - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" - - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG" $DEFINE $STDLIB -d+2 + - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" +# - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG $STDLIB" $DEFINE -d+2 # build in c++11 mode only with gcc # - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi \ No newline at end of file From f224208601ef78b2807a047d24c59979da743a79 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 23:27:47 +0200 Subject: [PATCH 27/30] more travis updates --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index db85d5de..7149f9a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,25 @@ sudo: false language: cpp os: - - linux - - osx + - linux + - osx compiler: - - gcc - - clang + - gcc + - clang install: -- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi addons: apt: sources: - - ubuntu-toolchain-r-test + - ubuntu-toolchain-r-test packages: - - gcc-4.8 - - g++-4.8 - - clang + - gcc-4.8 + - g++-4.8 + - clang env: - - CXXSTD='' - - CXXSTD='-std=c++0x' + - CXXSTD="" + - CXXSTD="cxxflags='-std=c++0x'" # For now disable gcc on osx as g++4.8 is not yet available matrix: @@ -48,7 +48,7 @@ before_install: # - if [ "$CXX" = "clang++" ] && [ "$CXXSTD" = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: - - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD" + - $BOOST_ROOT/b2 toolset=$CC $CXXSTD # - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG $STDLIB" $DEFINE -d+2 # build in c++11 mode only with gcc # - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi \ No newline at end of file From 20d50694025da0b8157e7bf068b29968b9582b7e Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 29 Jun 2015 23:54:35 +0200 Subject: [PATCH 28/30] use g++ 4.8 and boost 1.58 in travis --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7149f9a3..a035a1c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,11 @@ matrix: before_install: # 1.55: http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download +# 1.57: http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download # 1.58: http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2\?r\=\&ts\=1435589970\&use_mirror\=garr - - wget http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download -O /tmp/boost.tar.bz2 + - wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2\?r\=\&ts\=1435589970\&use_mirror\=garr -O /tmp/boost.tar.bz2 - tar jxf /tmp/boost.tar.bz2 - - mv boost_1_57_0 $PWD/boost-trunk + - mv boost_1_58_0 $PWD/boost-trunk # patch the boost build system - not neccessary with 1.58 anymore # - patch $PWD/boost-trunk/tools/build/v2/build/toolset.jam toolset.jam.patch - export BOOST_ROOT="$PWD/boost-trunk" From c9165e121d3aca4b472066e390215c537742856b Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Tue, 30 Jun 2015 00:24:14 +0200 Subject: [PATCH 29/30] cleanup travis --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a035a1c3..8d97c457 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,13 +43,6 @@ before_install: - cd $TRAVIS_BUILD_DIR - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "gcc" ]; then export CC=gcc-4.8; fi - $CC --version - -# - if [ "$CXX" = "g++" ]; then export COMPAREFLAG='-Wno-sign-compare'; fi -# - if [ "$CXX" = "clang++" ]; then export STDLIB='-stdlib=libc++'; fi -# - if [ "$CXX" = "clang++" ] && [ "$CXXSTD" = '-std=c++0x' ]; then export DEFINE='define=BOOST_NO_CXX11_ALLOCATOR'; fi script: - - $BOOST_ROOT/b2 toolset=$CC $CXXSTD -# - $BOOST_ROOT/b2 toolset=$CC cxxflags="$CXXSTD $COMPAREFLAG $STDLIB" $DEFINE -d+2 -# build in c++11 mode only with gcc -# - if [ "$CXX" = "g++" ]; then $BOOST_ROOT/b2 -a toolset=$CC$GCCVER cxxflags="-std=c++0x"; fi \ No newline at end of file + - $BOOST_ROOT/b2 toolset=$CC $CXXSTD \ No newline at end of file From b4f52468e078c1d1dfb16933e0960e46b5976bbb Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Thu, 9 Jul 2015 11:54:58 +0200 Subject: [PATCH 30/30] removed non-existing file from Jamfile see https://github.com/boostorg/odeint/pull/2 --- test_external/mtl4/Jamfile.v2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_external/mtl4/Jamfile.v2 b/test_external/mtl4/Jamfile.v2 index 3a8481ab..de9d87f2 100644 --- a/test_external/mtl4/Jamfile.v2 +++ b/test_external/mtl4/Jamfile.v2 @@ -7,10 +7,11 @@ import testing ; import boost ; -boost.use-project ; +# boost.use-project ; +use-project boost : $(BOOST_ROOT) ; # set your MTL4 directory here -MTL4_INCLUDE = /home/mario/MTL4 ; +MTL4_INCLUDE = /home/mario/MTL4/usr/include ; project : requirements @@ -25,6 +26,5 @@ project test-suite "odeint-mtl4" : [ run mtl4_resize.cpp ] - [ run lorenz.cpp ] : valgrind ;