Re: interface blocks



>>> If you want the most thorough checking, you put your procedures in
>>> modules. That doesn't have a very close C/C++ analogue. The closest I
>>> can come is that the Fortran compiler auto-generates an equivalent of a
>>> C header file, including function prototypes.
>>
>> Can I put all 3500 subroutines (and functions) into one module ?
>
> Sure. Except the resulting object code might cause indegestion for
> some compilers. At least one of the major vendors has (maybe it
> has been fixed but they have not publicized it if so!) a code
> relocation scheme suitable for folks who keep their subroutines
> below some huge size. The module looks like a single subroutine
> to them and suddenly huge is not very big any more. Their relocation
> dictionary overflowed at 32k entries or some such technical glitch.

OPen Watcom F77 says that we have 500,000 symbols since we have
to compile our code with global SAVE and ZERO turned on.

> You will have to watch the semantics of external functions.
> The old good practice of declaring external functions will be asking
> for things outside the module and will cause trouble. If you are
> passing subroutine names the same issue arises.

Uh, we do that extensively for the matrix manipulation subroutines.
Only about 100 places or so.

I already broke Intel Visual Fortran 8.x a couple of years ago when I
first tried to port to it. We have all 3500 subroutine in seperate files.
Broke the linker trying to link 3500 object files ! They fixed it though.

Lynn


.



Relevant Pages

  • Re: Problem converting external routine to internal
    ... subroutine into free form. ... compilers don't find any mismatches when I move it from ... I don't remember whether IMPLICIT NONE requires things like ... do indexes in the main program and a surprising host association ...
    (comp.lang.fortran)
  • Re: Problem converting external routine to internal
    ... I'm adapting the guts to construct a Fortran-90 gridded model ... The behavior is repeatable across compilers (at least "sunf95", ... What could cause the act of moving an IMPLICIT NONE subroutine ... my qname at domain dot com ...
    (comp.lang.fortran)
  • Re: aliased intent(in out) arguments
    ... the code is not standard-conforming. ... What is non-conforming is for the subroutine in question to then modify ... One could also easily write a case where array elements were being ... Compilers *MAY* catch errors like this. ...
    (comp.lang.fortran)
  • Re: question about negative indices in fortran 77
    ... | I am working with an "inherited" program written in Fortran 77. ... | Intel compilers for linux), but now I'm doing some modifications and I ... | I'm checking for violations of array bounds because the program is doing ... | subroutine where it isn't touched. ...
    (comp.lang.fortran)
  • Re: Was this a bug
    ... of 7 and then used this, in case the called subroutine treats the ... Are there actually any compilers in existence that honor the INTENT clause _and_ have the obnoxious bug of allowing numeric constants to get changed by this sort of error? ... I had thought that this was true even back in the days when "modern compiler" meant "implements Fortran 77 rather than an earlier version of the standard", but there may be a few long-obsolete exceptions. ... In any case, at this point any compilers that are exceptions to that statement can be considered unacceptably buggy -- and if you're trying to write defensive code that will work even on unacceptably buggy compilers, there are far better places to start. ...
    (comp.lang.fortran)