Snappy on a cluster running scientific linux and torque (solving the java heap space)

Dear users,

I would like to share my experience using snappy in a cluster, in particular concerning the RuntimeError: java.lang.OutOfMemoryError: Java heap space.

None of the solutions found in this forum solved the issue. Neither could the solution found here solve my heap space error.

The way to go in my case was to define to:

  • first define java environment variables inside the shell script prior to the call of the python script:
export JAVA_TOOL_OPTIONS="-Xmx12g"                                                                                                                                                                                
export _JAVA_OPTIONS="-Xmx12g"                                                                                                                                                                                    
  • only then call the python script (in this case a simple test for reading and writing a sentinel-1 scene) with:
$HOME/local/miniconda2/bin/python2 $HOME/proj/sar2watermask/modules/                                                                                          

All the best

1 Like