javampimpj-express

Can not increase Java heap space in MPJ Express cluster mode


I executed my program using 5 nodes, each node equipped with 6 cores processor and 8GB of RAM. I set the process = 5 so that each node will handle 1 process. In some cases which used more data, I got an error "java.lang.OutOfMemoryError: Java Heap Space". I tried to increase the heap by adding "-Xmx2g", but It showed "could not reserve enough space". It does not make sense, because I have plenty RAM in each node. I only can set it to <= 1GB, but my program needs more than that. Is somebody know how to solve that problem? (Please note that in multi core mode, increasing heap space is working) can not increase heap space


Solution

  • Well, finally I solved the problem. The main problem was that in 2 PCs, the default java was 32 bit even it has 64 bit version. Simply, I uninstalled the 32 bit version. Then, the 64 bit version will take over automatically. After that I added _JAVA_OPTIONS=-Xms1g -Xmx4g in system variables. Then run command "java -XX:+PrintFlagsFinal -version | grep HeapSize" in cmd to ensure that the heap size is increased. Finally, my mpj program run normally.