[R] R crashes when .Fortran embeded function, is called twice in R

Rangrej, Jagadish rangrej at exchange.cheo.on.ca
Fri Feb 22 23:40:59 CET 2002


Hello,

I have few functions in fortran.. whose dll is generated and integrated with
C:\Pro..files\R\..library\...libs

Then I load the dll etc.. and call a R function, which inturn call the
function in dll, using .Fortran

Skeleton .Fortran call in R function:
	1. Set data (allocation ..)
	2. call the routine to evaluate (some simulation)
	3. unset data ( deallocation etc..)

Problem : 1st time I call, it works fine and gives the answer as expected.
If I call it second time without going out of R, then it fails and crashes
the R saying unknown error with Rgui.

FYI: I got calls to write/print which writes to the logfile instead to the
screen so no question of error due to printing, I think, I also checked with
allocation and deallocation sequence in setdata and unsetdata resp., it
should work as expected.

I will be very much thankful to you for helping me resolve this problem.

Thanks,
-Jag
	

Jagadish Rangrej ( Statistician )
CHEO Research Institute, Ottawa, ON
613-7383951

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list