Git Product home page Git Product logo

Comments (2)

delocalizer avatar delocalizer commented on August 15, 2024

Not observed when writing to file; a SAM file created by streammd is well-formed according to samtools view.
Also not observed when running with a single worker (consumer) process.

from streammd.

delocalizer avatar delocalizer commented on August 15, 2024

The issue was a combination of finite buffer size (Linux system default=8192) and having each of the worker processes writing to stdout simultaneously. When the size of the output chunk exceeds the buffer size (hence the dependence on batchsize) samtools view gets an incomplete line in the input. With multiple writers to stdout there's no guarantee that what follows is the remainder of the first incomplete chunk. (But when output is redirected to a file the parallel writes are correctly sequenced, and all is well... the kernel is clever?)
Some possible solutions:

  1. increase buffer size so that it's larger than any potential batch size
  2. use an output queue
  1. is less work but more fragile and smelly
  2. is a little more work, smells better, query on performance

from streammd.

Related Issues (20)

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.