[Beowulf] Threaded code (& Fortran)
jeffrey.b.layton at lmco.com
Wed Aug 18 09:40:49 PDT 2004
Robert G. Brown wrote:
>On Wed, 18 Aug 2004, James Cownie wrote:
>>RGB wrote :-
>>>Sorry, I don't do fortran. At least not unless somebody holds my dog
>>>hostage or threatens to torch my car.
>>It may not be that simple in Fortran since you need to be careful about
>>which variables are allocated on the stack (and therefore exist
>>separately in each thread), and which ones are statically allocated (and
>>are therefore shared between all threads).
>>As well as common blocks and module variables (which will certainly be
>>shared) according to the standard Fortran compilers are free to allocate
>>local variables statically in all except recursive
>>subroutines/functions. Whether your compiler uses this freedom can
>>depend not only the compiler, version and compile flags, but also the
>>size of the object, the phase of the moon and other such
>>Fundamentally you must have a way of telling the compiler that your code
>>is to be run in a threaded environment, which likely means that you need
>>to use OpenMP. Otherwise you'll be relying on properties of the compiler
>>which could change with the next release and are _likely_ to change if
>>you move to a new compiler or new machine.
>All of which is part of WHY only threats of plastic surgery performed
>with a rusty letter opener and staple gun can induce me to use
>I'm fond of determinism and reproducibility in computer programming...
But Bob, you're a physicist. Fortran is based on real mathematics, unlike C.
Only recently did C get a complex data type. Imagine math, physics, and
everything else without complex numbers (ask Arthur Anderson about complex
numbers in accounting). :)
Just ribbing you... :)
Dr. Jeff Layton
Aerodynamics and CFD
Lockheed-Martin Aeronautical Company - Marietta
More information about the Beowulf