Skip to content
Permalink
Browse files

return available disk space in bytes

  • Loading branch information...
elileka committed Jun 11, 2019
1 parent 5892bd1 commit e2d1d310ee78ad3fc81b3325ca97295ebc90da44
Showing with 3 additions and 3 deletions.
  1. +1 −1 data/searchslicedtargetprofile.sh
  2. +1 −1 src/mmseqs.cpp
  3. +1 −1 src/util/diskspaceavail.cpp
@@ -73,7 +73,7 @@ while [ "${STEP}" -lt "${MAX_STEPS}" ] && [ "${NUM_PROFILES}" -gt 0 ]; do
CURRENT_AVAIL_DISK_SPACE=$(($("$MMSEQS" diskspaceavail "${TMP_PATH}")/2))
# Compute the max number of sequence according to the number of profiles
# 90 bytes/query-result line max.
MAX_SEQS="$((1024*CURRENT_AVAIL_DISK_SPACE/NUM_PROFILES/90))"
MAX_SEQS="$((CURRENT_AVAIL_DISK_SPACE/NUM_PROFILES/90))"
else
MAX_SEQS="$((AVAIL_DISK/NUM_PROFILES/90))"
fi
@@ -797,7 +797,7 @@ std::vector<struct Command> commands = {
"",
CITATION_MMSEQS2, {{"",DbType::ACCESS_MODE_INPUT, NULL}}},
{"diskspaceavail", diskspaceavail, &par.empty, COMMAND_HIDDEN,
"",
"available disk space in bytes",
NULL,
"",
"",
@@ -9,6 +9,6 @@ extern const char* version;
int diskspaceavail(int, const char**, const Command&) {
Parameters &par = Parameters::getInstance();
size_t diskLimit = FileUtil::getFreeSpace(FileUtil::dirName(par.db1).c_str());
Debug(Debug::INFO) << diskLimit / 1024 << "\n"; // in kb
Debug(Debug::INFO) << diskLimit << "\n"; // in bytes
EXIT(EXIT_SUCCESS);
}

0 comments on commit e2d1d31

Please sign in to comment.
You can’t perform that action at this time.