Hi Ludovic.
There are at least two possible explanations for this behaviour.
1) There is a bug in the recently changed code in R to find
routines in C and Fortran libraries.
2) The routine that you are .Call()'ing is doing something
that has confused the R internals and makes the next R commands
not work, and potentially this is not reproducible.
If this is not proprietary or confidential code, you can send the C
code and instructions as to how to call it from R (that is, provide
simple values for the bankpath, accn, indexpath, key, beg and end
arguments), then I can see if the computations are potentially
writing over other values in memory.
Also, you can try a invoking a very simple .Call() routine
many times to see if that displays the same failure. For example,
put the following C code in a file named simpleCall.c
#include "Rinternals.h"
SEXP
simpleCall()
{
static int count = 0;
SEXP ans;
PROTECT(ans = allocVector(INTSXP, 1));
INTEGER(ans)[0] = count++;
UNPROTECT(1);
return(ans);
}
Then, compile this with
R CMD SHLIB simpleCall.c
and call it from R in the following way
> dyn.load("simpleCall.so")
> for(i in 1:10) { print(.Call("simpleCall")) }
If this works, it won't determine whether it is 1) or 2) (or any other
possible reason), but if it doesn't work, we will have a lot more
information.
Thanks,
Duncan
lcottret@yahoo.fr wrote:> Full_Name: Ludovic Cottret
> Version: R 1.3.0
> OS: Linux
> Submission from: (NULL) (157.136.20.138)
>
>
> I have a R function which call a C function by the instruction
".Call".
> The first time I call the R function in a R session, it perfectly runs. But
the
> next
> times, R returns this error message :
>
> Error in .Call("", bankpath, accn, indexpath, key, beg, end) :
> .Call function name not in load table
>
> The function name has disappeared !!
> This function well runs on Mandrake 7.2 but not in Mandrake 8.0. Why ?!?
>
> Thanks for your answers...
> PS : Excuse my poor english...
>
>
>
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To:
r-devel-request@stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
--
_______________________________________________________________
Duncan Temple Lang duncan@research.bell-labs.com
Bell Labs, Lucent Technologies office: (908)582-3217
700 Mountain Avenue, Room 2C-259 fax: (908)582-3340
Murray Hill, NJ 07974-2070
http://cm.bell-labs.com/stat/duncan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._