How to overcome memory issue?

Well, as far as I can see there’re several questions regarding that issue. However, I guess mine is gonna be a little bit different. So, the main point is, while importing files to matrix or matrices there are memory issues. Sometimes those could be fixed with:

hl.init(min_block_size=128, master=local[16])

Unfortunately that still isn’t enough:

Hail version: 0.2.74-0c3a74d12093
Error summary: OutOfMemoryError: GC overhead limit exceeded

Hail version: 0.2.74-0c3a74d12093
Error summary: OutOfMemoryError: Java heap space

What else can I do, given I am running it on a computer via Snakemake? Is it possible to send some Java stuff, like -Xms5g -Xmx10g or somewhat else to prevent the error while running it on local machine.

You’re right that the issue is Java / Spark. You’ll need to set PYSPARK_SUBMIT_ARGS as described here.

what if I don’t use neither iPython nor notebook?

PYSPARK_SUBMIT_ARGS works for any Python program that uses Spark and/or Hail.

1 Like

Thx for your remark, made it!