Skip to content

Commit

Permalink
Further improvement to ULTRA's automatic window sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielOlson committed Sep 13, 2024
1 parent 39f5421 commit dea2324
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void Settings::prepare_settings() {
->group("Output");

app.add_option("--max_consensus", this->max_consensus_period,
"The maximum length of consensus pattern to include in output")
"The maximum length of consensus pattern to include in output")
->default_val(this->max_consensus_period)
->group("Output");

Expand Down Expand Up @@ -626,21 +626,25 @@ void Settings::assign_settings() {

// Small models use less than 160 mb per thread
else if (period_memory <= 200000) {
this->window_size = 400 * this->max_period;
this->window_size = 1000 * this->max_period;
}

// medium models use less than 1 GB per thread
else if (period_memory <= 2000000) {
this->window_size = 100 * this->max_period;
this->window_size = 500 * this->max_period;
}

// medium models use less than 1 GB per thread
else if (period_memory <= 4000000) {
else if (period_memory <= 20000000) {
this->window_size = 100 * this->max_period;
}

else if (period_memory <= 50000000) {
this->window_size = 50 * this->max_period;
}

// Large models use less than 4 GB per thread
else {
else {
this->window_size = 25 * this->max_period;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef ULTRA_CLI_HPP
#define ULTRA_CLI_HPP

#define ULTRA_VERSION_STRING "1.0.2"
#define ULTRA_VERSION_STRING "1.0.2b"


#include "../lib/CLI11.hpp"
Expand Down

0 comments on commit dea2324

Please sign in to comment.