Sentires-Guide icon indicating copy to clipboard operation
Sentires-Guide copied to clipboard

About memory allocation

Open luzimu opened this issue 3 years ago • 4 comments

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.

luzimu avatar Aug 31 '21 08:08 luzimu

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.

lileipisces avatar Sep 01 '21 03:09 lileipisces

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

luzimu avatar Sep 06 '21 02:09 luzimu

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.

lileipisces avatar Sep 06 '21 03:09 lileipisces

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

luzimu avatar Sep 07 '21 13:09 luzimu