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