8000 TimeTBB example: no speedup - actually slower by a factor X20 · Issue #92 · borglab/gtsam · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
TimeTBB example: no speedup - actually slower by a factor X20 #92
Open
@izzys

Description

@izzys

Description

When running the example: TimeTBB.cpp, here are the results:

numberOfProblems = 1000000
problemSize = 4
With 1 threads:
Without memory allocation, grain size = 1, time = 0.284984
Without memory allocation, grain size = 10, time = 0.279206
Without memory allocation, grain size = 100, time = 0.256432
Without memory allocation, grain size = 1000, time = 0.253955
With memory allocation, grain size = 1, time = 0.422034
With memory allocation, grain size = 10, time = 0.444783
With memory allocation, grain size = 100, time = 0.437323
With memory allocation, grain size = 1000, time = 0.418359

With 4 threads:
Without memory allocation, grain size = 1, time = 4.46345
Without memory allocation, grain size = 10, time = 4.58412
Without memory allocation, grain size = 100, time = 4.66668
Without memory allocation, grain size = 1000, time = 4.60369
With memory allocation, grain size = 1, time = 5.07619
With memory allocation, grain size = 10, time = 5.38483
With memory allocation, grain size = 100, time = 5.23105
With memory allocation, grain size = 1000, time = 5.28864

With 8 threads:
Without memory allocation, grain size = 1, time = 5.24027
Without memory allocation, grain size = 10, time = 5.25576
Without memory allocation, grain size = 100, time = 5.2626
Without memory allocation, grain size = 1000, time = 5.25358
With memory allocation, grain size = 1, time = 5.95175
With memory allocation, grain size = 10, time = 5.93275
With memory allocation, grain size = 100, time = 5.92773
With memory allocation, grain size = 1000, time = 5.93785

Summary of results:
4 threads, without allocation, grain size = 1, speedup = 0.0638485
4 threads, without allocation, grain size = 10, speedup = 0.0609071
4 threads, without allocation, grain size = 100, speedup = 0.0549497
4 threads, without allocation, grain size = 1000, speedup = 0.0551635
4 threads, with allocation, grain size = 1, speedup = 0.0831399
4 threads, with allocation, grain size = 10, speedup = 0.0825993
4 threads, with allocation, grain size = 100, speedup = 0.0836012
4 threads, with allocation, grain size = 1000, speedup = 0.0791052
8 threads, without allocation, grain size = 1, speedup = 0.0543836
8 threads, without allocation, grain size = 10, speedup = 0.0531238
8 threads, without allocation, grain size = 100, speedup = 0.0487273
8 threads, without allocation, grain size = 1000, speedup = 0.0483396
8 threads, with allocation, grain size = 1, speedup = 0.0709091
8 threads, with allocation, grain size = 10, speedup = 0.0749709
8 threads, with allocation, grain size = 100, speedup = 0.0737758
8 threads, with allocation, grain size = 1000, speedup = 0.0704562

Steps to reproduce

Just run the example.

Expected behavior

i would expect some speedup, and not a slow down...

Environment

Linux 16.04
Intel i7

Here is my CMAKE output:

-- GTSAM_SOURCE_ROOT_DIR: [/home/izzys/samples/gtsam_samples]
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- serialization
-- system
-- filesystem
-- thread
-- program_options
-- date_time
-- timer
-- chrono
-- regex
-- atomic
-- GTSAM_BOOST_LIBRARIES: optimized;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_system.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_thread.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_regex.so;debug;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;debug;/usr/lib/x86_64-linux-gnu/libboost_system.so;debug;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;debug;/usr/lib/x86_64-linux-gnu/libboost_thread.so;debug;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;debug;/usr/lib/x86_64-linux-gnu/libboost_regex.so
Ignoring Boost restriction on optional lvalue assignment from rvalues
-- Found Eigen version: 3.3.7
-- Building 3rdparty
-- checking for thread-local storage - found
-- Could NOT find GeographicLib (missing: GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)
-- Building base
-- Building geometry
-- Building inference
-- Building symbolic
-- Building discrete
-- Building linear
-- Building nonlinear
-- Building sam
-- Building sfm
-- Building slam
-- Building smart
-- Building navigation
-- GTSAM Version: 4.0.0
-- Install prefix: /usr/local
-- Building GTSAM - shared: ON
-- Wrote /home/tc34738/samples/gtsam_samples/gtsam-build/GTSAMConfig.cmake
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- ===============================================================
-- ================ Configuration Options ======================
-- CMAKE_CXX_COMPILER_ID type : GNU
-- CMAKE_CXX_COMPILER_VERSION : 5.4.0
-- CMake version : 3.5.1
-- CMake generator : Unix Makefiles
-- CMake build tool : /usr/bin/make
-- Build flags
-- Build Tests : Enabled
-- Build examples with 'make all' : Enabled
-- Build timing scripts with 'make all': Disabled
-- Build shared GTSAM libraries : Enabled
-- Put build type in library name : Enabled
-- Build libgtsam_unstable : Disabled
-- Build for native architecture : Enabled
-- Build type : Release
-- C compilation flags : -O3 -DNDEBUG
-- C++ compilation flags : -O3 -DNDEBUG
-- GTSAM_COMPILE_FEATURES_PUBLIC :
-- GTSAM_COMPILE_OPTIONS_PRIVATE : -Wall;$<$CONFIG:Debug:-g;-fno-inline>;$<$CONFIG:Release:-O3>;$<$CONFIG:Timing:-g;-O3>;$<$CONFIG:Profiling:-O3>;$<$CONFIG:RelWithDebInfo:-g;-O3>;-Wno-unused-local-typedefs
-- GTSAM_COMPILE_OPTIONS_PUBLIC : $&lt;$&lt;COMPILE_LANGUAGE:CXX>:-std=c++11>;-march=native
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE : $<$CONFIG:Debug:_DEBUG;EIGEN_INITIALIZE_MATRICES_BY_NAN>;$<$CONFIG:Release:NDEBUG>;$<$CONFIG:Timing:NDEBUG;ENABLE_TIMING>;$<$CONFIG:Profiling:NDEBUG>;$<$CONFIG:RelWithDebInfo:NDEBUG>
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC : BOOST_OPTIONAL_ALLOW_BINDING_TO_RVALUES;BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
-- GTSAM_COMPILE_OPTIONS_PRIVATE_DEBUG : -g;-fno-inline
-- GTSAM_COMPILE_OPTIONS_PUBLIC_DEBUG :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_DEBUG : _DEBUG;EIGEN_INITIALIZE_MATRICES_BY_NAN
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_DEBUG :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_RELEASE : -O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_RELEASE :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_RELEASE : NDEBUG
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_RELEASE :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_TIMING : -g;-O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_TIMING :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_TIMING : NDEBUG;ENABLE_TIMING
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_TIMING :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_PROFILING : -O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_PROFILING :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_PROFILING : NDEBUG
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_PROFILING :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_RELWITHDEBINFO : -g;-O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_RELWITHDEBINFO :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_RELWITHDEBINFO : NDEBUG
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_RELWITHDEBINFO :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_MINSIZEREL :
-- GTSAM_COMPILE_OPTIONS_PUBLIC_MINSIZEREL :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_MINSIZEREL :
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_MINSIZEREL :
-- Use System Eigen : OFF (Using version: 3.3.7)
-- Use Intel TBB : Yes
-- Eigen will use MKL : MKL found but GTSAM_WITH_EIGEN_MKL is disabled
-- Eigen will use MKL and OpenMP : OpenMP found but GTSAM_WITH_EIGEN_MKL is disabled
-- Default allocator : TBB
-- Build with ccache : No
-- Packaging flags
-- CPack Source Generator : TGZ
-- CPack Generator : TGZ
-- GTSAM flags
-- Quaternions as default Rot3 : Disabled
-- Runtime consistency checking : Disabled
-- Rot3 retract is full ExpMap : Disabled
-- Pose3 retract is full ExpMap : Disabled
-- Deprecated in GTSAM 4 allowed : Enabled
-- Point3 is typedef to Vector3 : Disabled
-- Metis-based Nested Dissection : Enabled
-- Use tangent-space preintegration: Enabled
-- Build Wrap : Disabled
-- MATLAB toolbox flags
-- Install matlab toolbox : Disabled
-- Cython toolbox flags
-- Install Cython toolbox : Disabled
-- ===============================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/izzys/samples/gtsam_samples/gtsam-build

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0