similar to: too many arguments in foreign function call

Displaying 20 results from an estimated 40000 matches similar to: "too many arguments in foreign function call"

2001 Jul 18
3
Summary: too many arguments in foreign function call
OK, to summarize and clarify a bit 1) I downloaded some code that existed in "pure" FORTRAN, FORTRAN+S-Plus, and FORTRAN+R versions. 2) I discovered that the primary difference between R and S-Plus version was the use of a wrapper to reduce the number of arguments from 87 to 65. When I inquired why, the author of the code replied "R won't take more than 65 arguments to
2002 Jun 12
3
help debugging segfaults
(Sorry for the cross-post--- I wasn't sure which list is more appropriate...) Hi everyone, I've run into segfaults when using my randomForest package on large dataset (e.g., 100 x 15200) and large number of trees (e.g., ntree=7000 and mtry=3000). I'm wondering if anyone can give me some hints on where to look for the problem. The randomForest package mainly consists of two things:
2002 Jun 12
3
help debugging segfaults
(Sorry for the cross-post--- I wasn't sure which list is more appropriate...) Hi everyone, I've run into segfaults when using my randomForest package on large dataset (e.g., 100 x 15200) and large number of trees (e.g., ntree=7000 and mtry=3000). I'm wondering if anyone can give me some hints on where to look for the problem. The randomForest package mainly consists of two things:
2006 Dec 13
2
capturing value of C or Fortran function
Re: src/main/dotcode.c:do_dotCode() The value, if there is one, of a function called by .C or .Fortran is not captured, so one needs a wrapper. To avoid that, the user would have to declare that there is a value, specify its type, and supply an R variable to hold the value. Presumably, all of these could be combined in a new "VALUE=var" parameter. Then do_dotCode could arrange the
2002 Jun 18
1
can't find array overruns (was: help debugging segfaults)
Dear R-devel, Last week I got several responses to my question about debugging segfaults in my code (original post below). After I changed the S_alloc() calls to Calloc()/Free(), the symptom was gone, but I was told to keep looking. So I did: o Switched to Calloc/Free. Electric Fence did not find any problem. o Put assert(index < bound); assert(index >=0); everywhere in the C routine
2010 Oct 27
2
must .Call C functions return SEXP?
For using R's .Call interface to C functions, all the examples I've seen have the C function return type SEXP. Why? What does R actually do with this return type? What happens if I *don't* return a SEXP? Reason I ask, is I've written some R code which allocates two long lists, and then calls a C function with .Call. My C code writes to those two pre-allocated lists, thus, I
2015 Feb 05
2
Invalid read of size 8
Hi, I have a R program that call a C function. I define a vector of pointer as int nLC=3; int pownLC = nLC*nLC double *MatCovExtra[nT+1]; for(k=0;k<K+1;k++) { MatCovExtra[k] = (double*)R_alloc(pownLC, sizeof(double)); } where nT>K. Then i put some values on the vector associated with the pointer: for(k=0;k<K+1;k++) { for(i=0;i<nLC;i++)
2013 Mar 01
1
predict.loess() segfaults for large n?
Hi, I am segfaulting when using predict.loess() (checked with r62092). I've traced the source with the help of valgrind (output pasted below) and it appears that this is due to int overflow when allocating an int work array in loess_workspace(): liv = 50 + ((int)pow((double)2, (double)D) + 4) * nvmax + 2 * N; where liv is an (global) int. For D=1 (one x variable), this overflows at
2007 Feb 08
1
supsmu(periodic=TRUE) can crash R by reading before start of array (PR#9502)
supsmu(periodic=TRUE) can crash R by reading before start of array. To reproduce: set.seed(1) xx <- runif(29000) yy <- rnorm(29000) span <- 0.49 i <- 1 while(i < 200){ cat(i,"\n") int <- supsmu(xx,yy,periodic=T,span=span) i <-i+1 } results in: 1 2 3 4 5 6 7 8 9 Program received signal SIGSEGV,
2009 Jun 06
1
Qs on calling R from C
Consider the following simple C program: /*** hello_r.c ***/ #include <Rinternals.h> SEXP hello() { return mkString("Hello, world!\n"); } int main(void) { SEXP x = hello(); return x == NULL; /* i.e. 0 on success */ } This program segfaults: % myR/bin/R CMD LINK gcc -I./R-2.9.0/src/include -L./myR/lib64/R/lib -lR hello_r.c -o hello_r > /dev/null % hello_r zsh:
1999 Jul 02
2
segfault on Sparc Linux (RH6.0)
We are having problems building R on Red Hat Linux 6.0/Sparc. R compiles with no problem but then it fails "make tests". Specifically, the line eigen(cbind(-1,c(1:2,0),0:2)) # complex values causes a segmentation fault. Previous versions of Red Hat Linux did not give this problem. The eigen() function is one of the rare cases in the base library where Fortran code is called via the
1997 Aug 25
2
R-alpha: eigen and batch
Batch: Putting q(save=F) at the end of my file does not work in my context because I can no longer source the file without quitting. I have that quit statement in my .First so that I always quit that way interactively. The problem is that it is ignored in batch. eigen: The crash occurs on my 586 running Red Hat Linux 2.0.27 but not on my son's 486 running SLackware Linix 2.0.29. We both
1999 Sep 06
1
Fortran character strings
Has anyone ever successfully used Fortran character strings with R? ?Foreign says R C Fortran integer int * integer .... character char ** [compiler dependent] Character strings are passed as C arrays of character strings to Fortran: the first string may be usable if its length is passed
2012 May 04
4
[patch] Behavior of .C() and .Fortran() when given double(0) or integer(0).
Dear R-devel, While tracking down some hard-to-reproduce bugs in a package I maintain, I stumbled on a behavior change between R 2.15.0 and the current R-devel (or SVN trunk). In 2.15.0 and earlier, if you passed an 0-length vector of the right mode (e.g., double(0) or integer(0)) as one of the arguments in a .C() call with DUP=TRUE (the default), the C routine would be passed NULL (the C
2005 Aug 26
3
.Call and Segmentation Fault
Hello to everyone! I use .Call to call a C function without arguments wich calls a fortran optimization package. My C function uses others C and Fortran functions and it works fine when I call it from a main() in a C program. But when I call it from R with .Call("name_of_the_c_function"), R gives me some weird output. This weird output is a worng answer to my optimization problem
2002 Nov 11
2
R 1.6.1: help with debugging error in RunGenCollect(), R_gc_internal
Hi, [System info: R 1.6.1 compiled from source (no args to configure) on Redhat 7.1 Linux i/386] I have some spatial statistics programs that recently (since R 1.6.1) have generated SIGSEGV. These R programs use the splancs library as well as some C code of my own for Voronoi analysis. The program has a big loop to fit various model parameters against a spatial distribution of biological
2005 Jul 19
2
segfault with grid and null unit (PR#8014)
Full_Name: Jonathan Paisley Version: 2.1.1 OS: Mac OS X 10.4.2 Submission from: (NULL) (81.178.107.67) I was following an example from library/grid/doc/grid.pdf ("Introduction to grid") and had the following code, where I'd mis-typed 1,3 instead of 1,2 as the first arguments to grid.layout. Sourcing this code causes the R GUI to crash. I've enclosed a partial backtrace from
1997 Aug 22
2
R-alpha: eigen
eigen(matrix(rep(1,9),ncol=3),only.values=T) works repeatedly but eventually (after 3 or 4 goes) gave a core dump of 11mb (I think only the first answer was right). if I type gc() immediately after the first call, I get a core dump right away (this might possibly be related to my huge core dumps with nlm) eigen(matrix(rep(1,9),ncol=3)) core dumps immediately after the first call Jim
1997 Aug 08
4
R-alpha: Second patch for 0.50-a1
A second patch for R-0.50-a1 is available from ftp://stat.auckland.ac.nz/pub/R The patch produces the following changes o cpoly problem with pow_di fixed. o legend had a call to "text" with an incorrect argument tag. Changed "text" to "labels". o The variable "dup" was uninitialised in the function "naoktrim" in
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded C functions on a Sparc 10 with R compiled using cc (both R-0.49 and R-0.50). I get sporadic errors with the error message: Error: character variables must be duplicated in .C/.Fortran, with C functions which pass character variables. my C functions look like: anyfunc(char **filename, other variables ) This error message appears about 25%