Message-ID: <CAB6GOe7JOGbs8_Q=QrG7Sg9rY2QsOTaCXeg1CPCybut=j_PRTQ@mail.gmail.com>
Date: 2016-07-20T01:59:58Z
From: Peter Hickey
Subject: [Bioc-devel] Increasing MAX_BUFLENGTH in S4Vectors src/AEbufs.c
I hit an error when calling reduce() on a very big GRanges object
(length = 1170402558). The error was:
Error in .Call2("CompressedIRangesList_reduce", x, drop.empty.ranges, :
_get_new_buflength(): MAX_BUFLENGTH reached
I found MAX_BUFLENGTH is defined in S4Vectors in the file src/AEbufs.c as:
#define MAX_BUFLENGTH_INC (32 * 1024 * 1024)
#define MAX_BUFLENGTH (32 * MAX_BUFLENGTH_INC)
So I experimentally increased the limit in a local copy. I first set
it to twice the current value (which errored on R CMD check, I think
because that makes MAX_BUFLENGTH > the maximum allowable integer), but
by setting it to 1.5 times its current limit I got (A) an apparently
working copy of S4Vectors and (B) the original code now ran without
error.
So, is it safe to increase MAX_BUFLENGTH or am I missing some important details?
Thanks,
Pete