Fortran Source, Winter 2001

Volume 17, Issue 1

LF95 Linux v6.0 Released!
Maintaining Fortran Programs - 0
Fortran 95 and GINO Workshops

CEO's Letter
News Briefs
  Need a Linux Cluster?
  GINO v5.0 Available
  Winteracter v3.0 Available

LF95 Linux v6.0 Released!
PRO and Express Editions Available

Aren't two processors better than one? Four better than two? Depending on your code, maybe. While right answers are best and good diagnostics a close second, more speed is always a winner and, in theory, that's what two, four, or more processors might get you.

Of the new features in LF95 Linux PRO v6.0 (US$695 + S&H), the parallel programming facilities deserve the most attention. PRO v6.0 now offers three ways to improve the performance of a Fortran program by building it to run simultaneously on more than one processor: 1) by having the LF95 compiler automatically parallelize your program, 2) by adding OpenMP directives to your code, and 3) by making calls to a publicly available message passing library such as MPICH.

The goal of parallel programming is to save elapsed execution time by using two or more CPUs simultaneously. Execution speed improvements in LF95 come from splitting up loops among available processors. For example, if a DO loop can be executed in parallel by distributing half the iterations to one processor and half to another, then, theoretically, the execution time of the DO loop is cut in half. In practice, though, using two processors doesn't mean your program will run twice as fast. Among the impediments to increased execution speed are the overhead for initiating and managing threads on more than one processor, a lack of large arrays and loops operating on them, and I/O intensive rather than computationally intensive programs. However, for many people, even a five or ten percent overall performance improvement is worth the effort.

Here's an introduction to the three ways LF95 can improve performance:
1) Automatic parallelization
Use automatic parallelization on your Fortran program if it is to execute on a single computer with more than one processor. This is called shared memory parallelism. The LF95 compiler automatically parallelizes DO loops and array operations without you having to make modifications to your program. This makes it easy to migrate source programs to other platforms (as long as the program conforms with the Fortran Standard). While certain loops can be analyzed sufficiently to be parallelized by the compiler without input from the programmer, many loops have data dependencies that prevent automatic parallelization because of the potential for incorrect results. For that reason, LF95 PRO also includes optimization control lines (OCLs) with which you provide information necessary for the compiler to parallelize these otherwise unparallelizable loops. The OCLs are Fortran comments in a particular format, for example:

Note that programs with OCLs are standard-conforming and can be compiled with other compilers that do not support OCLs.

Four compiler switches control automatic parallelization: --parallel, --threads, --threadstack, and --ocl. Details of automatic parallelization (loop slicing, interchange, distribution, fusion, and reduction, as well as OCL syntax and specifiers) are documented in the LF95 User's Guide and at

2) OpenMP
OpenMP specifies a set of compiler directives, library routines, and environment variables for shared-memory parallelism in Fortran and C/C++ programs. LF95 Linux PRO v6.0 supports the OpenMP v1.0 specification for Fortran. Like automatic parallelization, you use OpenMP directives to parallelize a program that runs on a computer with more than one processor. With OpenMP you have more control over how code is parallelized, but also more coding to do.

Four compiler switches control OpenMP parallelization: --openmp, --cpus, --threadstack, and --threadheap. The LF95 Linux PRO v6.0 CD includes the OpenMP v1.0 Fortran specification in PDF. You can also view the specification at You can learn more about OpenMP at

3) Message passing If you want to run your Fortran program on a cluster of networked Linux computers, typically called a Beowulf Cluster, you can make calls to a message passing library such as MPICH ( MPICH is a freely available, portable implementation of MPI. MPI is a library specification for message-passing, proposed as a standard by a broadly based committee of vendors, implementors, and users. See "Using LF95 Linux Express with Linux Clusters," Fortran SOURCE, Volume 16, Issue 2, Summer 2000, at (or give us a call and we'll send you that issue).

Those are the three methods offered by LF95 Linux PRO v6.0. In general, if your code spends a large percentage of its time in computationally intensive loops, parallel processing is likely to offer increased performance. Method 3 above is also available with LF95 Linux Express v6.0 (US$249 + S&H).

Other new features of LF95 Linux PRO v6.0

  • Optimized BLAS (Basic Linear Algebra Subprograms) and LAPACK (Linear Algebra PACKage). You can call both libraries from parallelized Fortran programs.
  • Thread-safe SSL2 math library callable from parallelized Fortran programs.
  • Winteracter Starter Kit, WiSK, a subset of Winteracter by Interactive Software Services, Ltd. WiSK is a portable user-interface and graphics package for Fortran 90/95 developers.
  • Automake, by Polyhedron Software, is a make utility that automatically determines program dependencies.
  • ... and new features of both PRO and Express

  • File I/O speed improvements similar to the LF95 Windows v5.6 improvements.
  • New global compile-time diagnostics.
  • Improved runtime diagnostics.
  • ALLOCATABLE attributes on array components of structures, dummy arrays, and function results (a proposed Fortran 2000 feature).
  • Character variable length limit increased from 65,000 to 2,147,483,647.
  • New OPEN statement specifier to provide file byte-order conversion of big-endian, little-endian or IBM/370-style file formats (and new corresponding specifier in the INQUIRE statement).
  • Pricing
    LF95 Linux PRO v6.0 - US$695
    LF95 Linux PRO v6.0, Educational - US$499
    LF95 Linux Express v6.0 - US$249
    LF95 Linux PRO v6.0 Update from LF95 Linux Express v5.5 - US$595
    LF95 Linux Express v6.0 Update from LF95 Linux Express v5.5 - US$149

    Prices do not include shipping and handling. Lahey offers Linux-cluster, concurrent-user, and site-license pricing. Please call Lahey Sales at 800-548-4778 or 775-831-2500 or visit for details.

    Maintaining Fortran Programs - 0
    by Thomas M. Lahey
    Although numbered zero, this is the second in a series of articles on steps you can take to maintain (I resist using the word port) a Fortran program. A side effect: Implementing these changes will serve to familiarize you with some of the more fundamental features of Modern Fortran. As additional articles are written, they will be made available on the Lahey web site,

    When I wrote the first of these monographs, I hadn't thought about the order in which I should present the different features of Modern Fortran. With apologies, the following presentation of free-form source should have been the first in the series.

    Fortran 90 introduced free-form source. Within the 1 to 132 columns, this new source form has no designated columns or fixed fields within which designated Fortran text must appear, i.e., all columns are treated equally. Free-form source will eventually eliminate fixed-form (columns 1-5, 6, 7-72, and 73-80) source.

    Free-form source features are:

  • 132 characters on a line.
  • Blanks are meaningful, i.e., one or more blanks is required to separate "words." For example:
         REAL    x
    works, but neither
         R E A L   x
  • Blank lines may appear anywhere, i.e., between continued lines and before and after statements.
  • Comments. An ! that is not part of a CHARACTER constant identifies the start of a comment. (C and * in column 1 do not work.) Any blanks preceding the !, the !, and the rest of the line are ignored. The ! may appear anywhere on the line (including column 1) or it may introduce a trailing comment, i.e., a Fortran source statement may be followed by an ! that introduces a trailing comment.
  •      !  This is a comment
         x = a + b +                       &  !  Trailing comment
                 c + d
  • 39 continuation lines. Continue a line by appending an & to it. The ampersand indicates the statement text continues at the first non-blank character of the next non-blank, non-comment line.
  • A lexical token (keyword, name, label, constant, operator that requires two or more characters) continued on one or more lines, i.e., a broken token, requires two ampersands:
      The first & terminates the line being continued.
      The second &, on the next non-blank, non-comment line, denotes the broken token continues at the first character immediately following the second &.
    Tip: Thanks to DATA, FORMAT, and EQUIVALENCE statements from the past that typically go on and on, every vendor I'm aware of has implemented an extension to accept an almost unlimited number of continuation lines.
          Ch_var = "Broken token with embedded blank &
          &lines that are ignored; CHARACTER constant&
          & that uses 3 lines!" ! Trailing comment here
    Special situation: A line that continues a broken token may not have a trailing comment.

  • Multiple statements per line delimited by ;.
  • Recommendation: I seldom use multiple statements per line; debugging becomes more difficult; readability and cross-reference listings suffer. But remember, A foolish consistency is .... You will find multiple statements per line useful in some circumstances. Clearly, your program requires fewer lines on your screen when you use multiple statements per line.

    Tip: It's possible to have a source file that works for both fixed- and free-form source:

      Limit the source-line length to 72 characters, add an & in column 73 and another & in column 6 of the continuing line.
    Note: You cannot follow the & in column 73 with a trailing comment.

    Caution: In either source form, tab character usage is restricted to two contexts:

    1. Within a comment, and
    2. within a CHARACTER constant.
    In particular, a tab cannot be used as white space to lay out Fortran 95 source.

    Notes: As an extension, Lahey's language systems accept a tab everywhere a blank may appear or is required. However, when the -f95 (conformance switch) is set, LF95 warns at the first appearance of a tab within a source file.

    ED for Windows, the editor bundled with Essential LF90, LF90, and LF95, converts tabs to an appropriate number of spaces when the file you're editing has an extension of .F90 or .F95.

    Tip: When the LF95 command-line option is -fix, the default filename-extension is .FOR and the source file is fixed format. When -nfix is the option, the default filename extension is .F90 and the source file is free format. Any INCLUDE files must agree with the source-file format in which they are referenced.

    I finish with an example that has been translated from FORTRAN 77 using To_F90.F90, an Alan Miller program you can download for free from Alan's website,

    FORTRAN 77
          SUBROUTINE S( X, Y )
          REAL A(5)
          DATA A/1, 2, 3, 4, 5/
          DO  99  I = 1, 5
          IF( X ) 10, 20, 30
    10    X = 
         >      X + A(I)
          GO TO 99
    20    X = 1.0
    30    X = Y**2 + A(I)**2         
    99    CONTINUE
    Modern Fortran
    !  ILLUSTRATE TO_F90.F90
    SUBROUTINE s( x, y )
    REAL, INTENT(IN) :: y
    REAL :: a(5)
    DATA a/1, 2, 3, 4, 5/
    DO   i = 1, 5
       IF( x  < 0.0) THEN
          GO TO    10
       ELSE IF ( x  == 0.0) THEN
          GO TO    20
          GO TO    30
       END IF
       10    x = x + a(i)
       20    x = 1.0
       30    x = y**2 + a(i)**2
    END DO
    As you can see, To_F90 converts the source form including comments and continued statements (note that the program concatenates short statements), eliminates the Arithmetic IF (yes, you should move the blocks of code and eliminate the labels, but the program provides the skeleton), and converts DO labels to DO/END DO. I encourage you to convert your programs using To_F90.

    A word to the wise: Alan's program has problems like almost every program in the whole world. Use it with caution. I suggest a program unit at a time so that you can pinpoint where a problem was introduced.

    Fortran 95 and GINO Workshops
    During the week of April 30 - May 4, 2001, Lahey Computer Systems, Inc. and Bradly Associates, Ltd. are conducting Fortran 95 and GINO Workshops. The workshops will be held at Lake Tahoe in Incline Village, Nevada, USA.

    Fortran 95 Workshop, April 30 - May 2, 2001
    Basic GINOMENU Workshop, May 3, 2001
    GINO/OpenGL Workshop, May 3, 2001
    GINO 5.0 Workshop, May 4, 2001
    GINOMENU Studio Workshop, May 4, 2001

    Workshop Tuition and Fees

    To register or for more information contact Gloria Whitlock,, 1-800-548-4778, or 1-775-831-2500 x459.

    Fortran 95 Workshop
    The Fortran 95 Workshop is a six-session, hands-on, Fortran 95 workshop led by Thomas M. Lahey, CEO, Lahey Computer Systems, Inc.

    Workshop Goals

    • To begin to port one of your own FORTRAN 77 programs to a Fortran 90/95 language system.
    • To learn how to incorporate the new Fortran 90/95 features into your Fortran programs.
    Please note: This is a workshop, not a class. A valuable workshop component is the interaction with the other participants. Attendees are encouraged to become participants!

    The workshop is limited to twelve experienced Fortran programmers.


    1. Bring a FORTRAN 77 production program of at most 50,000 lines.
    2. You should arrive having reviewed the proprietary papers.
    3. While at the workshop, participants use Pentium-class computers provided by Lahey. The Lahey/Fujitsu Fortran 95 language system will be installed on the computers. NOTE: If you prefer to use a different language system, you may bring your own notebook computer and Fortran 90 or 95 language system.

    Three weeks before the workshop begins, paid participants will receive a notebook containing instructional documents for each session: proprietary papers prepared especially for the workshop and copies of published papers. At the workshop you will also receive a copy of the book Upgrading to Fortran 90, your personal copy of Essential Lahey Fortran 90, and a disk containing copies of the Fortran code discussed in the workshop.

    Fortran 95 Workshop Agenda

    Monday, April 30, 2001
    8:00 - 9:00 a.m. - Registration and continental breakfast hosted by Lahey

    9:00 a.m. - 12:00 noon - Session I
    Programming style. Participants decide upon a style and set of Fortran features considering efficiency, obsolescence, and replacement code. Form 2 to 3 person teams. Port FORTRAN 77 code using Tom Lahey's recipe. Assignment: Chapters 6 and 9; have CONVERT process FORTRAN 77 code; review automatically processed code.

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 5:00 p.m. - Session II
    Fortran 90 paradigm. Emphasis on modules and KIND; discuss object-oriented programming and the Fortran 90 object-oriented features; have FORTRAN 77 code up and running under a Fortran 90 language system. Assignment: Chapters 3, 5, and 6; continue porting to Fortran 90.

    Tuesday, May 1, 2001
    8:00 - 8:30 a.m. - Continental breakfast hosted by Lahey

    8:30 a.m. - 12:00 noon - Session III
    MODULEs, derived types, derived-type constants, overloaded operators, module procedures. Assignment: Chapter 2.

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 5:00 p.m. - Session IV
    Array processing: expressions, constructors, and sections; formally define terms. Assignment: Chapters 4, 7, 8, and 10; review your program to define a derived type and operations on it; prepare for a discussion.

    Wednesday, May 2, 2001
    8:00 - 8:30 a.m. - Continental breakfast hosted by Lahey

    8:30 a.m. - 12:00 noon - Session V
    75 intrinsic procedures; concentrate on the array intrinsic functions. Assignment: Chapters 10 and 11; examine DO loops, determine which to convert to array expressions; convert COMMONs to a MODULE.

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 5:00 p.m. - Session VI
    Remaining features; discussion and critique. Assignment: CONTINUE TO GO TO and DO Fortran!

    Basic GINOMENU Workshop
    GINOMENU is a programmable Fortran GUI toolkit for creating portable applications under Windows 95/NT. All the standard building-blocks of Windows are available with the option of adding powerful graphics routines to enable the user to provide completely professional applications.

    The Basic GINOMENU workshop will take the form of a hands-on tutorial looking at gradually building up a small "Hello World" program from scratch and developing it into a fully interactive Fortran GUI application under Windows 95.

    Workshop Goal
    To be able to write Fortran GUI applications under Windows using GINOMENU.

    The workshop is limited to twelve persons.


    1. Experience in programming Fortran 77, 90 or 95.
    2. No experience in C or Windows programming is necessary.
    3. While at the workshop, participants use Pentium-class computers provided by Lahey. The Lahey/Fujitsu Fortran 95 language system will be installed on the computers. NOTE: If you prefer to use a different language system, you may bring your own notebook computer and Fortran 90 or 95 language system.

    Basic GINOMENU Workshop Agenda

    Thursday, May 3, 2001
    8:00 - 8:30 a.m. - Registration and continental breakfast hosted by Bradly

    8:30 - 10:30 a.m. - Session 1
    Concepts of GUI programming
    Your first GINOMENU program
    Adding Menubars and Pull-down menus

    10:30 - 10:45 a.m. - Coffee

    10:45 a.m. - 12:00 noon - Session 2
    GUI grid and coordinate system
    Adding Common Dialogs - Browse, Colour
    Error and Message Handling

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 3:30 p.m. - Session 3
    Adding Child widgets - text entries, panels, toggles, toolbars, icons etc.
    Enquiring/Setting Widget Attributes

    3:30 - 3:45 p.m. - Tea break

    3:45 - 5:00 p.m. - Session 4
    Interaction - Callbacks and the Action loop
    Change Application to MDI in one easy step

    GINO/OpenGL Workshop
    The GINO/OpenGL workshop will take the form of a hands-on tutorial looking at using some of the 3D OpenGL facilities provided in GINO. The new facet primitive and new high-level objects such as spheres, cones, boxes and volumes will be explored together with lighting & shading, material properties, texture mapping and animation.

    Workshop Goal
    To understand the concepts of programming 3D graphics applications using facets and 3D objects and to display them with OpenGL lighting and shading functionality.

    The workshop is limited to twelve persons.


    1. Existing knowledge of GINO is useful but not essential.
    2. Experience in programming Fortran 77, 90 or 95.
    3. No experience in C, Windows, or OpenGL programming is necessary.
    4. You will need to bring your own notebook computer and F90/F95 language system.

    GINO/OpenGL Workshop Agenda

    Thursday, May 3, 2001
    8:00 - 8:30 a.m. - Registration and continental breakfast hosted by Bradly

    8:30 - 9:30 a.m. - Introduction to the 3D World
    An introduction to the world of 3D graphics with special attention to the viewing volume together with its mapping and clipping implications. The range of hidden surface techniques will be covered concentrating on the Z-buffering method used by GINO and OpenGL.

    8:30 - 9:30 a.m. - 3D Drawing
    An overview of the 3D drawing facilities provided by GINO will be covered, together with an in-depth look at the new facet primitive. The new high level objects and Bezier surfaces will also be explored in order to generate your first 3D picture.

    10:30 - 10:45 a.m. - Coffee

    10:45 a.m. - 12:00 noon - Lighting and Shading
    The key session of this course will look at the different shading modes and their interaction with the facet primitive. Key techniques for increasing performance will uncover different culling and lighting methods as well as translucence. The four different light source types will also be tested to illuminate your scene.

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 2:30 p.m. - Materials
    After covering the basic colour matching of facets, two methods of material definition will be described. These include the material table and direct assignment bringing real colour, reflectivity and transparency to your objects.

    2:30 - 3:30 p.m. - Texture Mapping
    An explanation of texture mapping using basic examples. Use of overlay and blending modes together with other attributes will be covered. Both automatic and manual generation of texture coordinates will also be explained.

    3:30 - 3:45 p.m. - Tea break

    3:45 - 5:00 p.m. - Animation Different animation techniques will be covered and tried. More on performance and use of segments to round things off.

    GINO 5.0 Workshop
    The GINOMENU v5.0 workshop will take the form of a hands-on tutorial looking at the new features of v5.0 such as progress bars, table-boxes and guages. Participants will then be extending an existing program and developing it into a fully featured RTF word-processor type application.

    Workshop Goal
    To learn and be familiar with the new features of GINOMENU v5.0

    The workshop is limited to twelve persons.


    1. Existing knowledge of GINOMENU.
    2. Experience in programming Fortran 77, 90 or 95.
    3. No experience in C or Windows programming is necessary.
    4. While at the workshop, participants use Pentium-class computers provided by Lahey. The Lahey/Fujitsu Fortran 95 language system will be installed on the computers. NOTE: If you prefer to use a different language system, you may bring your own notebook computer and Fortran 90 or 95 language system.

    GINO 5.0 Workshop Agenda

    Thursday, May 4, 2001
    8:00 - 8:30 a.m. - Registration and continental breakfast hosted by Bradly

    8:30 - 9:30 a.m. - Session 1
    New widgets - gauges, progress-bars, table-boxes.

    10:30 - 10:45 a.m. - Coffee

    10:45 a.m. - 12:00 noon - Session 2
    Introduction to Font and Paragraph properties.

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 3:30 p.m. - Session 3
    Building a word-processor application.

    3:30 - 3:45 p.m. - Tea break

    3:45 - 5:00 p.m. - Session 4
    RTF File Handling.
    The Printing Mechanism.

    GINOMENU Studio Workshop
    GINOMENU Studio is an interactive GUI builder and development environment for the Fortran programmer. GUI projects can be saved as Fortran-77 or Fortran-90 code containing calls to GINOMENU.

    The GINOMENU Studio workshop will take the form of a hands-on tutorial looking at interactively developing Fortran GUI front-ends and applications using drag-and-drop methodology. It will be shown how to produce menus, dialogs, widgets and icons, and interactively link up user actions with event-handling code all from the same development environment. The workshop will be led by David and Kevin Bradly, Bradly Associates Ltd.

    Workshop Goal
    To be able to produce GUI front-ends and applications using an interactive development environment.

    The workshop is limited to twelve persons.


    1. Limited experience in programming Fortran 77, 90 or 95.
    2. No experience in C or Windows programming is necessary.
    3. You will need to bring your own notebook computer and F90/F95 language system.

    GINOMENU Studio Workshop Agenda

    Thursday, May 4, 2001
    8:00 - 8:30 a.m. - Registration and continental breakfast hosted by Bradly

    8:30 - 9:30 a.m. - Session 1
    Understanding the Desktop
    Differences between F77 and F90 projects
    Adding Widgets for forms
    Buttons, Toggles, Sliders and Text/Value entries

    9:30 - 10:30 a.m. - Session 2
    Saving the project to Fortran
    Compiling, Linking and Running

    10:30 - 10:45 a.m. - Coffee

    10:45 a.m. - 12:00 noon - Session 3
    Adding Combo/List boxes
    Adding Status-bars, Toolbars and Radio boxes
    Adding Menu-bars, Pull-downs and Icons

    12:00 noon - 1:30 p.m. - Lunch break

    1:30 - 2:30 p.m. - Session 4
    Understanding Callbacks
    The Callback Editor

    2:30 - 3:30 p.m. - Session 5
    Adding Fortran code
    User Code Editor

    3:30 - 3:45 p.m. - Tea break

    3:45 - 5:00 p.m. - Session 6
    Graphics Frames
    Graphics Frames Callbacks

    Workshop Tuition and Fees
    The fees do not include food, accommodation, or travel expenses. Payment may be made by credit card or check. Reservations and fees are accepted at any time. Fees are non-refundable.

    Fortran 95 Workshop
    The fee for the Fortran 95 Workshop is US$1,200 per person. The fee covers all instructional documents for each session (proprietary papers prepared especially for the workshop), copies of published papers, a copy of the book Upgrading to Fortran 90, and a disk containing copies of the Fortran code discussed in the workshop.

    Basic GINOMENU Workshop
    The fee for the Basic GINOMENU Workshop is US$400.

    GINO/OpenGL Workshop
    The fee for the GINO/OpenGL Workshop is US$400.

    GINO 5.0 Workshop
    The fee for the GINO 5.0 Workshop is US$400.

    GINOMENU Studio Workshop
    The fee for the GINOMENU Studio Workshop is US$400.

    Special Pricing
    If you register for the Fortran 95 Workshop and two GINO Workshops, the cost is reduced by 10% for each workshop.

    If you register and pay for a workshop before March 31, 2001, the cost is reduced by 10%.

    Workshop participants receive a 25% discount on all Lahey Language Systems and GINO products until July 4 2001.

    Travel and Accommodations
    Arrangements have been made with the Tahoe Biltmore Hotel, Crystal Bay, NV, 775-831-0660. One night, single occupancy is US$49. Early registration is advised. The Tahoe Biltmore Hotel is located three miles east of Lahey's offices on the north shore of Lake Tahoe. Lahey will provide a shuttle each morning and evening from the Tahoe Biltmore to the Workshops and back.

    We recommend flying into Reno-Tahoe International Airport. Take Highway 395 South from the airport and exit at Mt. Rose Highway (State Route 431). Travel approximately 35 miles until you reach Highway 28. Turn right on Highway 28 for about 2 mile. The Tahoe Biltmore is on the right at the Nevada-California state line. From the Biltmore, travel east on Highway 28 for about 3 miles (past Mt. Rose Highway 431). The Lahey offices are located between Southwood Boulevard and Village Drive on the Lake Tahoe side of Highway 28 at 865 Tahoe Boulevard (Highway 28) in the Centerpointe Building. Rental cars are available at the airport. You may also contact Budget Chauffeur at 800-426-5644 for shuttle service. They leave the Reno airport for Incline Village and the Tahoe Biltmore numerous times during the day and night. Please make arrangements in advance.

    Travel to the Lake Tahoe, Incline Village area from California:
    Take Interstate 80 East from Sacramento to Truckee and exit at Highway 267 to the North Shore of Lake Tahoe. When you reach Kings Beach, turn left on Highway 28. Continue approximately 4 miles until you reach Incline Village. The Lahey offices are located between Southwood Boulevard and Village Drive on the West side of Highway 28 at 865 Tahoe Boulevard (Highway 28) in the Centerpointe Building.

    CEO's Letter
    Dear Fortran Programmer,
    As you can see from this edition of Fortran SOURCE, the Lahey/Fujitsu partnership has committed to parallel processing in a big way with our Linux Version 6.0. To be frank, there are a number of issues we're concerned about:

    1. Will Fortran users continue to demand parallel processing?
    2. Is the parallelization technology that Lahey provides the answer to the Fortran world's problems?
    3. Is Linux the answer to the Fortran community's prayers? Or will fragmentation (the proliferation of not-completely-compatible-with-each-other Linux releases) send Linux to the dust bin? Fragmentation has become a serious problem. Fragmentation is prominent among the reasons for how long it took Lahey to prepare Version 6.0. Lahey had to do significant work to make LF95 install and run on the different distributions of Linux.
    I expect we will learn the answers to these questions in the coming year. Lahey does know the following:

    • Scientific problem-solvers are experimenting with and using Linux clusters.
    • The advice Lahey has received from our gurus has helped us determine the path we are pursuing.
    • Some big names are backing Linux: HP, IBM, Intel, and NEC are each expected to spend millions on a new Open Source Development Lab. The Lab's goal is to make Linux reliable enough for the corporate world.
    On the negative side, we know that in the past, a number of parallel strategies have been pursued (HPF comes to mind) without becoming the panacea the Fortran programming community seeks. Regardless, you and Lahey, as we have done together in the past, will continue to evolve until we both get it right.

    There's another aspect: The chips are getting faster and faster, cheaper and cheaper. Both Intel (IA-64) and AMD are working on 64-bit chips that will (eventually) execute programs faster; especially if the programs need to do extended-precision arithmetic.

    Last but not least: We will conduct a Fortran 95 Workshop here in Incline Village on the shore of Lake Tahoe: April 30, May 1 & 2. Truckee Meadows Community College will provide computers (but not cameras). All you need is a reasonable size (50,000 lines at most) program coded in FORTRAN 77 that your boss would like you to begin porting.


    News Briefs
    Need a Linux Cluster?
    PSSC Labs
    Ready to try your code on a Linux cluster? PSSC Labs can provide you with a turn-key Linux Beowulf cluster that meets your specifications and budget. Low price, professional service, and over 10,000 options make PSSC Labs the place to shop. Lahey recently ordered an 800 MHz Athlon cluster from PSSC. "The machines are great and the service outstanding," said Bill Lassaline, President, Lahey Computer Systems, Inc. Visit PSSC at or give them a call at 949-380-7288.

    Since 1982, Microway has earned its reputation as the "World Leader in High-Performance Numerics" in the workstation and server-user community. Currently Microway specializes in designing custom configurations of Alpha- Athlon-, and Pentium-based Linux Beowulf clusters, workstations, and fault-tolerant SCSI RAID arrays. Clusters are configured with Myrinet, Wulfkit, or ethernet. Microway will be providing Lahey Fortran for Linux on their Pentium and Athlon clusters. Visit Microway at or give them a call at 508-746-7341.

    GINO v5.0 Available
    GINO is a suite of portable graphics development tools aimed at scientific and engineering applications. GINO contains over 700 routines and is available for use with Fortran 9x and C language systems.

    In addition to containing the more common graphing features such as line graphs, charts, contour maps and 3D surfaces, GINO includes a fully programmable GUI interface (GINOMENU), and a host of low-level drawing routines for graphics development in 2D and 3D. Version 5.0 features fully integrated OpenGL functionality including facets, lighting, shading, and texture-mapping for developing state-of-the-art 3D models. GINO runs under Windows, Linux, OpenVMS, and most UNIX systems.

    The major new facility that has been added to the GINO library is the ability to create photo-realistic images using lighting and shading facilities, in conjunction with facets, ready-made objects, and surfaces. These new facilities are utilized with two new 3D device drivers, WOGL and GLX, both of which interface to the OpenGL API on PCs and UNIX workstations.

    GINO v5.0 libraries are available from Lahey Computer Systems, Inc.

    Wineracter v3.0 Available
    Winteracter is a user-interface and graphics package for Fortran 90/95 developers. Visual development tools and a substantial subroutine library are provided. Winteracter is available for Win32 and Unix/Linux operating systems on Intel, Alpha, and SPARC hardware and is compatible across platforms. A broad range of Fortran 9x compilers is supported.

    Following are just a few of the many enhancements to Winteracter v3.0:

    The main functionality of the Unix/Linux version of Winteracter is now synchronized with the Win32 implementation.

    The Winteracter User Guide has undergone substantial revision. Greater emphasis has been placed on tutorial and task-oriented content. New material has been written on subjects such as dialogs and menus. Grouping of common topics has also been improved.

    Windows and Dialogs
    You can now combine windows and dialogs, allowing a menu and toolbars to be attached to a dialog. You also have run-time control over dialog size.

    Grid Controls
    An arbitrary rectangle of cells can now be selected for cut/copy operations in grid controls. The memory requirements of numeric cells have been substantially reduced. For integer and real grid cells, memory usage has been reduced by a factor of 12. Grid rows can be added or removed under program control.

    PNG Files
    Substantial support has been added for PNG (Portable Network Graphics) files. This bit image file format is an open replacement for the GIF format. PNG provides good compression ratios, 24-bit color support and no patent/licensing issues. Most usefully, PNG files can be viewed in web browsers such as IE5 and Netscape 4 or greater.

    Presentation Graphics
    Among other PG enhancements, plotting using polar coordinates is now supported.

    Help Files
    Help2HTM, a new visual tool that can convert Windows Help projects created by HelpEd (or Help files from some other sources) to HTML format has been added. Also, files in Microsoft's Help/HTML hybrid known as Compiled HTML (CHTML) can now be invoked via WhelpFile under Windows.

    Visual Tools
    A number of enhancements to DialogED and WiDE were made. A "New Graph Wizard" was added to GraphED, simplifying graph design.

    From five new demos to a fast sorting routine based on the recursive quick sort algorithm, numerous improvements were made throughout the library.

    Winteracter is available from Lahey Computer Systems, Inc.

    By the Solutions Department.

    Q: Can I create a program that runs on and takes advantage of more than one computer, each with two processors?
    A: Yes. Use OpenMP together with MPI.

    Q: Will my program take less time to run if I use the new parallel programming features in v6.0?
    A: Here's what beta tester Lloyd Young, Los Alamos National Lab, said about automatic parallelization: "I used a couple of the directives to parallel the DO loops and now have increased the speed 40% in the code amix.for." Yet, we've also had reports that automatic parallelization caused some programs to run slower. So, the answer is, it depends on your code and how much effort you put into parallelizing it. Read "Chapter 4, Multi-Processing" in the LF95 User's Guide (online at for an explanation of the impediments to performance improvement.

    Q: Why does my program run slower on some newer distributions of Linux?
    A: We found that some programs run slower on newer distributions of Linux, for example, Red Hat 5.2 vs. Red Hat 6.2. The cause of this appears to be the newer version of the glibc (GNU C runtime) on the newer distribution. The slower performance manifests itself only in programs dynamically linked with the C runtime.

    Workaround: Specify the -static option on your LF95 command line to statically link all the GNU C runtime (part of the Linux operating system) and Fortran runtime libraries into your executable program. This will make a much larger executable file than a dynamically linked one. Note: We don't recommend that you distribute this type of application, as it will be governed by the GNU Public License due to the copy of the GNU C runtime that it contains.

    Q: I'm going to move my code from LF95 Windows v5.6 to LF95 Linux v6.0. What do I need to know?
    A: There are a few things to consider. 1) If you use a Windows user-interface and graphics library or other third-party library, you'll need compatible versions of the libraries for Linux. 2) Under Linux, all multiple-character compiler and linker options are specified with two hyphens, whereas, under Windows a single hyphen is used. While most LF95 Windows options are available under Linux by adding an extra hyphen (e.g., -chk and --chk), there are some differences (e.g., -w vs. --warn), and some options specific to each platform (e.g., -dll vs. --wide). 3) Some procedures and statements are available only with LF95 Windows: DVCHK, NDRERR, NDPEXC, OVEFL, and UNDFL procedures and the DLL_EXPORT and DLL_IMPORT statements.

    Q: How can I make sure the Linux executables I create run on multiple Linux distributions and are backwards compatible with older distributions, as well as compatible with Linux distributions yet to come?
    A: That's a tall order in the Linux world. We can tell you what works for us: We build the LF95 Linux tools on RedHat 5.2 -- Linux kernel 2.0.36 and glibc 2.0.7. Using this approach we expect compatibility with versions newer than those given the backward compatibility built into the newer kernels and runtimes. We do not expect compatibility with older versions.

    Q: Lahey keeps referring to Linux as if it were an operating system. Is that correct?
    A: Not really. Linux is actually the kernel, not the operating system. A "Linux operating system" as a whole is basically the GNU system, with Linux added as the kernel. GNU stands for "GNU's Not Unix." The GNU Project ( is the system's principal developer. More at and

    Help us end waste. Let us know if you change your address, receive duplicate copies of Fortran SOURCE, or would like to be removed from our mailing list.  Call us toll-free at 1-800-548-4778 or send us e-mail at  Thank you.