Hi there,
I’m using the hl.agg.linreg() option to run a weighted GWAS. Everything went well when I only included 10 covariates, but when I raised the number of covariates to 20, the program crashed and returned an OutOfMemoryError. Here’s the error log:
Java stack trace:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
at is.hail.io.StreamBlockOutputBuffer.writeBlock(OutputBuffers.scala:293)
at is.hail.io.LZ4OutputBlockBuffer.writeBlock(OutputBuffers.scala:313)
at is.hail.io.BlockingOutputBuffer.writeBlock(OutputBuffers.scala:190)
at is.hail.io.BlockingOutputBuffer.writeDouble(OutputBuffers.scala:234)
at is.hail.io.LEB128OutputBuffer.writeDouble(OutputBuffers.scala:170)
at __C402etypeEncode.__m408ENCODE_r_float64_TO_r_float64(Unknown Source)
at __C402etypeEncode.__m407write_fields_group_0(Unknown Source)
at __C402etypeEncode.__m406ENCODE_r_tuple_of_r_float64ANDo_tuple_of_r_boolANDr_int32ANDr_boolANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ENDANDo_tuple_of_r_float64ENDEND_TO_r_struct_of_r_float64ANDo_struct_of_r_boolANDr_int32ANDr_boolANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ENDANDo_struct_of_r_float64ENDEND(Unknown Source)
at __C402etypeEncode.__m405ENCODE_r_array_of_r_tuple_of_r_float64ANDo_tuple_of_r_boolANDr_int32ANDr_boolANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ENDANDo_tuple_of_r_float64ENDEND_TO_r_array_of_r_struct_of_r_float64ANDo_struct_of_r_boolANDr_int32ANDr_boolANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ENDANDo_struct_of_r_float64ENDEND(Unknown Source)
at __C402etypeEncode.__m404write_fields_group_0(Unknown Source)
at __C402etypeEncode.__m403ENCODE_r_tuple_of_r_array_of_r_tuple_of_r_float64ANDo_tuple_of_r_boolANDr_int32ANDr_boolANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ENDANDo_tuple_of_r_float64ENDENDEND_TO_r_struct_of_r_array_of_r_struct_of_r_float64ANDo_struct_of_r_boolANDr_int32ANDr_boolANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ANDr_float64ENDANDo_struct_of_r_float64ENDENDEND(Unknown Source)
at __C402etypeEncode.apply(Unknown Source)
at is.hail.io.CompiledEncoder.writeRegionValue(Encoder.scala:32)
at is.hail.annotations.BroadcastRegionValue$class.broadcast(BroadcastValue.scala:55)
at is.hail.annotations.BroadcastRow.broadcast$lzycompute(BroadcastValue.scala:75)
at is.hail.annotations.BroadcastRow.broadcast(BroadcastValue.scala:75)
at is.hail.expr.ir.TableMapRows.execute(TableIR.scala:1450)
at is.hail.expr.ir.TableMapGlobals.execute(TableIR.scala:1737)
at is.hail.expr.ir.Interpret$.run(Interpret.scala:811)
at is.hail.expr.ir.Interpret$.alreadyLowered(Interpret.scala:53)
at is.hail.expr.ir.InterpretNonCompilable$.interpretAndCoerce$1(InterpretNonCompilable.scala:16)
at is.hail.expr.ir.InterpretNonCompilable$.is$hail$expr$ir$InterpretNonCompilable$$rewrite$1(InterpretNonCompilable.scala:53)
at is.hail.expr.ir.InterpretNonCompilable$.apply(InterpretNonCompilable.scala:58)
at is.hail.expr.ir.lowering.InterpretNonCompilablePass$.transform(LoweringPass.scala:56)
at is.hail.expr.ir.lowering.LoweringPass$$anonfun$apply$3$$anonfun$1.apply(LoweringPass.scala:15)
at is.hail.expr.ir.lowering.LoweringPass$$anonfun$apply$3$$anonfun$1.apply(LoweringPass.scala:15)
at is.hail.utils.ExecutionTimer.time(ExecutionTimer.scala:69)
at is.hail.expr.ir.lowering.LoweringPass$$anonfun$apply$3.apply(LoweringPass.scala:15)
Hail version: 0.2.49-11ae8408bad0
Error summary: OutOfMemoryError: Java heap space
May I ask if there’s anything I could do in this case? Thank you very much!