NERSCPowering Scientific Discovery Since 1974

Running with Java

Workflows that require the Java Virtual Machine will run into a couple of issues when running on Genepool.

Java Software installed on Genepool

There are a number of software packages installed on Genepool which make use of the Oracle JVM.  This isn't an exhaustive list however and is being actively maintained.

  • MEGAN - Metagenomics analysis and visualization tool

Memory Issues with the JVM

If you find that your job is running out of memory or the JVM can not be initialized, this is because the JVM, by default will try to take 1/4 of the memory on the node where it is running. If you have not requested that much for your job (by using h_vmem), the JVM will not have enough memory and will crash. To ensure that you are setting the maximum heap size to the appropriate value, please set the following environment variable:


export _JAVA_OPTIONS="-Xmx1G"


setenv _JAVA_OPTIONS "-Xmx1G"

The "-Xms" and "-Xmx" options tell the JVM the minimum and maximum heap size respectively. In the example above, it is set to 1G. These arguments only accept integral values, so to set the heap size to something smaller, you can use "M" for megabytes, e.g. "-Xmx256M".  You should select somewhat less memory for "-Xmx" than hv_mem (or ram.c for a single slot job) to account for overhead for any other processes your script may run concurrently. 

Please note that the capitalization here is important, "-xmx1g", "-Xmx1g" will not work.

For more information, please check out this resource.