Skip to content

Commit

Permalink
1.0.2b (#68)
Browse files Browse the repository at this point in the history
* Further improvement to ULTRA's automatic window sizing

* If built without release optimizations, ULTRA will now note that in -h.
  • Loading branch information
DanielOlson authored Sep 13, 2024
1 parent 39f5421 commit 344b0cc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()

if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions(-DDEBUG_PRAGMA=1)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
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
9 changes: 8 additions & 1 deletion src/cli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
#ifndef ULTRA_CLI_HPP
#define ULTRA_CLI_HPP

#define ULTRA_VERSION_STRING "1.0.2"
#define ULTRA_VERSION_STRING "1.0.2b"
#define DEBUG_STRING ""
#ifdef DEBUG_PRAGMA
#undef DEBUG_STRING
#define DEBUG_STRING " **WARNING** BUILT WITHOUT RELEASE OPTIMIZATION **WARNING** \n"
#endif



#include "../lib/CLI11.hpp"
Expand Down Expand Up @@ -109,6 +115,7 @@ struct Settings {
"(U)ltra (L)ocates (T)andemly (R)epetitive (A)reas\n"
" Daniel R. Olson and Travis J. Wheeler\n"
" Version " ULTRA_VERSION_STRING "\n"
DEBUG_STRING
" Use '--cite' for citation instructions\n"
"=================================================\n"};

Expand Down

0 comments on commit 344b0cc

Please sign in to comment.