Boost logo

Boost :

Subject: Re: [boost] [sort] Parallel sorting sub-library mini-review starts tomorrow, 11 November
From: Marc Glisse (marc.glisse_at_[hidden])
Date: 2016-11-11 10:13:46


On Fri, 11 Nov 2016, Steven Ross wrote:

> Dear Boost community,
>
> The mini-review of Francisco Tapia's Parallel sorting library begins
> tomorrow November 11, and ends November 20th. The purpose of this review
> is to assess whether the sub-library is useful and up to Boost software
> standards. If the Boost community agrees on both, Francisco and I will
> integrate it into the existing Boost.sort library as a separate sub-library
> from Spreadsort. In doing so we'll integrate the documentation with the
> existing documentation for Boost.Sort, making it more consistent.
>
> If you review Francisco's library, please make sure you're using a compiler
> that supports C++11, and answer each of these questions:
>
> 1. Were you able to run it and see accurate and fast results? Please
> specify your compiler, OS, and processor type, and any problems (or
> slowdowns) encountered.
> 2. Would you use this library if accepted? Why or why not?
> 3. What is your evaluation of the design?
> 4. What is your evaluation of the implementation?
> 5. How much effort did you put into your evaluation? A glance? A quick
> reading? In-depth study?

Sorry, I won't have time to do a full review. I only quickly tested it in
my application with g++-6 on x86_64-linux and it just worked :-)

I believe I would use it, as an alternative to TBB (I would keep both code
paths). Both because of the performance, and because of the lack of
dependency: we already depend on C++11 and boost (I don't remember if
adding -pthread is still necessary to use std::thread, that might
complicate things a bit).

> *This library is *include only, only requiring* the files in the
> boost/sort/parallel folder, with no external dependencies.*

This is an advantage for simplicity, but also a disadvantage in that you
cannot easily benefit from sharing a thread pool with other parallel
constructs, from a supervisor that adapts the number of threads to
whatever else is going on, from any other convenient tool from a framework
(omp would let you limit the number of threads with an environment
variable, etc).

> Results from running on an I7 5820 with 12 threads:

I did a quick test on a dual-core laptop, and this was noticably faster
than TBB :-)

> GCC parallel_sort

Note that gcc's parallel sort has an extra parameter to chose between
several algorithms, it would be nice to mention that you tested the
non-default ones as well.

On Fri, 11 Nov 2016, Vinnie Falco wrote:

> On Thu, Nov 10, 2016 at 8:25 PM, Steven Ross <spreadsort_at_[hidden]> wrote:
>> The library is here: https://github.com/fjtapia/sort_parallel
>
> I was unable to build using Visual Studio 2015 with Update 3. First I
> cloned the repository into the root of my boost 1.62.0 directory. Then
> from a mSysGit bash prompt I `cd` to "test/" and invoke `b2`. Here is
> some of the output:
>
> test_insertion_sort.cpp(97): error C2146: syntax error: missing ')'
> before identifier 'and'
> test_insertion_sort.cpp(114): error C2146: syntax error: missing ')'
> before identifier 'and'
>
> Is "and" standard C++? Most of the errors revolve around that keyword.

Yes, 'and' is standard in C++, but MS only has it in some compilation
modes or if you include <ciso646> first. I think boost should not use
those alternative tokens.

-- 
Marc Glisse

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk