Re: [Rd] Segfault reporting: memory not mapped error
> Blair Christian > on Sun, 25 Oct 2009 15:42:36 -0400 writes: > Is this the right place to report segfaults? > spc$ R CMD BATCH driver.q rOut.txt > spc$ tail -16 rOut.txt /Library/Frameworks/R.framework/Resources/bin/BATCH: > line 60: 5461 Segmentation fault ${R_HOME}/bin/R -f ${in} ${opts} > ${R_BATCH_OPTIONS} > ${out} 2>&1 > *** caught segfault *** > address 0x3f095116, cause 'memory not mapped' > Traceback: > 1: .Call("La_dgesv", a, b, tol, PACKAGE = "base") > 2: solve.default(iV0) > 3: solve(iV0) > 4: standardGeneric("solve") > 5: solve(iV0) > 6: w0.fullCond(curr.sample, x...@internals@values, x...@priors@values) > 7: gsSampler(down.univ.gs) > 8: standardGeneric("gsSampler") > 9: gsSampler(down.univ.gs) > 10: univDownStatic(o3Jun21, internal.vals, prior.vals, init.vals, > param.dims) > aborting ... >> sessionInfo() > R version 2.9.2 (2009-08-24) > i386-apple-darwin8.11.1 > locale: > en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 > attached base packages: > [1] stats graphics grDevices utils datasets methods base > I also got this error once: > Error: segfault from C stack overflow > Any thoughts would be appreciated. I have no personal C code, and it looks > like the matrix I pass to solve is too ill conditioned? Yes, maybe. But the underlying LAPACK code that is eventually called from the above .Call(...) should *never* seg.fault On the other hand the "C stack overflow" you've seen is a bad sign (of other C code your R code calls). > Let me know what > other info I can use to help figure out the problem. I saw several of these > on the R-help but wasn't sure which was the best place to report. > Thx, Blair The most important thing is to provide a self-contained reproducible example (as the footer of every R-help message has:) >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. Only then there's a good chance that the problem can be addressed at all. Martin Maechler, ETH Zurich __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] mysteriously persistent generic definition
Here's a self-contained example of the problem: > foo <- function(obj) {return(3);} > setGeneric("foo") [1] "foo" > removeGeneric("foo") [1] TRUE > foo <- function(x) {return(4);} > args(foo) function (x) NULL > setGeneric("foo") [1] "foo" > args(foo) function (obj) NULL R 2.7.1. I get the same behavior whether or not I use ESS. The reason this is more than a theoretical problem: > setMethod("foo", signature(x="numeric"), function(x) {return(x+4);}) Error in match.call(fun, fcall) : unused argument(s) (x = "numeric") Ross __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] mysteriously persistent generic definition
R 2.8.1 on Windows behaves as I expected, i.e., the final args(foo) returns a function of x. The previous example (below) was on Debian GNU/Linux. On Wed, 2009-10-28 at 12:14 -0700, Ross Boylan wrote: > Here's a self-contained example of the problem: > > > foo <- function(obj) {return(3);} > > setGeneric("foo") > [1] "foo" > > removeGeneric("foo") > [1] TRUE > > foo <- function(x) {return(4);} > > args(foo) > function (x) > NULL > > setGeneric("foo") > [1] "foo" > > args(foo) > function (obj) > NULL > > R 2.7.1. I get the same behavior whether or not I use ESS. > > The reason this is more than a theoretical problem: > > > setMethod("foo", signature(x="numeric"), function(x) {return(x+4);}) > Error in match.call(fun, fcall) : unused argument(s) (x = "numeric") > > Ross > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] mysteriously persistent generic definition
On 10/28/2009 3:14 PM, Ross Boylan wrote: Here's a self-contained example of the problem: foo <- function(obj) {return(3);} setGeneric("foo") [1] "foo" removeGeneric("foo") [1] TRUE foo <- function(x) {return(4);} args(foo) function (x) NULL setGeneric("foo") [1] "foo" args(foo) function (obj) NULL R 2.7.1. I get the same behavior whether or not I use ESS. The reason this is more than a theoretical problem: setMethod("foo", signature(x="numeric"), function(x) {return(x+4);}) Error in match.call(fun, fcall) : unused argument(s) (x = "numeric") We just released 2.10.0. It doesn't have this problem, nor does 2.9.2, or 2.8.1. I think you'll just have to upgrade. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] unable to compile mgcv
Hello -- I am trying to compile R-2.9.2 on IBM Power5 machine with AIX 5.3. I have posted three previous posts. Over time I have made significant progress towards getting a successful build. I am now getting the following error: == begin installing recommended package mgcv * Installing *source* package 'mgcv' ... ** libs gmake[2]: Entering directory `/tmp/RtmpOtsRnd/R.INSTALL2781446b/mgcv/src' gcc -maix64 -pthread -std=gnu99 -I/usr/local/builddir/include -I/usr/local/include -O2 -g -mcpu=power5 -c gcv.c -o gcv.o gcc -maix64 -pthread -std=gnu99 -I/usr/local/builddir/include -I/usr/local/include -O2 -g -mcpu=power5 -c gdi.c -o gdi.o gdi.c: In function 'qr_ldet_inv': gdi.c:294: error: expected identifier or '(' before numeric constant gdi.c:308: error: lvalue required as unary '&' operand gdi.c:308: error: lvalue required as unary '&' operand gdi.c:316: error: 'j' undeclared (first use in this function) gdi.c:316: error: (Each undeclared identifier is reported only once gdi.c:316: error: for each function it appears in.) gdi.c: In function 'get_detS2a': gdi.c:617: error: expected identifier or '(' before numeric constant gdi.c:620: error: 'Mf' undeclared (first use in this function) gdi.c:636: error: 'max_col' undeclared (first use in this function) . ERROR: compilation failed for package 'mgcv' * Removing '/usr/local/builddir/library/mgcv' gmake[1]: *** [mgcv.ts] Error 1 gmake[1]: Leaving directory `/usr/local/builddir/src/library/Recommended' gmake: *** [recommended-packages] Error 2 make: The error code from the last command is 2. Stop. == Initially I had mgcv 1.5-5 and I downloaded mgcv 1.5-6 and tried again. I get the same error. I would really appreciate any help with this. Thanks. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] unable to compile mgcv
Some more details on my being able to compile R 2.9.2 for AIX 5.3 export OBJECT_MODE=64 export AR="ar -X64" export R_BROWSER=/opt/freeware/bin/firefox export MAKE=/usr/bin/gmake export R_SHELL=/usr/bin/bash #export LIBICONV=/opt/freeware/lib export CC="gcc -maix64 -pthread" export CXX="g++ -maix64 -pthread" export CFLAGS="-O2 -g -mcpu=power5" export F77="gfortran -maix64 -pthread" export FC="gfortran -maix64 -pthread" export FFLAGS="-O2 -g -mcpu=power5" export FCFLAGS="-O2 -g -mcpu=power5" export CPPFLAGS="-I/usr/lpp/X11/include/X11" export LDFLAGS="-L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -L/opt/freeware/lib -L/opt/freeware/lib64" === ../R-2.9.2/configure --enable-R-shlib --with-iconv=no > config_292.log 2>&1 ; make > make_292.log 2>&1 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] unable to compile mgcv
The first offending line in gdc.c is 294 int *pivot,i,TRUE=1,j; and TRUE must be #defined in some AIX include file. Change it to true or add #undef TRUE prior to its use and it may compile. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Chuck White > Sent: Wednesday, October 28, 2009 12:47 PM > To: r-devel@r-project.org > Subject: [Rd] unable to compile mgcv > > Hello -- I am trying to compile R-2.9.2 on IBM Power5 machine > with AIX 5.3. I have posted three previous posts. Over time > I have made significant progress towards getting a successful > build. I am now getting the following error: > > == > begin installing recommended package mgcv > * Installing *source* package 'mgcv' ... > ** libs > gmake[2]: Entering directory > `/tmp/RtmpOtsRnd/R.INSTALL2781446b/mgcv/src' > gcc -maix64 -pthread -std=gnu99 -I/usr/local/builddir/include > -I/usr/local/include -O2 -g -mcpu=power5 -c gcv.c -o gcv.o > gcc -maix64 -pthread -std=gnu99 -I/usr/local/builddir/include > -I/usr/local/include -O2 -g -mcpu=power5 -c gdi.c -o gdi.o > gdi.c: In function 'qr_ldet_inv': > gdi.c:294: error: expected identifier or '(' before numeric constant > gdi.c:308: error: lvalue required as unary '&' operand > gdi.c:308: error: lvalue required as unary '&' operand > gdi.c:316: error: 'j' undeclared (first use in this function) > gdi.c:316: error: (Each undeclared identifier is reported only once > gdi.c:316: error: for each function it appears in.) > gdi.c: In function 'get_detS2a': > gdi.c:617: error: expected identifier or '(' before numeric constant > gdi.c:620: error: 'Mf' undeclared (first use in this function) > gdi.c:636: error: 'max_col' undeclared (first use in this function) > . > ERROR: compilation failed for package 'mgcv' > * Removing '/usr/local/builddir/library/mgcv' > gmake[1]: *** [mgcv.ts] Error 1 > gmake[1]: Leaving directory > `/usr/local/builddir/src/library/Recommended' > gmake: *** [recommended-packages] Error 2 > make: The error code from the last command is 2. > > Stop. > == > > Initially I had mgcv 1.5-5 and I downloaded mgcv 1.5-6 and > tried again. I get the same error. > > I would really appreciate any help with this. > > Thanks. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] unable to compile mgcv
Thanks for your response. Can you please point me to the make file where I would make this change. Thanks. William Dunlap wrote: > The first offending line in gdc.c is > 294 int *pivot,i,TRUE=1,j; > and TRUE must be #defined in some AIX > include file. Change it to true or > add #undef TRUE prior to its use and it > may compile. > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] unable to compile mgcv
> -Original Message- > From: Chuck White [mailto:chuckwhi...@charter.net] > Sent: Wednesday, October 28, 2009 3:47 PM > To: r-devel@r-project.org; William Dunlap > Subject: RE: [Rd] unable to compile mgcv > > Thanks for your response. Can you please point me to the > make file where I would make this change. Thanks. If you untar src/library/Recommended/mgcv.tgz (sp?) this file will be in mgcv/src. I'm not sure of the best way to take care of it on AIX. It may be possible to #undef TRUE in include/R.h. The AIX system includes define it in many places, the most prominent of which is in types.h. If you cannot generally #undef TRUE in a global R include file then you will have to edit the C or h files in mgcv. > > William Dunlap wrote: > > The first offending line in gdc.c is > > 294 int *pivot,i,TRUE=1,j; > > and TRUE must be #defined in some AIX > > include file. Change it to true or > > add #undef TRUE prior to its use and it > > may compile. > > > > Bill Dunlap > > Spotfire, TIBCO Software > > wdunlap tibco.com > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel