mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
homogenize worker count
Former-commit-id: 4352ac6694c08023cdf0e090723fac8af655cea4
This commit is contained in:
@ -3,6 +3,7 @@ package obiapat
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
)
|
||||
@ -103,7 +104,7 @@ func MakeOptions(setters []WithOption) Options {
|
||||
extension: -1,
|
||||
fullExtension: false,
|
||||
circular: false,
|
||||
parallelWorkers: 4,
|
||||
parallelWorkers: obioptions.CLIParallelWorkers(),
|
||||
batchSize: 100,
|
||||
forward: NilApatPattern,
|
||||
cfwd: NilApatPattern,
|
||||
|
@ -1,5 +1,7 @@
|
||||
package obichunk
|
||||
|
||||
import "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
|
||||
type __options__ struct {
|
||||
statsOn []string
|
||||
categories []string
|
||||
@ -24,8 +26,8 @@ func MakeOptions(setters []WithOption) Options {
|
||||
navalue: "NA",
|
||||
cacheOnDisk: false,
|
||||
batchCount: 100,
|
||||
batchSize: 5000,
|
||||
parallelWorkers: 4,
|
||||
batchSize: obioptions.CLIBatchSize(),
|
||||
parallelWorkers: obioptions.CLIParallelWorkers(),
|
||||
noSingleton: false,
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package obingslibrary
|
||||
|
||||
import (
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
)
|
||||
|
||||
@ -125,8 +126,8 @@ func MakeOptions(setters []WithOption) Options {
|
||||
allowedMismatch: 0,
|
||||
allowsIndel: false,
|
||||
withProgressBar: false,
|
||||
parallelWorkers: 4,
|
||||
batchSize: 1000,
|
||||
parallelWorkers: obioptions.CLIParallelWorkers(),
|
||||
batchSize: obioptions.CLIBatchSize(),
|
||||
}
|
||||
|
||||
opt := Options{&o}
|
||||
|
@ -221,7 +221,7 @@ func IAssemblePESequencesBatch(iterator obiiter.IBioSequence,
|
||||
log.Fatalln("Sequence data must be paired")
|
||||
}
|
||||
|
||||
nworkers := obioptions.CLIMaxCPU() * 3 / 2
|
||||
nworkers := obioptions.CLIParallelWorkers()
|
||||
|
||||
if len(sizes) > 0 {
|
||||
nworkers = sizes[0]
|
||||
|
Reference in New Issue
Block a user