Giter Club home page Giter Club logo

fsharp.collections.parallelseq's Introduction

FSharp.Collections.ParallelSeq

Parallel (multi-core) sequence operations. See the documentation: http://fsprojects.github.io/FSharp.Collections.ParallelSeq/

Build and Publish

NuGet Status

Maintainer(source)

The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management)

Dev Guide

To build and test:

dotnet tool restore
dotnet build
dotnet test
dotnet fsdocs build

Nuget and docs are published automatically by the build process

fsharp.collections.parallelseq's People

Contributors

anirothan avatar chrsteinert avatar dsyme avatar dungpa avatar eleanor68 avatar forki avatar fsgit avatar fsprojectsgit avatar jamessdixon avatar markpattison avatar mciccotti avatar mydogisbox avatar nojaf avatar panesofglass avatar pblasucci avatar reedcopsey avatar rojepp avatar ronnieholm avatar sergey-tihon avatar tpetricek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fsharp.collections.parallelseq's Issues

PSeq.exists2 occasionally is incorrect

The following will occasionally return false:

open System
open System.Linq
open System.Threading

type pseq<'T> = ParallelQuery<'T>

let inline toP (s : seq<'T>) = 
    match s with
    | null -> nullArg "s"
    | :? pseq<'T> as p ->  p
    | _ -> s.AsParallel()    

let exists2 (f : 'T -> 'U -> bool) s1 s2 = 
    ParallelEnumerable.Any(ParallelEnumerable.Zip(toP(s1), toP(s2),Func<_,_,_>(f)), Func<_,_>(id))

let funcInt x y = (x+y)%3=0 
let Intexists2Seq1 =  seq [1;3;7]
let Intexists2Seq2 = seq [1;6;3]

exists2 funcInt Intexists2Seq1 Intexists2Seq2

Enable travis and AppVeyor on repo

Hi all

For some reason no Travis or AppVeyor CI builds are enabled on this repo - could we enable those? It should just be a matter of adding the .travis.yml and appveyor.yml files and registering the repos with the services.

cheers
don

Can't upgrade to 1.1.0

I'm still using VS 2015, targeting 4.6.2, which can't change anytime soon.

Upgrading from 1.0.2 to 1.1.0 results in warning MSB3277, "Found conflicts between different versions of the same dependent assembly...". I guess I'm stuck on 1.0.2 for now?

PSeq.cache

Description

ParallelSeq does not have a 'cache' function, analogous to Seq.cache

Expected behavior

Ideally, computed values from the evaluations of parallel sequences would be able to be both cached and forwarded such that multiple later parallel sequences can begin processing those values immediately, without recomputing them and without needing to evaluate the entire source sequence

Actual behavior

Creating an intermediate pseq, then creating two pseq's from that one and enumerating them, causes the first sequence to be evaluated twice. There is currently no way to simultaneously evaluate a source pseq only once and 'stay within the pseq monad'

let intermediate = PSeq.init 10 (fun s -> 
    let ini = sprintf "Initial run: %i" s
    printfn "%s" ini
    ini
) 
intermediate |> PSeq.iter (printfn "Result 1: %s")
intermediate |> PSeq.iter (printfn "Result 2: %s")

Known workarounds

Parallel sequences can be reified to lists, then those lists can be enumerated later on in parallel without recomputing values, but this does not allow the sequences to potentially take advantage of earlier enumerator optimizations (like the conversion of Where and Select to WhereSelect)

Package authors not listed correctly

The package authors are not listed correctly. This should be any of

  • "F# Community contributors" or
  • "F# Incubation Space Contributors (fsprojects)" or
  • the maintainers of the package

At the moment it just says this:

image

Library is not parallelizing on Azure Notebooks

Description

The Library appears to not use mutliple cores when using Azure Notebooks

Repro steps

  1. Log into Azure Notebooks
  2. Clone my Library: http://bit.ly/fspydata
  3. Open the Notebook entitled parallelSeq.ipynb
  4. Run the parallel example: note that the sequental and the parallel runs are roughly equal
  5. Run the processor count example: note the processor count is 8

*running this same code on my local machine returns the expected result: parallel is much faster than serial

Expected behavior

parallel should be faster.

Actual behavior

it is not

Known workarounds

None

Related information

  • Operating system: Linux
  • Branch (??)
  • .NET Runtime, CoreCLR or Mono Version (??)
  • Performance information, links to performance testing scripts see above

Not sure if it is a Linux issue or a Azure Notebooks issue?

Create a .NET Standard 2.0 NuGet package

Description

There is no .NET Core 2.0 version of the NuGet package.

Repro steps

Build a .NET Core 2.0 project that references FSharp.Collections.ParallelSeq.

Expected behavior

No warnings.

Actual behavior

A build warning is logged:

warning NU1701: Package 'FSharp.Collections.ParallelSeq 1.0.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.

Related information

  • Windows 7, Linux
  • NuGet package 1.0.2
  • .NET Core 2.0

System.ValueTuple.dll

The nuget package has a dependency on System.ValueTuple.dll for .NET Framework v4.5, is this possibly a mistake?

XML Docs are missing in the NuGet package

Description

While the APIs are extensively documented, this documentation is not available, when consuming the library via the NuGet package.

Repro steps

  • Create a new project
  • Include the FSharp.Collections.ParallelSeq package
  • Try to get any documentation (via mouse over, or intelli sense auto complete)

Expected behavior

Documentation is shown.

Actual behavior

Documentation is not shown.

Known workarounds

Clone the repo and directly include the source files.

Related information

Any OS, any .NET with the 1.1.3 NuGet package.

Methods not found with most recent nuget package

Description

With package 1.0.2 there is an issue with the execution of FSharp programs. I do get
Method not found: 'Void FSharp.Collections.ParallelSeq.PSeqModule.<method> for all PSeq.methods

This is really strange, I can dissemble the nuget dll and see the functions, the compilation is ok. This used to work and I suspect it is the update of FSharp.Core to 4.4.1.0 that broke the execution. There is no dll loading error in fusion logs.
Also just adding the PSeq source code to my projects did solve the issue but it is ugly.

 TestBinsManagerStatusUpdate : System.MissingMethodException : Method not found: 'Void FSharp.Collections.ParallelSeq.PSeqModule.iter(Microsoft.FSharp.Core.FSharpFunc2<!!0,Microsoft.FSharp.Core.Unit>, System.Collections.Generic.IEnumerable1<!!0>)'. at Apption.MailReader.DataInterfaces.BinsManager.Close() at Apption.MailReader.DataInterfaces.BinsManager.Stop() in F:\code\ParallelMailParser\MailParserLibrary\BinsManager.fs:line 199 at RegressionTest.EndToEndTesting.TestBinsManagerStatusUpdate() in F:\code\ParallelMailParser\RegressionTest\UnitTest1.cs:line 638

Related information

  • Operating system: Win 10
  • .NET Runtime, CoreCLR or Mono Version: .NET 4.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.