lileipisces / Sentires-Guide

A quick guide to Sentires: Phrase-level Sentiment Analysis toolkit, SIGIR'14
34 stars 5 forks source link

About memory allocation #1

Open luzimu opened 2 years ago

luzimu commented 2 years ago

Thanks for your great work, which helps me too much. However, I encountered an error “Exception in thread "main" java.lang.OutOfMemoryError: Java heap space” while running the command "java -jar -Xms1024M -Xmx1024M thuir-sentires.jar -t lexicon -c lei/4.lexicon.linux" Am I doing something blatantly wrong? I will really appreciate any insight on how to solve this problem.

lileipisces commented 2 years ago

You may try to allocate more memory if your machine allows you to do so. This can be done by changing the number 1024 in the command into a larger one, e.g., 2048. This is what I did when I encountered such problems.

luzimu commented 2 years ago

We have changed the number 1024 to 102400, but also met such problem. How much memory did you allocate when running this command?

lileipisces commented 2 years ago

Because the machines in our lab have sufficient memory, I set the command like this "java -jar -Xmx200G thuir-sentires.jar -t lexicon -c lei/4.lexicon.linux >> log.txt". And it is fine in my case.

luzimu commented 2 years ago

Thank you for your reply, which helped me a lot.