Re: [R] DLL Memory Problem - Solved

From: Brian Habing <habing_at_stat.sc.edu>
Date: Sat 09 Apr 2005 - 01:46:09 EST

At 11:04 AM 4/8/2005, you wrote:
>Hello,
>
>I have created a .dll file using G77 and MinGW on my PC (Windows
>2000). After using dyn.load to bring it into R2.0.1, I then call the .dll
>through the function ccprox shown below. It returns the correct
>values. If I run it a second time though it returns different values, so
>it seems something is being placed oddly in memory.
>
>The Fortran subroutine beings with:
>
> integer tscore(maxexmn) /maxexmn*0/
> integer tstemp(maxexmn) /maxexmn*0/
> integer natscore(ncells) /ncells*0/
> integer natemp(ncells) /ncells*0/
>

These are only reset to zero the first time when its loaded. Putting the reset manually in the Fortran code fixes it. Thanks to anyone who had been thinking about it!

-Brian
habing@stat.sc.edu



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Apr 09 01:54:35 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:05 EST