|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71604 - in sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta: . performance
From: mario.mulansky_at_[hidden]
Date: 2011-04-29 10:27:45
Author: mariomulansky
Date: 2011-04-29 10:27:44 EDT (Fri, 29 Apr 2011)
New Revision: 71604
URL: http://svn.boost.org/trac/boost/changeset/71604
Log:
performance tests for rk54ck - generic is about 40% slower compared to odeint here...
Text files modified:
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_algebra.hpp | 17 +++++++++++++++--
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp | 8 +-------
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/Jamfile | 21 ++++++++++++++++++---
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/results.dat | 12 ++++++++++++
4 files changed, 46 insertions(+), 12 deletions(-)
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_algebra.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_algebra.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_algebra.hpp 2011-04-29 10:27:44 EDT (Fri, 29 Apr 2011)
@@ -27,6 +27,19 @@
}
}
+ template< typename T , size_t dim >
+ inline static void foreach( boost::array< T , dim > &x_tmp ,
+ const boost::array< double , n > &a ,
+ const boost::array< T , dim > *k_vector , const double dt )
+ {
+ for( size_t i=0 ; i<dim ; ++i )
+ {
+ x_tmp[i] = a[0]*dt*k_vector[0][i];
+ for( size_t j = 1 ; j<n ; ++j )
+ x_tmp[i] += a[j]*dt*k_vector[j][i];
+ }
+ }
+
};
@@ -36,7 +49,7 @@
/* !!!!!!! Actually, this is factor 3 slower with intel compiler, so we don'y use it !!!!!
* Update: Current implementation increases performance on msvc 9.0 by about 30%, so it is in use again....
- *
+ */
template<>
struct fusion_algebra< 1 >
@@ -107,6 +120,6 @@
}
};
-*/
+
#endif /* FUSION_ALGEBRA_HPP_ */
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp 2011-04-29 10:27:44 EDT (Fri, 29 Apr 2011)
@@ -34,13 +34,7 @@
template< class T , class Constant >
struct array_wrapper
{
- typedef typename boost::array< T , Constant::value > type;
-};
-
-template< class T , class Constant , class StageCategory >
-struct stage_fusion_wrapper
-{
- typedef typename fusion::vector< size_t , T , boost::array< T , Constant::value > , StageCategory > type;
+ typedef const typename boost::array< T , Constant::value > type;
};
template< class T , size_t i , class StageCategory >
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/Jamfile
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/Jamfile (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/Jamfile 2011-04-29 10:27:44 EDT (Fri, 29 Apr 2011)
@@ -11,6 +11,10 @@
<define>BOOST_ALL_NO_LIB=1
<include>../../../../../..
;
+
+
+lib libgsl : : <name>gsl ;
+lib libgslcblas : : <name>gslcblas ;
exe generic_rk4
: generic_rk4.cpp
@@ -27,10 +31,21 @@
exe rt_generic_rk4
: rt_generic_rk4.cpp
;
-
-lib libgsl : : <name>gsl ;
-lib libgslcblas : : <name>gslcblas ;
+
exe gsl_rk4
: gsl_rk4.cpp libgsl libgslcblas
+ ;
+
+
+exe generic_rk54ck
+ : generic_rk54ck.cpp
+ ;
+
+exe odeint_rk54ck
+ : odeint_rk54ck.cpp
+ ;
+
+exe gsl_rk54ck
+ : gsl_rk54ck.cpp libgsl libgslcblas
;
\ No newline at end of file
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/results.dat
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/results.dat (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/results.dat 2011-04-29 10:27:44 EDT (Fri, 29 Apr 2011)
@@ -8,3 +8,15 @@
icc 11.1 | 1.11 | 0.98 | 1.19 | 1.28 | 1.99 | Xeon X5650 @ 2.67 GHz
gcc 4.4.1 | 1.19 | 1.22 | 1.24 | 1.97 | | Core2Quad Q6600 @ 2.40GHz
msvc 9.0 | 5.84 | 6.30 | 5.55 | ---- | 12.7 | Via Nano @ 1.60 GHz
+
+
+Results for Runge-Kutta 54 Cash Karp
+
+ | odeint | generic | nr | gsl |
+-------------------------------------------------------------
+gcc 4.5.0 | 0.84 | 1.34 | | 1.88 | Corei7 870 @ 2.93 GHz
+gcc 4.3.2 | 1.35 | 1.76 | | 2.80 | Core2Quad Q9550 @ 2.83 GHz
+icc 12.0.2 | 1.49 | 2.11 | | 1.91 | Corei7 870 @ 2.93 GHz
+icc 11.1 | 1.90 | 2.44 | | 2.16 | Xeon X5650 @ 2.67 GHz
+gcc 4.4.1 | | | | | Core2Quad Q6600 @ 2.40GHz
+msvc 9.0 | | | | ---- | Via Nano @ 1.60 GHz
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk