This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds
- From: Steve Chapel <steven dot chapel at sbcglobal dot net>
- To: fortran at gcc dot gnu dot org
- Date: Mon, 16 Jul 2007 13:21:30 -0400
- Subject: Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=fHLeky5aI1KJ4QiDQrkNbIL4zzBsM7rwzADf0Sw1U7TY591Y3W/+m0SDbetQSNpthM6HUC7tygkCBfVczHo4dajD503X2yO5/5z9L2Kty1WZpbPmDhM6dBbDShDSdRR8X4G38omZAc/vEjtkwgD+ySFoah3v1eYgXSf4j/lm+8k= ;
- References: <469B7DDE.1050500@sbcglobal.net> <640ad44b0707160735g1161e839gcd20c70b239806a4@mail.gmail.com> <469B8F1B.7060508@sbcglobal.net>
Steve Chapel wrote:
After fixing all executables and libraries to use gfortran, the
program compiled and ran, but I got a Fortran runtime error: Bad file
descriptor. It also shows the offending source code line as "(unit=29,
file='CONOUT$')". Should CONOUT$ be con instead?
My problems with gfortran now boil down to a problem demonstrated by the
following program:
character*72 fnint
data fnint /'con'/
i=index(fnint,' ');
open(unit=29,file=fnint(1:i-1))
write(29,100)
100 format('1Hello, world!')
end
C At line 4 of file bug.for (unit = 29, file = '')
C Fortran runtime error: File 'con' does not exist
This is a pared-down example that shows the error I'm getting with
NONMEM. Basically, fnint is a character string that defines where output
should go. Can someone point out a bug in the above code, and show how I
can get the desired result? Or is this a bug in gfortran?
Thanks,
Steve