******************************************************************************** conan test conan-center-index/recipes/bs-thread-pool/all/test_package/conanfile.py bs-thread-pool/2.0.0@#543241ddc1b269423cc155b8d0ec6493 -pr /Users/jenkins/w/prod/BuildSingleReference/45619/43b960b2-011f-4779-9f6d-6f9569a028ee/profile_osx_110_libcpp_apple-clang_release_64..txt ******************************************************************************** Auto detecting your dev setup to initialize the default profile (/Users/jenkins/w/prod/BuildSingleReference/.conan/profiles/default) Found apple-clang 11.0 Default settings os=Macos os_build=Macos arch=x86_64 arch_build=x86_64 compiler=apple-clang compiler.version=11.0 compiler.libcxx=libc++ build_type=Release *** You can change them in /Users/jenkins/w/prod/BuildSingleReference/.conan/profiles/default *** *** Or override with -s compiler='other' -s ...s*** Configuration: [settings] arch=x86_64 build_type=Release compiler=apple-clang compiler.libcxx=libc++ compiler.version=11.0 os=Macos [options] [build_requires] [env] bs-thread-pool/2.0.0 (test package): Installing package Requirements bs-thread-pool/2.0.0 from local cache - Cache Packages bs-thread-pool/2.0.0:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download Installing (downloading, building) binaries... bs-thread-pool/2.0.0: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'c3i_PR-11296' Downloading conanmanifest.txt Downloading conaninfo.txt Downloading conan_package.tgz bs-thread-pool/2.0.0: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 bs-thread-pool/2.0.0: Downloaded package revision d902cfc7cf2ec8febc7d63a7710d5bb1 bs-thread-pool/2.0.0 (test package): Generator cmake_find_package_multi created bs-thread-pool-config-version.cmake bs-thread-pool/2.0.0 (test package): Generator cmake_find_package_multi created bs-thread-pool-config.cmake bs-thread-pool/2.0.0 (test package): Generator cmake_find_package_multi created bs-thread-poolTargets.cmake bs-thread-pool/2.0.0 (test package): Generator cmake_find_package_multi created bs-thread-poolTarget-release.cmake bs-thread-pool/2.0.0 (test package): Generator cmake created conanbuildinfo.cmake bs-thread-pool/2.0.0 (test package): Generator txt created conanbuildinfo.txt bs-thread-pool/2.0.0 (test package): Aggregating env generators bs-thread-pool/2.0.0 (test package): Generated conaninfo.txt bs-thread-pool/2.0.0 (test package): Generated graphinfo Using lockfile: '/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a/conan.lock' Using cached profile from lockfile [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] 'fPIC' option not found [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK bs-thread-pool/2.0.0 (test package): Calling build() ----Running------ > cd '/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="11.0" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libc++" -DCMAKE_INSTALL_PREFIX="/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a/package" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_PREFIX_PATH="/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a" -DCMAKE_MODULE_PATH="/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package' ----------------- -- The C compiler identification is AppleClang 11.0.3.11030032 -- The CXX compiler identification is AppleClang 11.0.3.11030032 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: called by CMake conan helper -- Conan: Adjusting output directories -- Conan: Using cmake global configuration -- Conan: Adjusting default RPATHs Conan policies -- Conan: Adjusting language standard -- Conan: C++ stdlib: libc++ -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Configuring done -- Generating done -- Build files have been written to: /Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a ----Running------ > cmake --build '/Users/jenkins/w/prod/BuildSingleReference/conan-center-index/recipes/bs-thread-pool/all/test_package/build/095f106abafbac38da90a8da41990542c1a8967a' '--' '-j4' ----------------- [ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o [100%] Linking CXX executable bin/test_package [100%] Built target test_package bs-thread-pool/2.0.0 (test package): Running test() ----Running------ > DYLD_LIBRARY_PATH="" DYLD_FRAMEWORK_PATH="" bin/test_package ----------------- A C++17 Thread Pool for High-Performance Scientific Computing (c) 2021 Barak Shoshany (baraksh@gmail.com) (http://baraksh.com) GitHub: https://github.com/bshoshany/thread-pool Thread pool library version is v2.0.0 (2021-08-14). Hardware concurrency is 4. Generating log file: thread_pool_test-2022-06-20_11.01.45.log. Important: Please do not run any other applications, especially multithreaded applications, in parallel with this test! ==================================== Checking that the constructor works: ==================================== Checking that the thread pool reports a number of threads equal to the hardware concurrency... -> PASSED! Checking that the manually counted number of unique thread IDs is equal to the reported number of threads... -> PASSED! ============================ Checking that reset() works: ============================ Checking that after reset() the thread pool reports a number of threads equal to half the hardware concurrency... -> PASSED! Checking that after reset() the manually counted number of unique thread IDs is equal to the reported number of threads... -> PASSED! Checking that after a second reset() the thread pool reports a number of threads equal to the hardware concurrency... -> PASSED! Checking that after a second reset() the manually counted number of unique thread IDs is equal to the reported number of threads... -> PASSED! ================================ Checking that push_task() works: ================================ Checking that push_task() works for a function with no arguments or return value... -> PASSED! Checking that push_task() works for a function with one argument and no return value... -> PASSED! Checking that push_task() works for a function with two arguments and no return value... -> PASSED! ============================= Checking that submit() works: ============================= Checking that submit() works for a function with no arguments or return value... -> PASSED! Checking that submit() works for a function with one argument and no return value... -> PASSED! Checking that submit() works for a function with two arguments and no return value... -> PASSED! Checking that submit() works for a function with no arguments and a return value... -> PASSED! Checking that submit() works for a function with one argument and a return value... -> PASSED! Checking that submit() works for a function with two arguments and a return value... -> PASSED! ======================================= Checking that wait_for_tasks() works... ======================================= -> PASSED! ======================================= Checking that parallelize_loop() works: ======================================= Verifying that a loop from -147 to -69 with 1 task modifies all indices... -> PASSED! Verifying that a loop from 344 to 76 with 3 tasks modifies all indices... -> PASSED! Verifying that a loop from 236 to -280 with 3 tasks modifies all indices... -> PASSED! Verifying that a loop from -212 to 386 with 4 tasks modifies all indices... -> PASSED! Verifying that a loop from -62 to -243 with 2 tasks modifies all indices... -> PASSED! Verifying that a loop from -135 to -80 with 4 tasks modifies all indices... -> PASSED! Verifying that a loop from -317 to 235 with 2 tasks modifies all indices... -> PASSED! Verifying that a loop from 212 to -380 with 1 task modifies all indices... -> PASSED! Verifying that a loop from -231 to -271 with 3 tasks modifies all indices... -> PASSED! Verifying that a loop from 330 to 264 with 4 tasks modifies all indices... -> PASSED! ====================================================== Checking that different values of sleep_duration work: ====================================================== Submitting tasks with sleep_duration = 0 microseconds... -> PASSED! Submitting tasks with sleep_duration = 324 microseconds... -> PASSED! Submitting tasks with sleep_duration = 1602 microseconds... -> PASSED! Submitting tasks with sleep_duration = 1379 microseconds... -> PASSED! Submitting tasks with sleep_duration = 514 microseconds... -> PASSED! Submitting tasks with sleep_duration = 1860 microseconds... -> PASSED! Resetting sleep_duration to the default value (1000 microseconds). ==================================== Checking that task monitoring works: ==================================== Resetting pool to 4 threads. Submitting 12 tasks. After submission, should have: 12 tasks total, 4 tasks running, 8 tasks queued... -> PASSED! Task 1 released. Task 2 released. Task 0 released. Task 3 released. After releasing 4 tasks, should have: 8 tasks total, 4 tasks running, 4 tasks queued... -> PASSED! Task 6 released. Task 5 released. Task 4 released. Task 7 released. After releasing 4 more tasks, should have: 4 tasks total, 4 tasks running, 0 tasks queued... -> PASSED! Task 8 released. Task 9 released. Task 10 released. Task 11 released. After releasing the final 4 tasks, should have: 0 tasks total, 0 tasks running, 0 tasks queued... -> PASSED! Resetting pool to 4 threads. ============================ Checking that pausing works: ============================ Resetting pool to 4 threads. Pausing pool. Submitting 12 tasks, each one waiting for 200ms. Immediately after submission, should have: 12 tasks total, 0 tasks running, 12 tasks queued... -> PASSED! 300ms later, should still have: 12 tasks total, 0 tasks running, 12 tasks queued... -> PASSED! Unpausing pool. Task 1 done. Task 3 done. Task 0 done. Task 2 done. 300ms later, should have: 8 tasks total, 4 tasks running, 4 tasks queued... -> PASSED! Pausing pool and using wait_for_tasks() to wait for the running tasks. Task 4 done. Task 5 done. Task 6 done. Task 7 done. After waiting, should have: 4 tasks total, 0 tasks running, 4 tasks queued... -> PASSED! 200ms later, should still have: 4 tasks total, 0 tasks running, 4 tasks queued... -> PASSED! Unpausing pool and using wait_for_tasks() to wait for all tasks. Task 9 done. Task 8 done. Task 10 done. Task 11 done. After waiting, should have: 0 tasks total, 0 tasks running, 0 tasks queued... -> PASSED! Resetting pool to 4 threads. ======================================= Checking that exception handling works: ======================================= -> PASSED! ============================================================ Testing that matrix operations produce the expected results: ============================================================ Using matrices of size 40x40 with a total of 1600 elements. Adding two matrices (single-threaded)... Adding two matrices (multithreaded)... Comparing the results... -> PASSED! Transposing a matrix (single-threaded)... Transposing a matrix (multithreaded)... Comparing the results... -> PASSED! Multiplying two matrices (single-threaded)... Multiplying two matrices (multithreaded)... Comparing the results... -> PASSED! ++++++++++++++++++++++++++++++ SUCCESS: Passed all 46 checks! ++++++++++++++++++++++++++++++ =================================== Performing matrix performance test: =================================== Using 4 out of 4 threads. Determining the optimal sleep duration........................ Result: The optimal sleep duration is 500 microseconds. Adding two 800x800 matrices 20 times: With 1 task, mean execution time was 2.1 ms with standard deviation 0.3 ms. With 1 task, mean execution time was 2.2 ms with standard deviation 0.8 ms. With 2 tasks, mean execution time was 1.8 ms with standard deviation 0.7 ms. With 4 tasks, mean execution time was 2.1 ms with standard deviation 1.2 ms. With 8 tasks, mean execution time was 2.0 ms with standard deviation 0.8 ms. With 16 tasks, mean execution time was 2.1 ms with standard deviation 0.9 ms. Maximum speedup obtained: 1.2x. Transposing one 800x800 matrix 20 times: With 1 task, mean execution time was 3.8 ms with standard deviation 1.3 ms. With 1 task, mean execution time was 3.8 ms with standard deviation 1.0 ms. With 2 tasks, mean execution time was 2.9 ms with standard deviation 1.2 ms. With 4 tasks, mean execution time was 2.9 ms with standard deviation 1.0 ms. With 8 tasks, mean execution time was 3.8 ms with standard deviation 1.2 ms. With 16 tasks, mean execution time was 3.0 ms with standard deviation 0.7 ms. Maximum speedup obtained: 1.3x. Multiplying two 100x100 matrices 20 times: With 1 task, mean execution time was 1.2 ms with standard deviation 0.4 ms. With 1 task, mean execution time was 1.5 ms with standard deviation 0.8 ms. With 2 tasks, mean execution time was 1.2 ms with standard deviation 1.0 ms. With 4 tasks, mean execution time was 1.4 ms with standard deviation 0.7 ms. With 8 tasks, mean execution time was 1.1 ms with standard deviation 0.7 ms. With 16 tasks, mean execution time was 0.8 ms with standard deviation 0.7 ms. Maximum speedup obtained: 1.9x. Generating random 800x800 matrix 20 times: With 1 task, mean execution time was 8.2 ms with standard deviation 0.5 ms. With 1 task, mean execution time was 8.4 ms with standard deviation 0.7 ms. With 2 tasks, mean execution time was 6.0 ms with standard deviation 1.5 ms. With 4 tasks, mean execution time was 3.9 ms with standard deviation 0.8 ms. With 8 tasks, mean execution time was 4.2 ms with standard deviation 0.9 ms. With 16 tasks, mean execution time was 4.5 ms with standard deviation 1.3 ms. Maximum speedup obtained: 2.1x. Overall, multithreading provided speedups of up to 2.1x. +++++++++++++++++++++++++++++++++++++++ Thread pool performance test completed! +++++++++++++++++++++++++++++++++++++++ CMake Warning: Manually-specified variables were not used by the project: CMAKE_EXPORT_NO_PACKAGE_REGISTRY CMAKE_INSTALL_BINDIR CMAKE_INSTALL_DATAROOTDIR CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_LIBEXECDIR CMAKE_INSTALL_OLDINCLUDEDIR CMAKE_INSTALL_SBINDIR