[R] RE: R crashes when .Fortran embeded function, is called twice in R --> solved

Rangrej, Jagadish rangrej at exchange.cheo.on.ca
Mon Feb 25 21:13:57 CET 2002


Hi all,

Thanks to everybody who thought on this problem, there was slight mistake in
the fortran code which lead to NULL pointer allocation error, but still it
surprises me that why it does not crib in the first run. The compiler I am
using is absoft fortran compiler.

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


> -----Original Message-----
> From: Rangrej, Jagadish 
> Sent: Friday, February 22, 2002 5:41 PM
> To: 'r-help at stat.math.ethz.ch'
> Subject: R crashes when .Fortran embeded function, is called 
> twice in R
> 
> 
> 
> 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