Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mallet bash wrapper script misses an option to set Java heap size like most other scripts. #196

Closed
ghuls opened this issue Mar 22, 2021 · 2 comments

Comments

@ghuls
Copy link

ghuls commented Mar 22, 2021

Mallet bash wrapper script misses an option to set Java heap size like most other scripts.

Other scripts have something like:

# Default Java heap size.  Change with -Xmx800m as the first argument.
mem=200m

# If first argument is something like -Xmx900m, process appropriately
arg=`echo "$1" | sed -e 's/-Xmx//'`
if test $1 != $arg ; then
  mem=$arg
  shift 
fi

Another way to allow specifying memory would be:

# Set 1GB of memory if ${MALLET_MEMORY} is not defined
  mem="${MALLET_MEMORY:-1g}"
# Run Mallet with 10GB of heap memory.
MALLET_MEMORY=10g ./bin/mallet
@mimno
Copy link
Owner

mimno commented Mar 22, 2021

I've added the $MALLET_MEMORY version, thanks!

@mimno mimno closed this as completed Mar 22, 2021
@ghuls
Copy link
Author

ghuls commented Mar 22, 2021

Thanks. To be consistent, the other scripts probably should use something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants