Bug 114367 - g77 gcc-3.x.x: increase the number of possible file unit numbers for g77
Bug#: 114367 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: toolchain@gentoo.org Reported By: markusle@gentoo.org
Component: Core system
URL: 
Summary: g77 gcc-3.x.x: increase the number of possible file unit numbers for g77
Keywords:  
Status Whiteboard: 
Opened: 2005-12-03 10:04 0000
Description:   Opened: 2005-12-03 10:04 0000
Currently, fortran code compiled with g77 (gcc-3.x) can only use a maximum of
100    
file units due to a hard coded limit     

#define MXUNIT 100     

in gcc-3.x.x/libf2c/libI77/fio.h (see "info g77" and  MXUNIT for more details). 

The quantum chemistry code sci-chemistry/gamess which I am maintaining    
has recently introduced new functionality which requires access to more    
than 100 file units (300, to be precise) and these routines, therefore, don't   
run properly with our current g77 setup. Future development of the code   
will likely increase the number of routines that will have to have access to    
larger file units.   

I would therefore like to ask if it would be possible to increase the number of 
available file units in our g77 installs and I've attached a patch that
accomplishes 
this and works fine on my system (pentium 4m, gcc-3.4.4-r1).  
Unfortunately, I don't know the internals of gcc very well and can't judge if
this patch 
introduces any unpleasant side effects. If not, I would be very grateful if you
could 
consider including this change.  

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Markus Dittrich 2005-12-03 10:06:06 0000 -------
Created an attachment (id=73990) [details]
patch to increase the number of available file descriptors for g77

------- Comment #2 From SpanKY 2005-12-03 12:44:37 0000 -------
added to patch list for 3.3.6/3.4.4 ... it'll be in next patchset we roll

------- Comment #3 From Markus Dittrich 2005-12-03 13:22:59 0000 -------
Thanks for the immediate response and great:) 
 
cheers, 
Markus