[Haskell-beginners] Parallel Processing in Libraries?

David McBride toad3k at gmail.com
Mon Jan 20 15:58:40 UTC 2020


It is not clear to me exactly what you are doing, but I believe in order to
use Control.Parallel, you must pass "-threaded" and then some rts options
at run time in order to declare options like the number of cores, etc.  It
is possible that you are running it in two different ways, threaded while
developing the library and non threaded while developing your application.

I would say that if you can eliminate that from consideration you might get
more thorough answers from the haskell-cafe mailing list, as the topic of
parallelism is a bit above the beginners list.

On Mon, Jan 20, 2020 at 8:24 AM Leonhard Applis <
Leonhard.Applis at protonmail.com> wrote:

> Thank you Akhra,
> Thank you Sebastian,
>
>
> I appreciate your help and feedback.
>
> However my Question was maybe not clear enough.
>
>
> So in general my task is perfectly fit for Control.Parallel and
>
> if I'd make a program including the Code I want I could just put
> control.parallel in the right places and run the program threaded.
>
> Lets call this Application A.
>
> However for separation I'd like to have my primary code, the one which
> should be run parallel in a separate library, call it Library A.
>
> Library A should be utilizing Control.Parallel.
> I then want to have Application B using Library A with multiple Cores.
>
> The code of Library A has still all the control.parallel in place which
> worked perfectly fine when run running Application A threaded.
>
> When I run Application B only one core seems to be utilized.
>
> I also don't see any kind of parallel Code in popular frameworks such as
> QuickCheck2 (which seems very fit for parallel approaches)
>
> which makes me wonder if what I want is "not possible" the way I want it.
>
>
> I'd like to get Application B (and potential more Application C,D) to
> utilize library A properly.
>
>
> I am at the moment not looking for mitigations or parallel-enabling
> frameworks/libraries.
>
>
> thank you in advance and best regards
> Leonhard
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20200120/40b48545/attachment.html>


More information about the Beginners mailing list