mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Adds a warning on max-cpu = 1
Former-commit-id: ed02328d7d0e36b7c6b77ea776c0bde7c0eb64f3
This commit is contained in:
@ -88,7 +88,12 @@ func GenerateOptionParser(optionset ...func(*getoptions.GetOpt)) ArgumentParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setup the maximum number of CPU usable by the program
|
// Setup the maximum number of CPU usable by the program
|
||||||
runtime.GOMAXPROCS(_MaxAllowedCPU)
|
if _MaxAllowedCPU == 1 {
|
||||||
|
log.Warn("Limitating the Maximum number of CPU to 1 is not recommanded")
|
||||||
|
runtime.GOMAXPROCS(1)
|
||||||
|
} else {
|
||||||
|
runtime.GOMAXPROCS(_MaxAllowedCPU)
|
||||||
|
}
|
||||||
if options.Called("max-cpu") {
|
if options.Called("max-cpu") {
|
||||||
log.Printf("CPU number limited to %d", _MaxAllowedCPU)
|
log.Printf("CPU number limited to %d", _MaxAllowedCPU)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user