Skip to content

Commit

Permalink
Allow easy-search to work with --gpu 1
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Nov 13, 2024
1 parent 81171a5 commit a66ad0c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data/workflow/easysearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ if notExists "${TARGET}.dbtype"; then
|| fail "target createdb died"
fi
TARGET="${TMP_PATH}/target"

if [ -n "${GPU}" ]; then
if notExists "${TMP_PATH}/target_pad"; then
# shellcheck disable=SC2086
"$MMSEQS" makepaddedseqdb "${TMP_PATH}/target" "${TMP_PATH}/target_pad" ${MAKEPADDEDSEQDB_PAR} \
|| fail "makepaddedseqdb died"
fi
TARGET="${TMP_PATH}/target_pad"
fi
fi

if [ -n "${LINSEARCH}" ] && notExists "${TARGET}.linidx"; then
Expand Down Expand Up @@ -66,6 +75,14 @@ if [ -n "${REMOVE_TMP}" ]; then
# shellcheck disable=SC2086
"$MMSEQS" rmdb "${TMP_PATH}/target_h" ${VERBOSITY}
fi

if [ -f "${TMP_PATH}/target_pad" ]; then
# shellcheck disable=SC2086
"$MMSEQS" rmdb "${TMP_PATH}/target_pad" ${VERBOSITY}
# shellcheck disable=SC2086
"$MMSEQS" rmdb "${TMP_PATH}/target_pad_h" ${VERBOSITY}
fi

# shellcheck disable=SC2086
"$MMSEQS" rmdb "${TMP_PATH}/query" ${VERBOSITY}
# shellcheck disable=SC2086
Expand Down
2 changes: 2 additions & 0 deletions src/workflow/EasySearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ int doeasysearch(int argc, const char **argv, const Command &command, bool linse
par.shuffleDatabase = origShuffle;
par.createdbMode = Parameters::SEQUENCE_SPLIT_MODE_HARD;
cmd.addVariable("CREATEDB_PAR", par.createParameterString(par.createdb).c_str());
cmd.addVariable("GPU", par.gpu ? "TRUE" : NULL);
cmd.addVariable("MAKEPADDEDSEQDB_PAR", par.createParameterString(par.makepaddedseqdb).c_str());
cmd.addVariable("CONVERT_PAR", par.createParameterString(par.convertalignments).c_str());
cmd.addVariable("SUMMARIZE_PAR", par.createParameterString(par.summarizeresult).c_str());

Expand Down

0 comments on commit a66ad0c

Please sign in to comment.