gorpipe / gor

GORpipe is a tool based on a genomic ordered relational architecture and allows analysis of large sets of genomic and phenotypic tabular data using declarative query language, in a parallel execution engine.
GNU Affero General Public License v3.0
39 stars 13 forks source link

There is insufficient memory for the Java Runtime Environment to continue. #6

Closed Shicheng-Guo closed 4 years ago

Shicheng-Guo commented 4 years ago

Finally, gor was successfully installed and test command works perfect:

./gortools/build/install/gor-scripts/bin/gorpipe "gor tests/data/gor/dbsnp_test.gor | top 10"

However, interactive shell for GORpipe show the following problem. Any suggestion?

Thanks.

Shicheng

(base) [sguo2@comet-ln3 gor]$ /share/apps/compute/gor/tools/build/install/tools/bin/gorshell
GOR shell - 2.5-SNAPSHOT (git SHA e86b3af)
> gor /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10
>
(query running)> #
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32744 bytes for ChunkPool::allocate
# An error report file with more information is saved as:
# /tmp/hs_err_pid14054.log
(base) [sguo2@comet-ln3 gor]$
StFS commented 4 years ago

@snorristurluson you have any pointers for increasing the memory limit of the gor shell?

snorristurluson commented 4 years ago

That's strange, the gor shell isn't set up any different from gorpipe.

Try the following to control the memory given to the JVM: export JAVA_OPTS=-Xms2G -Xmx5G

Shicheng-Guo commented 4 years ago

It is Interesting. JAVA_OPTS bring new error. Here is the command I used:

export JAVA_OPTS="-Xms2G -Xmx5G"
export MODULEPATH=/share/apps/compute/modulefiles/applications:$MODULEPATH
module load gor
cd /share/apps/compute/gor/
/share/apps/compute/gor/tools/build/install/tools/bin/gorshell
gor /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10 

Here is the error:

(base) [sguo2@comet-ln2 gor]$ export JAVA_OPTS="-Xms2G -Xmx5G"
(base) [sguo2@comet-ln2 gor]$ export MODULEPATH=/share/apps/compute/modulefiles/applications:$MODULEPATH
(base) [sguo2@comet-ln2 gor]$ module load gor
(base) [sguo2@comet-ln2 gor]$ cd /share/apps/compute/gor/
(base) [sguo2@comet-ln2 gor]$ /share/apps/compute/gor/tools/build/install/tools/bin/gorshell
Error occurred during initialization of VM
java.lang.OutOfMemoryError: unable to create new native thread
(base) [sguo2@comet-ln2 gor]$ gor /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10
top: unknown option '1'
Usage:
  top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]

gor-comet-Shicheng-Guo-2020-2

StFS commented 4 years ago

@Shicheng-Guo there are two issues here: 1) you should not be using the gor command, instead you should be using the gorpipe command. 2) when writing gorpipe commands, you need to quote the gor query to avoid your shell taking over the parsing of the line.

So try something like this:

gorpipe "/home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10"

Shicheng-Guo commented 4 years ago

@StFS these two reply really helpful!!

I agree with you gorpipe work well and don't affect linux bash. However, the following script works:

gorpipe /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | head

gor-comet-Shicheng-Guo-2020-4

Thanks.

Shicheng

StFS commented 4 years ago

@Shicheng-Guo yes, head works because that's a valid Linux command. In that case the gorpipe command is reading and outputting all the rows from the file you're querying but head is simply ignoring everything but the first few lines.

This is inefficient compared to using the GOR top command, as that will allow GOR to stop reading the file once it has read the number of rows requested.