[Rd] make check seg faults at base-Ex.R [was Re: Compile problem R 2.2.0 + Solaris 10 x86]
Hi Prof Ripley, The "problem" seems to go away by using gmake instead of /usr/ccs/bin/make. Compilation is successful, but now, I get core dump during make check. == gmake[1]: Entering directory `/tmp/apps/R-2.2.0-32/tests' gmake[2]: Entering directory `/tmp/apps/R-2.2.0-32/tests' gmake[3]: Entering directory `/tmp/apps/R-2.2.0-32/tests/Examples' gmake[4]: Entering directory `/tmp/apps/R-2.2.0-32/tests/Examples' gmake[4]: Leaving directory `/tmp/apps/R-2.2.0-32/tests/Examples' gmake[4]: Entering directory `/tmp/apps/R-2.2.0-32/tests/Examples' collecting examples for package 'base' ... gmake[5]: Entering directory `/tmp/apps/R-2.2.0-32/src/library' >>> Building/Updating help pages for package 'base' Formats: text html latex example gmake[5]: Leaving directory `/tmp/apps/R-2.2.0-32/src/library' running code in 'base-Ex.R' .../bin/bash: line 1: 24337 Segmentation Fault (core dumped) ../../bin/R --vanilla base-Ex.Rout 2>&1 gmake[4]: *** [base-Ex.Rout] Error 1 gmake[4]: Leaving directory `/tmp/apps/R-2.2.0-32/tests/Examples' gmake[3]: *** [test-Examples-Base] Error 2 gmake[3]: Leaving directory `/tmp/apps/R-2.2.0-32/tests/Examples' gmake[2]: *** [test-Examples] Error 2 gmake[2]: Leaving directory `/tmp/apps/R-2.2.0-32/tests' gmake[1]: *** [test-all-basics] Error 1 gmake[1]: Leaving directory `/tmp/apps/R-2.2.0-32/tests' gmake: *** [check] Error 2 == Stack trace of core file: == # pstack tests/Examples/core core 'tests/Examples/core' of 24337: /tmp/apps/R-2.2.0-32/bin/exec/R --vanilla 08107de4 RunGenCollect (0) + c1c 0810c424 do_memoryprofile (941180c, 832f178, 82e1f50, 94117d4) + 2a8 081153c2 do_internal (9411844, 8325284, 82e1f50, 94117d4) + e2 080da4f8 Rf_eval (9411844, 94117d4) + 700 080dab59 Rf_applyClosure (9411b00, 9411860, 82e1f50, 8336ff4, 82e1f50) + 335 080da0ae Rf_eval (9411b00, 8336ff4) + 2b6 081025b7 R_ReplConsole (8336ff4, 0, 0) + 37b 08103651 Rf_mainloop (bfffb824, 8047940, 8047a30, 8047978, 8065a1a, 2) + 45 08065b7d main (2, 8047984, 8047990) + 19 08065a1a (2, 8047a98, 8047ab8, 0, 8047ac2, 8047ad9) == Have tried with no optimisation flags but still, make check fails at the same spot. Any clues on what should I be checking on? Thanks for the help. Cheers, Daniel --- Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > I can't solve this as I think the problem occurred > earlier. bratio is > defined in src/nmath/toms708.o included in > src/nmath/libmath.a > > Take a look at what was built in src/nmath. > > On Wed, 12 Oct 2005, Daniel Wong wrote: > > > Hi! > > > > I'm trying to compile R (32-bit) on Solaris 10 x86 > > using Sun Studio 10 + Sun Perflib (for BLAS and > > LAPACK) but encountered issues with undefined > symbol > > "bratio". Appreciate any help. > > > > Compiler options (from configure output): > > == > > R is now configured for i386-pc-solaris2.10 > > > > Source directory: . > > Installation directory:/usr/local > > > > C compiler:cc -g -O > -xtarget=opteron > > -D__NO_MATH_INLINES -g -O -xtarget=opteron > > C++ compiler: CC -gO > -xtarget=opteron > > -gO -xtarget=opteron > > Fortran compiler: f77 -g -O > > -xtarget=opteron -gO -xtarget=opteron > > > > Interfaces supported: X11 > > External libraries:readline, > BLAS(SunPerf) > > Additional capabilities: PNG, JPEG, MBCS, NLS > > Options enabled: R profiling > > > > Recommended packages: yes > > > > configure: WARNING: you cannot build DVI versions > of > > the R manuals > > configure: WARNING: you cannot build PDF versions > of > > the R manuals > > == > > > > Compile error: > > == > > ... > > cc -g -O -xtarget=opteron -L/opt/SUNWspro/lib > > -L/usr/lib -L/usr/sfw/lib -L/opt/sfw/lib -o R.bin > > Rmain.o CConverters.o CommandLineArgs.o > Rdynload.o > > Renviron.o RNG.o apply.o arithmetic.o apse.o > array.o > > attrib.o base.o bind.o builtin.o character.o > > coerce.o colors.o complex.o connections.o > context.o > > cov.o cum.o dcf.o datetime.o debug.o deparse.o > > deriv.o dotcode.o dounzip.o dstruct.o duplicate.o > > engine.o envir.o errors.o eval.o format.o > fourier.o > > gevents.o gram.o gram-ex.o graphics.o identical.o > > internet.o iosupport.o lapack.o list.o logic.o > > main.o mapply.o match.o memory.o model.o names.o > > objects.o optim.o optimize.o options.o par.o > paste.o > > pcre.o platform.o plot.o plot3d.o plotmath.o > print.o > > printarray.o printvector.o printutils.o qsort.o > > random.o regex.o registration.o relop.o > saveload.o > > scan.o seq.o serialize.o size.o sort.o source.o > > split.o sprintf.o startup.o subassign.o > subscript.o > > subset.o summary.o sysutils.o unique.o util.o > > version.o vfonts.o xxxpr.o ../unix/libunix.a > > .
[Rd] GUI error. (PR#8204)
Full_Name: Ian G Version: latest OS: win xp pro sp1 Submission from: (NULL) (193.1.209.251) step one start the r project any way you like step two type "demo()" and press return step three press then shortcut button to open file 'just under the file menu' while then demp screen is up the program seem not to like to open a new file when the window demo window is active. the error can be reproduce easly. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Using matprod from array.c
Hi, I was wondering if I could use the matprod function from array.c in my own C routine. I tried the following as a test /* my_matprod.c */ # include /* for REAL, SEXP etc */ # include /* array.c says need for dgemm */ /* following copied from array.c */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; int i, j, k; double one = 1.0, zero = 0.0, sum; Rboolean have_na = FALSE; if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) { /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 * The test is only O(n) here */ for (i = 0; i < nrx*ncx; i++) if (ISNAN(x[i])) {have_na = TRUE; break;} if (!have_na) for (i = 0; i < nry*ncy; i++) if (ISNAN(y[i])) {have_na = TRUE; break;} if (have_na) { for (i = 0; i < nrx; i++) for (k = 0; k < ncy; k++) { sum = 0.0; for (j = 0; j < ncx; j++) sum += x[i + j * nrx] * y[j + k * nry]; z[i + k * nrx] = sum; } } else F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one, x, &nrx, y, &nry, &zero, z, &nrx); } else /* zero-extent operations should return zeroes */ for(i = 0; i < nrx*ncy; i++) z[i] = 0; } /* test function: matrix multiplication of nr by nc matrix with nc-vector */ SEXP my_matprod(SEXP M, SEXP v, SEXP nr, SEXP nc) { R_len_t nrm = INTEGER(nr)[0], ncm = INTEGER(nc)[0]; SEXP ans; PROTECT(ans = allocMatrix(REALSXP, nrm, 1)); matprod(REAL(M), nrm, ncm, REAL(v), ncm, 1, REAL(ans)); UNPROTECT(1); return(ans); } When I try to make the DLL I get the following D:\C_routines>RCMD SHLIB my_matprod.c making my_matprod.d from my_matprod.c gcc -IC:/R/tex/R-2.2.0/include -Wall -O2 -c my_matprod.c -o my_matprod.o ar cr my_matprod.a my_matprod.o ranlib my_matprod.a gcc --shared -s -o my_matprod.dll my_matprod.def my_matprod.a -LC:/R/tex/R-2. 2.0/src/gnuwin32 -lg2c -lR my_matprod.a(my_matprod.o)(.text+0x19a):my_matprod.c: undefined reference to `dg emm_' collect2: ld returned 1 exit status make: *** [my_matprod.dll] Error 1 I'm using Windows XP and I'm using the MinGW gcc. It works fine if I comment out the Fortran call so that the method for have_na is always used. Do I need to include another header file to use dgemm? Is there a better way to use matprod than just to copy the code? Any help appreciated, Heather Dr H Turner Research Assistant Dept. of Statistics The University of Warwick Coventry CV4 7AL Tel: 024 76575870 Url: www.warwick.ac.uk/go/heatherturner __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using matprod from array.c
You need to link against -lRblas as well, since that is where the BLAS library entry points are. See `Writing R Extensions' for a platform-independent way to do this via variables in Makevars (you need ${BLAS_LIBS) $(FLIBS)). On Wed, 12 Oct 2005, Heather Turner wrote: > Hi, > > I was wondering if I could use the matprod function from array.c in my own C > routine. I tried the following as a test > > /* my_matprod.c */ > > # include /* for REAL, SEXP etc */ > # include /* array.c says need for dgemm */ > > /* following copied from array.c */ > static void matprod(double *x, int nrx, int ncx, > double *y, int nry, int ncy, double *z) > { >char *transa = "N", *transb = "N"; >int i, j, k; >double one = 1.0, zero = 0.0, sum; >Rboolean have_na = FALSE; > >if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) { > /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 >* The test is only O(n) here >*/ > for (i = 0; i < nrx*ncx; i++) > if (ISNAN(x[i])) {have_na = TRUE; break;} > if (!have_na) > for (i = 0; i < nry*ncy; i++) > if (ISNAN(y[i])) {have_na = TRUE; break;} > if (have_na) { > for (i = 0; i < nrx; i++) > for (k = 0; k < ncy; k++) { > sum = 0.0; > for (j = 0; j < ncx; j++) > sum += x[i + j * nrx] * y[j + k * nry]; > z[i + k * nrx] = sum; > } > } else > F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one, > x, &nrx, y, &nry, &zero, z, &nrx); >} else /* zero-extent operations should return zeroes */ > for(i = 0; i < nrx*ncy; i++) z[i] = 0; > } > > /* test function: matrix multiplication of nr by nc matrix with nc-vector */ > SEXP my_matprod(SEXP M, SEXP v, SEXP nr, SEXP nc) { > R_len_t nrm = INTEGER(nr)[0], ncm = INTEGER(nc)[0]; > SEXP ans; > > PROTECT(ans = allocMatrix(REALSXP, nrm, 1)); > matprod(REAL(M), nrm, ncm, > REAL(v), ncm, 1, REAL(ans)); > UNPROTECT(1); > return(ans); > } > > When I try to make the DLL I get the following > D:\C_routines>RCMD SHLIB my_matprod.c > making my_matprod.d from my_matprod.c > gcc -IC:/R/tex/R-2.2.0/include -Wall -O2 -c my_matprod.c -o my_matprod.o > ar cr my_matprod.a my_matprod.o > ranlib my_matprod.a > gcc --shared -s -o my_matprod.dll my_matprod.def my_matprod.a > -LC:/R/tex/R-2. > 2.0/src/gnuwin32 -lg2c -lR > my_matprod.a(my_matprod.o)(.text+0x19a):my_matprod.c: undefined reference to > `dg > emm_' > collect2: ld returned 1 exit status > make: *** [my_matprod.dll] Error 1 > > I'm using Windows XP and I'm using the MinGW gcc. It works fine if I comment > out the Fortran call so that the method for have_na is always used. > > Do I need to include another header file to use dgemm? Is there a better way > to use matprod than just to copy the code? > > Any help appreciated, > > Heather > > > Dr H Turner > Research Assistant > Dept. of Statistics > The University of Warwick > Coventry > CV4 7AL > > Tel: 024 76575870 > Url: www.warwick.ac.uk/go/heatherturner > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] SPSS I/O dll was: 8 char labels in read.spss
Thomas Lumley schrieb: >On Tue, 11 Oct 2005, Knut Krueger wrote: > > >>I found a definition of the SPSS files. >>http://www.wotsit.org/download.asp?f=spssdata >>but they recommend to use the spss input/output dll to ensure upward >>compatbility >> >> >> > >"Well, they would say that, wouldn't they" (Rice-Davis 1963) > >Unfortunately, that document is an old file format. It doesn't describe >record 7 subtype 13, which is where the long variable names live. > What about using the SPSS input dll for those R users which would like to use their old SPSS files. Most universities here have SPSS licences and therefor the dll is available. I did not found yet any copyright notice on the developer part of the SPSS CD. Maybe the DLL is usable with the own program without the SPSS Licence. I will look for that if using the I/O dll is possible with R. All necessary C codes are delivered with the developer kit on the SPSS CD. Regards Knut [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] SPSS I/O dll was: 8 char labels in read.spss
On Wed, 12 Oct 2005, Knut Krueger wrote: > Thomas Lumley schrieb: >> On Tue, 11 Oct 2005, Knut Krueger wrote: >>> I found a definition of the SPSS files. >>> http://www.wotsit.org/download.asp?f=spssdata >>> but they recommend to use the spss input/output dll to ensure upward >>> compatbility >>> >> "Well, they would say that, wouldn't they" (Rice-Davis 1963) >> >> Unfortunately, that document is an old file format. It doesn't describe >> record 7 subtype 13, which is where the long variable names live. >> > What about using the SPSS input dll for those R users which would like to use > their old SPSS files. Most universities here have SPSS licences and therefor > the dll is available. > I did not found yet any copyright notice on the developer part of the SPSS > CD. Maybe the DLL is usable with the own program without the SPSS Licence. I > will look for that if using the I/O dll is possible with R. > All necessary C codes are delivered with the developer kit on the SPSS CD. > Yes, but it can't be incorporated in the "foreign" package, which has a GPL license, and in any case wouldn't work off Windows. It's not clear that it would be much easier than using the PSPP code in any case. -thomas __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] SPSS I/O dll was: 8 char labels in read.spss
Thomas Lumley schrieb: >Yes, but it can't be incorporated in the "foreign" package, which has a >GPL license, and in any case wouldn't work off Windows. It's not clear >that it would be much easier than using the PSPP code in any case. > > > Seems that it is easier to save as Excel files and using read.xls and if active pearl is not available open Excel and save as .csv file ... or using 8 character variable identifier Knut __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] rgl package demo causes R memory corruption under Windows
Hello, Running the rgl demo package (demo(rgl)) causes memory corruption when used with R 2.2.0 under Windows. I tested on two Windows systems: Windows 2000 and Windows XP. When you terminate R after running the demo you get a message about the application trying to reference invalid memory. If you try to run another application in R after running the rgl demo it typically fails. Dominick __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] recommendation for web interface to R
Hi list, The task I am facing is, I need to work on a web interface (which is based on java) for R, user selects statistical methods he wants, then submits them to back R computing engine, the results (estimates or test results) can be returned to user on webpage. The statistical methods may not be simple functions like lm(), ks.test(), but some functions written by statisticians. I checked R-Gui projects http://www.sciviews.org/_rgui/, it seems Rserve is what I want. But there may be other tools. Has anybody done comparisons among these java-R interfaces? Is Rserve stable enough (for all kinds exceptions)? Engineers care more about the system robustness. I would like to hear any comments and suggestions. Thanks, Tib -- I am Tib, not Rob. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] additional comments on building R with PGI compiler
Hi, I have additional comments on building R with PGI compiler. If one wants to use external BLAS library, then pgf90 instead of pgf77 should be used, and BLAS_LIBS flags should be set. e.g. F77 = $PG_HOME/bin/pgf90 BLAS_LIBS='-L/opt/acml2.7.0/pgi64/ -lacml' # for ACML library BLAS_LIBS='-L/usr/lib64 -lg2c -lblas' # for generic BLAS library that comes with OS distribution. Regards, Jennifer __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] GUI error. (PR#8204)
[EMAIL PROTECTED] wrote: > Full_Name: Ian G > Version: latest Please tell us which version. There are at least three versions which might be called "latest", and by tomorrow two of them may well be different. > OS: win xp pro sp1 > Submission from: (NULL) (193.1.209.251) > > > step one > start the r project any way you like > step two > type "demo()" and press return > step three > press then shortcut button to open file 'just under the file menu' > while then demp screen is up > the program seem not to like to open a new file when the window demo window is > active. > the error can be reproduce easly. Not reproducible for me in 2.2.0. Things worked just as I'd expect. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] SPSS I/O dll was: 8 char labels in read.spss
Knut Krueger wrote: > > Thomas Lumley schrieb: > > >>On Tue, 11 Oct 2005, Knut Krueger wrote: >> >> >> >>>I found a definition of the SPSS files. >>>http://www.wotsit.org/download.asp?f=spssdata >>>but they recommend to use the spss input/output dll to ensure upward >>>compatbility >>> >>> >>> >> >>"Well, they would say that, wouldn't they" (Rice-Davis 1963) >> >>Unfortunately, that document is an old file format. It doesn't describe >>record 7 subtype 13, which is where the long variable names live. >> > > What about using the SPSS input dll for those R users which would like to use > their old SPSS files. If you have that file, then presumably you have SPSS, and can ask it to output a documented file format. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel