From chuck at sharpsteen.net  Tue Apr 13 23:06:47 2010
From: chuck at sharpsteen.net (Sharpie)
Date: Tue, 13 Apr 2010 13:06:47 -0800 (PST)
Subject: [Rd] .Fortran interface error
In-Reply-To: <42789.86.0.54.218.1271190033.squirrel@paleo.ija.csic.es>
References: <48821.86.0.54.218.1271155366.squirrel@paleo.ija.csic.es>
	<42789.86.0.54.218.1271190033.squirrel@paleo.ija.csic.es>
Message-ID: <1271192807347-1839012.post@n4.nabble.com>



jgarcia-2 wrote:
> 
> Yes!!!!!!!! That's it! Thanks a lot!!!!!!
> Changing UNIT=5 in the F95 code by UNIT=7 solves the collision.
> 
> Thank you very much Charlie, I've spent a lot of hours with this.
> 

I'm glad it worked!

Google seems to indicate that units 0, 5, 6, 100, 101 and 102 are special in
Fortran.  However, the professor who taught me Fortran recommended using
unit numbers that were 11 or greater as his experience with several Fortran
compilers was that they tended to appropriate units <= 10 for their own uses
and this behavior was not well standardized.

I haven't been able to verify this myself, but there may be something to his
warning.


jgarcia-2 wrote:
> 
> Still
> 
> R -d valgrind --vanilla < foofortran.Rcheck/foofortran-Ex.R
> 
> gives 3 errors (two "Invalid read of size 8" and one "Syscall param
> write(buf) points to uninitialised byte(s)"), which are the same it gave
> with UNIT=5. However, everything seems to work fine now in the normal
> execution :-)
> 
> Thank you very much again
> 
> Javier
> 

I'm not well acquainted with valgrind so I can't offer any advice on this
part :(

Good luck!

-Charlie

-----
Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: http://n4.nabble.com/Fortran-interface-error-tp1838225p1839012.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] .Fortran interface error
Sharpie