GithubHelp home page GithubHelp logo

local config about porecov HOT 5 CLOSED

replikation avatar replikation commented on June 25, 2024
local config

from porecov.

Comments (5)

iferres avatar iferres commented on June 25, 2024 2

Thank you! And sorry for my late response. I said nanoplot as an example. I'd probably set other defaults as well, but I'd need to benchmark them before. I ran it on 12 barcodes with cores = 4 and it was pretty fast.
Nice to have the --max_cores parameter, I may or may not copy this implementation from your wf to mine :P .
Bests!

from porecov.

hoelzer avatar hoelzer commented on June 25, 2024 1

Hi @iferres, thanks for the message and for using the wf!

Yes, you are right and I agree that for some processes the default CPU usage can be reduced to allow more parallelization.

@replikation I think something like:

process {
    withLabel:  artic       { cpus = params.cores }
    withLabel:  bwa         { cpus = params.cores }
    withLabel:  fastcov     { cpus = 4 }
    withLabel:  ggplot2     { cpus = 4 }
    withLabel:  guppy_cpu   { cpus = params.cores }
    withLabel:  guppy_gpu   { cpus = params.cores }
    withLabel:  kraken2     { cpus = params.cores }
    withLabel:  krona       { cpus = 1 }
    withLabel:  minimap2    { cpus = params.cores }    
    withLabel:  nanoplot    { cpus = 2 }
    withLabel:  nextclade   { cpus = params.cores }
    withLabel:  pangolin    { cpus = 4 }
    withLabel:  president   { cpus = 1 }
    withLabel:  pycoqc      { cpus = 4 }
    withLabel:  snp_sites   { cpus = 4 }
    withLabel:  ubuntu      { cpus = 1 } 
}

I am also not sure if guppy_gpu needs params.cores bc/ it anyway runs on the GPU so does not need to block CPUs? (however, it's anyway the first step all other processes have to wait for)

And, @iferres if you are not aware of it: there is also an additional parameter --max_cores for the local profile. By that, you can configure how many CPUs are block in total on your machine. So lets say you have a local machine w/ 32 CPUs but you only want to use 24 in total, you could specify:

--cores 8 --max_cores 24

so e.g. bwa would in maximum run 3 times in parallel.

from porecov.

replikation avatar replikation commented on June 25, 2024 1

Hi @iferres glad you like it :)

yes, we still have #58 open, so feedback here is of course welcome :) . Hardcoding nanoplot down to 2 makes e.g. sense I think. @hoelzer the cpus are for the demultiplexing part after the calling which is slow with only a few threads.

Usually, multithreading is a bit more difficult on one machine (e.g. we want to avoid overloading) so the best way (in my experience) is using the --cores to adjust the level of "parallel" runs as @hoelzer suggested.

from porecov.

replikation avatar replikation commented on June 25, 2024

added to f919641

from porecov.

replikation avatar replikation commented on June 25, 2024

@iferres yep let me know 👍🏻

from porecov.

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.