PDA

View Full Version : RE: [LF] File number limit problem


Lahey Support
08-15-2003, 01:33 AM
Hi Terrence

I attach the code that I have modified to allow compilation on f95 as fixed
format code. I amended your continuation line which was free format, changed
the file open status to 'replace', and the open unit to 'k+10' to avoid any
default units such as 5 and 6 (console and screen), and changed the screen
write to 'OPENING K ' to be consistent.

It appears to have successfully (?) run on both my NT machine and a W95
(probably 'b') machine in the office. In both cases, I used the 'doshere'
application to call up a DOS box. Your routine produced empty files
numbered 1 to 30 in both cases.

However, it will not operate in 'real' (boot to) DOS, because mine is a
Windows compilation (f95). I didn't really want to modify the code to
standard f77 (or use f90) before finding out a little more about your
problem.

If you get in touch (off the Lahey user group) with some more details about
your compiler, maybe I can run some more trials to test whether it is W95
that is causing the problem - or something else.



Gaz


-----Original Message-----
From: terence wright [address removed]
Sent: Monday, 27 August 2001 10:59
To: [address removed]
Subject: [LF] File number limit problem


About Svend Boholm's test of open files permitted in Windows 95.

The important thing is WAS THE TEST IN A DOS WINDOW?

The problem I reported is on all of our Windows 95 machines
and all of our clients Windows 95 machines, but only spanish
language versions, so far. Windows 95 Version 4.00.1111 (spanish).

I have made MORE extensive tests now, trying all kinds of
config.sys entries. I have also recompiled the offending program
with a tracer of what is happening in the ASM part;
- very interesting!

Under a BOOT from DOS in a Windows 95 machine, the first create
file operation fails, because the error flag is set by DOS,
but the reason code is ZERO (!) and the file is NOT created.
That is an illegal situation! The code should be 3,4 or 5 only!

The SAME program runs in a pure DOS v6.0 boot, a boot under
Windows 3.1, and in a DOS Window of 3.1. It ran in NT.

It ALSO runs in a DOS window under Windows 95, but fails when
20 files are open, reason given code #23 which corresponds
to "Not enough FCB's", but probably means "not enough file handles".

We tried running an elf90 version, but it refused to open as 'NEW'
any file with the same name as an existing one in the directory.
In other words, the test would run once, but not twice!

One client reported crashing after opening 29 files; I wish I new
what the difference was (it's the same file and program copy we
are testing), but possibly a different Windows 95 type ID.

We have TWO problems:

1) No DOS program that CREATES a file will run at all in a
DOS BOOT on a computer running Windows 95.
The error reported is "cannot create file" .
So there is something funny OUTSIDE of WINDOWS itself, but STILL
running the DOS of Windows 95.

2) We cannot get Windows 95 to accept a number of file higher
than 20. It seems to ignore the Config.sys entry
(upper or lower case).

(Sigh)

Anybody who wants to try, this program will test your computer
under Windows 95! It can be made to run to completion by closing
files, leaving only 4 up to 20 open at the same time.
And try running it twice!!!
Remember to clean out the 20 files ????????.$$$ it creates!

Terence Wright

F90 version:
PROGRAM T
IMPLICIT NONE
CHARACTER(LEN=12) :: CFILE
INTEGER :: K,I
DO I=1,30
K=I+4
WRITE(CFILE,902) 'CWORK',I,'.$$$'
WRITE(*,901) K,CFILE
OPEN (K,FILE=CFILE,STATUS='NEW',FORM='UNFORMATTED',&
ACCESS='SEQUENTIAL')
! if it crashes early, try this adding this next line, it works!
! CLOSE (I)
END DO
STOP
901 FORMAT(' OPENING I=',I2,' ',A12)
902 FORMAT(A5,I3.3,A4)
END PROGRAM T

----------------------------------------------------------
To unsubscribe, send to [address removed] the following
as the first and only line of the message body:
unsubscribe fortran
----------------------------------------------------------



************************************************** **********************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.

Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.

If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************** **********************