(j3.2006) [Fwd: Fortran 2008 query]
Van Snyder
Van.Snyder
Thu Oct 26 20:51:31 EDT 2017
On Thu, 2017-10-26 at 22:39 +0000, Bill Long wrote:
> Again, it depends on the amount of data involved. A MB is not that
> big a deal. Many GB gets more problematic. The standard is always
> making reasonable compromises. We don?t allow variable names that are
> 1000000 characters long, for example. It?s a judgement about where to
> draw the lines.
There is no restriction in the standard against a 10,000-line module.
Maybe it's bad style. Sometimes there are reasons for it. I have a
5000-line module that I'd love to divide up but it would result in
hundreds of arguments for work arrays, which otherwise would be
automatic variables allocated for every subproblem instead of the
largest subproblem, which our profiler told us was soaking up 12% of our
cycles. Making the arrays allocatable module variables, allocated for
the largest subproblem, and accesing them by use association in numerous
small modules, makes them not thread safe. Accessing automatic
variables by host association is really convenient. Automatic variables
in a coroutine would solve the problem, because they wouldn't go away
between suspending when one subproblem is finished and resuming when
another one is started. I could have several small modules instead of a
monster with dozens of internal subroutines.
Why is 10,000 lines of code not a problem, but 10,000 lines of data is?
And constructing data that depends upon named constants obtained from
numerous modules to be read from a file is not terribly easy to do. The
place where I'd love to have 1,500 lines for a constant definition
composed entirely of references to named constants is one of these
cases. How do I read that from a file?
As Tom asked: "Walk a mile in my shoes." Don't insist your shoes fit
everybody's needs.
Stephen Wright said the advantage of walking a mile in somebody elses
shoes is that you're a mile away -- and you have his shoes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.j3-fortran.org/pipermail/j3/attachments/20171026/949e23e1/attachment.html>
More information about the J3
mailing list