Skip to content

Commit

Permalink
Merge pull request #126 in SAT/pbmm2 from bugfix/TAK-390-remove-max-m…
Browse files Browse the repository at this point in the history
…em-check to develop

* commit '754ee9c39678abca80f52e17c70f7d07b8bb3a7e':
  Do not check for max memory
  • Loading branch information
armintoepfer committed Feb 18, 2020
2 parents 0c0347b + 754ee9c commit d5c0610
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'pbmm2',
['c', 'cpp'],
version : '1.2.0',
version : '1.2.1',
default_options : [
'buildtype=release',
'warning_level=3',
Expand Down
16 changes: 0 additions & 16 deletions src/AlignSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,22 +527,6 @@ AlignSettings::AlignSettings(const PacBio::CLI_v2::Results& options)
<< SortThreads << " threads for sorting, and " << maxMemSortFloat
<< maxMemSortSuffix << " bytes RAM for sorting.";

auto pages = sysconf(_SC_PHYS_PAGES);
auto page_size = sysconf(_SC_PAGE_SIZE);
auto availableMemory = pages * page_size;

float availFloat;
std::string availSuffix;
MemoryToHumanReadable(availableMemory, &availFloat, &availSuffix);

if (maxMem > availableMemory) {
std::ostringstream os;
os << "Trying to allocate more memory for sorting (" << maxMemSortFloat
<< maxMemSortSuffix << ") than system-wide available (" << availFloat << availSuffix
<< ")";
throw AbortException(os.str());
}

BamIdx = BamIndex::_from_string(bamIdx.c_str());

if (noBai) {
Expand Down
4 changes: 0 additions & 4 deletions tests/cram/baminput.t
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@
*Requested more threads for sorting* (glob)
*Requested more threads for sorting* (glob)

$ $__PBTEST_PBMM2_EXE align $IN $REF $CRAMTMP/fail4.bam -j 1 -J 2 --sort -m 1000G 2>&1
*Trying to allocate more memory for sorting* (glob)
[1]

$ $__PBTEST_PBMM2_EXE align $IN $REF $CRAMTMP/sort_percentage_4.bam -j 4 --sort --log-level INFO 2>&1 | grep "threads for alignments"
*Using 3 threads for alignments, 1 threads for sorting, and 768M bytes RAM for sorting.* (glob)

Expand Down
3 changes: 0 additions & 3 deletions tests/cram/misc.t
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@
$ $__PBTEST_PBMM2_EXE align $IN $REF $CRAMTMP/fail.bam --zmw --hqregion 2>&1; rm -rf $CRAMTMP/fail.bam
*Options --zmw, --hqregion and --median-filter are mutually exclusive.* (glob)

$ $__PBTEST_PBMM2_EXE align $IN $REF $CRAMTMP/fail.bam --sort -J 1 -m 1000G 2>&1; rm -rf $CRAMTMP/fail.bam
*Trying to allocate more memory for sorting* (glob)

$ $__PBTEST_PBMM2_EXE align $IN $REF $CRAMTMP/fail.bam --sort -J 1 -m 1000P 2>&1; rm -rf $CRAMTMP/fail.bam
*Unknown size multiplier P* (glob)

Expand Down

0 comments on commit d5c0610

Please sign in to comment.