[R-pkg-devel] R_CStackLimit and OpenMP for CRAN Packages

Jonathan Lisic jlisic at gmail.com
Wed Aug 3 15:24:36 CEST 2016


After about a three hour slog through my code I was able to track down and eliminate any non-essential function calls.  The function call removal significantly decreased the stack size, removing the requirement for R_CStackLimit bound to be changed.

Thanks,

Jonathan Lisic


> On Aug 3, 2016, at 5:26 AM, Jonathan Lisic <jlisic at gmail.com> wrote:
> 
> Hi,
> 
> I just had a CRAN rejection due to setting R_CStackLimit = (uintptr_t)-1 , e.g  Found non-API call to R: ‘R_CStackLimit’.
> 
> This stack limit change is done to avoid stack overruns when I use OpenMP with C.  Are there other ways around this issue?  or should I just accept the large performance loss and disable OpenMP?  
> 
> Here is a link to my package:  https://github.com/jlisic/rasterKernelEstimates
> 
> Thanks,
> 
> Jonathan Lisic



More information about the R-package-devel mailing list