Skip to content

Commit

Permalink
Remove memory warn for non-memory consuming commands (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
PoslavskySV authored Jul 1, 2023
1 parent efda3ca commit f977912
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mixcr
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,20 @@ if [[ ${needXmxXms} == true ]]; then
targetXmx=$maxMb
fi

echo "IMPORTANT: MiXCR will use at most ${targetXmx}MB of RAM," >&2
echo " use -Xmx to change automatically set heap size (i.e. -Xmx50g to set heap size to 50 Gb)" >&2
memoryConsumingCommands=("analyze" "refineTagsAndSort" "assemblePartial" "assemble" "findShmTrees" "postanalysis" "downsampling")
needWarn=false
for mcmd in "${memoryConsumingCommands[@]}"; do
if [[ " ${appArgs[*]} " =~ ${mcmd} ]]; then
needWarn=true
break
fi
done

if [[ ${needWarn} == true ]]; then
echo "IMPORTANT: MiXCR will use at most ${targetXmx}MB of RAM," >&2
echo " use -Xmx to change automatically set heap size (i.e. -Xmx50g to set heap size to 50 Gb)" >&2
fi

javaArgs+=("-Xmx${targetXmx}m")

targetXms=$((targetXmx * 2 / 3))
Expand Down

0 comments on commit f977912

Please sign in to comment.