THE COMPUTER TRANSITION SYSTEMS REPORT
MAY 1996

CONTENTS

     PROFESSIONAL FORTRAN77/90 SERVICE
     FORTRAN ON THE INTERNET
     LF90 VERSION 2.01
     THE NEXT LF90
     NEW VERSIONS OF SALFORD COMPILERS
     CLEARWIN+ NOTES AVAILABLE
     INTRODUCTION TO FORTRAN 90 - a Fortran 90 textbook
     SCIPLOT FOR ELF90
     VISTAGRANDE - Video Grabber/Processor
     FUJITSU FORTRAN 90 PRODUCTS - now available from us
     OPTIMIZER FOR LS POWERMAC FORTRAN - big discounts until 31 July
     ED - SPECIAL OFFER
     ABSOFT FORTRAN 90 for the MACINTOSH
     ABSOFT F77 version 4.2
     ABSOFT LINUX FORTRAN77 COMPILER
     ABSOFT IMSL LIBRARY
     DELPHI ACCESS TO LF90 DLLs
     UPGRADE OF SPP
     INTERACTER VERSION 3.15
     FORTRAN PERFORMANCE PROJECT
     A NOTE ON PENTIUM BASED PCs
     USING CHARACTER STRINGS IN I/O - by Alan Miller
     F90 Plus 


PROFESSIONAL FORTRAN77/90 SERVICE
A professional Fortran77 and Fortran 90 support service is now available for corporate Fortran users. This service is targeted to those who need a skilled practioner to provide temporary technical support to assist in the completion of technical/scientific projects. The range of services offered include design and implementation of new systems, maintenance and enhancement of legacy systems, interfacing to Windows, multi platform code conversions, file system conversions, and assembler interfacing. Projects of any size and complexity can be accommodated. Enquiries should be directed to Alan - phone 0411 478 671.

FORTRAN ON THE INTERNET
There is quite a substantial amount of useful Fortran material on the internet. Fortran is sufficiently defined that just using yahoo.com and looking under "computer languages - fortran" is very effective. We have included a Fortran 90 FAQ page on our free disk #3. Those who wish to view this site directly should look at http://www.ifremer.fr/ditigo/molagnon/fortran90/engfaq.html. We would be interested in knowing about any informative Fortran web sites which are not easy to locate using the normal search engines.

LF90 VERSION 2.01
In May version 2.01 will be sent to all version 2.0 users at no charge. This version of the compiler is a maintenance release only. There are no new features but it now has the facility for users to update LF90 by downloading ascii patch files from Lahey. The patch file system will apply to all important files not just the compiler. Version 2.01 comes on 9 disks. Hopefully with the new patch system it will be practical for Lahey to distribute LF90 on CD in addition to 3.5" disks.

THE NEXT LF90
As described in the Spring 1996 issue of the Lahey newsletter, development of the next version of LF90 is well underway. Announced new features include better integration of the editor and debugger, supply of a 32 bit Windows debugger in addition to the extended DOS debugger, the ability to call 32 bit DLLs from LF90, and a stable module format (modules compiled with earlier versions of LF90 will be compatible with all future releases of LF90). We should receive further details at the Lahey User Meeting which we will attend in May. No upgrade price or release date has been set for the new LF90. We anticipate that it might appear in September.

NEW VERSIONS OF SALFORD COMPILERS
The current versions of Salford compilers are as follows : - ClearWin+ 4.4, FTN77 DOS/Windows 3.16, FTN77 Win95/NT 2.05, FTN90 DOS/Windows 2.15, FTN90 Win95/NT 2.16, Salford C/C++ version 2.16. Anyone having maintenance for these compilers should contact Computer Transition Systems to obtain a free upgrade to the current version. In all instances the current releases have had substantial improvements included in them. Details on these enhancements are available from Computer Transition Systems. Those who actively use Salford compilers should seriously consider upgrading or taking out maintenance. Maintenance is less expensive than purchase of more than one upgrade per year. All DOS/Windows versions now require a security code which we obtain from Salford Software.

CLEARWIN+ NOTES AVAILABLE
Salford held a seminar on ClearWin+, their facility for generating programs which use the Windows API. We have copies of the slides used in these presentations. This information should be helpful to those using Salford compilers to produce programs with Windows facilities. There are more than fifty pages of material. It may be borrowed from Computer Transition Systems. An article describing the use of ClearWin+ appeared in the January/February 1996 issue of the Fortran Journal.

INTRODUCTION TO FORTRAN 90
Introduction to Fortran 90, Algorithms, and Structured Programming by R.A. Vowels is a text book for those who wish to learn Fortran 90. Knowledge of Fortran 77 is not assumed. The fundamentals of structured programming are emphasized. The book is organized into two sections. The first is concerned with the elements of Fortran 90. The second introduces traditional and new algorithms.
Section one is 240 pages. After a discussion of general programming considerations - algorithms, flowcharts, loops and control - the specific elements of Fortran 90 (data representation, expressions and assignments, input-output, control statements, DO statements - arrays, declarations, and character data processing) are described and illustrated. This is followed by a chapter on subroutines, procedures and program structure.
Section two is 230 pages. It deals with algorithms in Fortran. Detailed discussion is presented on sorting, recursion, linked lists, complex arithmetic, graphics, text processing, and the use of published algorithms such as FFT, matrix multiplication, integration, matrix inversion, and solving of equations. It concludes with a chapter on searching. An extensive bibliography provides a rich source of further information on algorithms.
The presentation is such that each chapter is independent so the various topics may be covered in any order. The emphasis is on producing sound programs. Consequently obsolescent facilities in the language -which are conducive to errors - are not discussed. While any Fortran 90 compiler can be used with the book properly designed subset compilers such as the Lahey ELF90 ($130 academic price) are fully compatible. Indeed one university in Canada is using Vowels book with ELF90 to teach Fortran 90. The reader will gain maximum value from the book by running the more than 240 provided exercises.
Section one of "Introduction to Fortran 90, Algorithms and Structured Programming" can be obtained from Robin Vowels, 93 Park Drive, Parkville, Vic., 3052. It costs $20. Preview copies of the entire book are available on request. Further details and the table of contents for the book can be obtained from
http://www.cs.rmit.edu.au/~rav/FORTRAN.html

SCIPLOT FOR ELF90
Sciplot is an easy to use Calcomp compatible graphics library. A version for ELF90 has been released. It is $199 regular price and $130 for academic purchases.

VISTAGRANDE - Video Grabber/Processor
Eighteen Eight, developers of powerful array processors for the PC, have now produced Vistagrande, an advanced frame grabber for scientific, industrial and machine vision applications. A superset of their comprehensive array processor library is included with the Vistagrande. This provides powerful real time processing which is carried out in parallel with image capture. The driving software can be written in Fortran, C or Pascal. Video capture is at rates of up to 30 frames per second. Pixel jitter is no greater than +/- 5 nanoseconds. The inbuilt 8 to 128 MB of memory allows the storage of 32 to 512 full size video frames (512x512 pixels). There are four video input channels compatible with both NTSC and PAL cameras. These are software programmable - gain and offset can be set, an internal or external clock can be used, an external trigger with programmable polarity is incorporated in the design, there is a 256 entry look up table, and frame size is fully programmable. In addition the Vistagrande has 12 TTL input/output signal lines which can be used for additional control of cameras, lights, etc. The Vistagrande occupies two PC ISA slots. Prices (extax) range from $3300 (8MB of memory) to $10700 (128MB of memory).

FUJITSU FORTRAN 90 PRODUCTS
Computer Transition Systems is now able to supply the high quality and very economical Fortran 90 produced by Fujitsu for Sun Workstations using SunOS or Solaris. In independent reviews the Fujitsu compiler has consistently shown to generate executables which are substantially faster than those produced by Suns own Fortran 90 compiler. Compiler switches allow the user to target the generated code to take maximum advantage of the particular cpu (Micro, Super, Hyper, or Ultra SPARC) being used. Additionally, in a recent test of six Fortran 90 compilers for Solaris 2 (see Fortran Journal September/October 1995 page 8), the Fujitsu compiler was the only one which successfully compiled all the test code used by the author. The object code generated by the compiler is identical to that produced by the Sun compiler so libraries and other software compatible with the Sun compiler is also compatible with the Fujitsu.
Provided with the compiler package is the Fujitsu Fortran 90 Workbench. This includes an overall manager which can be used to control and select programming tools, a debugger, a profiler (which is called a "sampler"), on line help, and a "Process Monitor" which allows for monitoring of such information as I/O status of programs.
The price for the single user version is $1599, $825 for educational institutions. Network pricing is based on the number of simultaneous users. Evaluation copies which can be used for 30 days are available upon request. Further Fujitsu Software we can supply includes
Visual Analyzer - software which functions (for both C and Fortran) as a source code analyzer and a code coverage analyzer. It can be set for Fortran 66, 77 or 90 compliance. The static analyzer produces a structural chart of the program, carries out thorough checking of the type and number of actual and dummy arguments, checks COMMON blocks are compatible with each other, and displays comprehensive static information - the relationship of program units with each other, the number of lines, complexity, etc of all program units. The Visual Analyzer is $1995 ($1199 academic)
SSL2 - a general purpose mathematical subroutine package which contains 230 routines useful in a variety of areas including linear equations and eigenvalue problems. SLL is $1995.
C Compiler - an ANSI and K&R compatible C compiler. It uses a programming environment which is identical to that of the Fortran 90 compiler. The price is $1295 ($999 academic).

OPTIMIZER FOR LS POWERMAC FORTRAN
The KAP source code optimization tool is now available for the Language System PowerMac Fortran. KAP should provide worthwhile execution speed enhancements to anyone who makes significant use of this compiler. It will deliver most benefit on code which has any of the following characteristics loops that use many local arrays, large loop iterations, uses a data set with size greater than the cache of the machine, and/or significant data reuse within a loop nest. The special offer introductory price is $310 until 31 July. The normal price is $450. LS Power Mac Fortran users who purchase KAP before 31 July will additionally receive LS Fortran version 1.5 (due November 1996) at no cost. Until 31 July the price of the compiler with KAP is $899 - $100 less than the normal price of LS Fortran alone! The special price of LS Fortran without KAP is $699 - a 30% saving over the normal price.

ED - SPECIAL OFFER
LF90 users may upgrade to the full release of the ED editor for the concessional price of $249 (windows version). The full release has the following advantages - a complete printed manual, the keyboard definitions can be customized to your wishes, a powerful file difference analysis tool, Windows95 support including long file names, new modeless dialogs, block sort capability, additional print appearance options - multiple columns, line numbers, line around page, wrap lines, eject on form feed, multi-file search and replace, a spell checker, standard language dictionaries for more than 30 languages, provision for addition of extensions to language definitions, and the ability to write extensions to ED. Language support includes html and Java. ED is an excellent tool for composing web pages for the internet.

ABSOFT FORTRAN 90 for the MACINTOSH
Absoft has produced the first Fortran 90 compiler for the PowerPC. It is based on the Fortran 90 technology produced by Cray Research. It is now available as an "early adopter" product for $1095. The "early adopter" release, unlike the production release, has only limited documentation, a debugger which does not support all Fortran 90 constructs, and lacks Macintosh specific extensions such as toolbox support. Purchasers of the "early adopter" version will receive an upgrade to the production release at no cost. Owners of Absoft Fortran77 can obtain the Fortran 90 compiler at a reduced price. Absoft also plans to provide their compiler for Windows 95/NT at a later date.

ABSOFT F77 Version 4.2
Absoft have now released version 4.2 for Power PC based Macintoshes. Improvements over version 4.1 include:
- faster speed (typically 19%) of compiled programs
- specific support for the 604 processor
- faster compilation speed
- code generator for 68000 based computers as well as PPC computers
- a new profiler
- native PPC version of MPW
- a large degree of cross platform compatibility with the Absoft F77 for Windows95/NT
- link compatible with MetroWorks Code Warrior.
The Windows95 compiler is now also at version 4.2. Absoft continues to increase the compatibility between their Windows and Macintosh PPC compilers. For those who wish to provide software for both Macintosh PPC and Windows the Absoft compilers are the only simple choice. New facilities in version 4.2 of the Windows95 compiler are:
- installer now provides for a clean deinstallation.
- additional compiler options - treat global data as imported data, treat common declarations as global declarations, do not inline calls to the Fortran run time library, and compile for Visual C++ debugger.

ABSOFT LINUX FORTRAN 77 COMPILER
Absoft has now released a native Fortran77 compiler for LINUX. It is link compatible with gcc and has Pentium optimizations. The price of this product is $1350.

ABSOFT IMSL LIBRARY
The IMSL Mathematics and Statistics Library is now available for both the Power Macintosh and Windows Absoft Fortran77 compilers. The price is $795. Documentation is additional and must be obtained directly from IMSL. In the case of the Windows95 version the library can be easily used without the documentation since full help files are provided. Help files are not provided with the Macintosh version of IMSL.

DELPHI ACCESS TO LF90 DLLs
Programs written with Delphi version 2 (the 32 bit version) can access DLLs prepared with LF90 version 2.0.
Dick Jenssen, based on the following information supplied by Lahey, has written an example in which a Delphi program makes use of an LF90 DLL. The LF90 and Delphi source code for the example is available on request from Computer Transiton Systems. The LF90 code contains both a function and a subroutine which the Delphi program uses to calculate values. In brief one proceeds as follows
1. Use the -win -ml msvb -dll switches when you compile the DLL
2. When you declare the function in Delphi you must use the "var" declaration for the arguments to force them to be passed by reference.
3. Declare the function "stdcall" and specify the name of the DLL after the external statement.
Lahey are not providing technical support on Delphi/LF90 compatibility. They have not fully tested this facility and so consider it as being in an alpha test phase.
One point contained in the LF90 README.DLL file which can be overlooked is that if you distribute a program which uses Lahey DLLs (with any language) it is necessary to have the LF90WIDD.DLL file installed on the computer which uses such a program. LF90WIDD.DLL is part of the LF90 installation so is not an issue on the machine which develops LF90 programs. However you must remember the necessity of having this DLL present on other computers.

UPGRADE OF SPP
An improved release of the economical ($15)) graphics library, Scientific Plotting Package, is due for release in July. Additional facilities provided include PostScript Printer support, higher resolution modes in HP and Epson compatible printers, a speed improvement of a factor of ten in the fill routine, a routine to return pixel colour, and enhanced error handling. The upgrade cost for current users of SPP will be $50.

INTERACTER version 3.15
We should have version 3.15 by Mid May. Those on maintenance contracts will receive the new version automatically as soon as it is available. New facilities in 3.15 include major graphics text handling improvements (standardized international character handling, hardware text may be rotated on many devices, proportional spacing, software generated solid fonts on all devices, support for 'hardware' Times Roman and Helvicia fonts under Postscript, HPGL/2, MS Windows, Presentation Manager and X11), a complete set of Fortran 90 interface definitions for all INTERACTER routines, Check Boxes in forms, Windows-style 'message box' routine for prompt + button windows, inverted coordinate systems allowed in Presentation Graphics, improved DeskJet support, Windows INTERACTER for Absoft, Microsoft PowerStation, and Watcom compilers, OS2 Presentation Manager version for Watcom F77/32, support for the Windows version of Reflection 4, and probably support for Sunsoft Fortran 90 for Solaris 2. An INTERACTER demo disk which illustrates its capabilities under Windows as well as DOS is now available. A separate disk which demonstrates the facilities of the INTERACTER Toolkit has been produced. Those who use make active use of INTERACTER will probably find the Toolkit will significantly improve their productivity.

FORTRAN PERFORMANCE PROJECT
We had hoped that we would be able to include a fairly comprehensive report on the performance of various Fortran compilers in this issue of the newsletter. However we ran out of time so can only include some preliminary findings in this note. The PC compilers we are using are LF90, F90Plus, FTN77, FTN90, Watcom F77/32, and Absoft F77 for Windows95. For the Macintosh PPC we have Absoft F77 and Language Systems F77. We hope to obtain comparative results using Fortran 90 compilers on a range of UNIX workstations - a DEC Alpha, an HP-PA, SUN, and Silicon Graphics. If any reader has access to top of the line models of these or other UNIX machines and is in a position to assist us by compiling and executing our test programs please contact Computer Transition Systems. We have 16 Fortran77 programs and 18 Fortran 90 programs. Our base machine is a 133mHz Pentium with 512K pipeline burst cache and 32MB of main memory. We hope to have all programs compiled with LF90 executed on a 200mHz Pentium Pro machine. In addition we will try to obtain factual results on how performance of the Pentium machine varies as a function of CPU speed by running all LF90 compiled programs on the same machine but with a wide range of CPU speeds. Our initial work has found the following

Compiler             Machine    surge program   overlay     tomcatv
Absoft f77 (W95)      P133          20.2         10.2        33.3
F77LEM/32             P133          21.2         10.4        45.0
F90plus               P133           X           33.8        69.5
FTN77                 P133          33.1         14.7        42.6
FTN90                 P133           X           11.3        61.9
LF90                80486/66        90.7         46.1       249
LF90               686/100:110       ?            ?          80.3
LF90                  P133          16.0          8.5        38.6
LF90                 PP200           9.6          3.1        20.8
M/S Powerstn 4        P133          13.9          8.1        34.8
Watcom F77/32         P133          16.6         10.5        34.7
Absoft F77 PPC*    601-100mHz        ?            ?           ?
                   604-133mHz       16.0          4.7        37.0
LangSys F77 PPC*   601-100mHz       39.2         21.1        56.2
                   604-120mHz        ?            ?          56 

Notes P133- 133MHz Pentium, 200PP -200mHz Pentium Pro, ?-not tested, X-failed to compile,* test done by Absoft, compilers used highest operational optimization,
All compilers are current releases except Watcom which is version 9.5. The Watcom distributors in Australia were not willing to provide us with a test copy. If anyone has a version 10.5 which we might borrow we would greatly appreciate them contacting us.

A NOTE ON PENTIUM BASED PCs
One of our LF90 clients with major performance requirements has carried out a substantial amount of testing on various Pentium mother boards. He finds that 256K of pipeline burst cache makes a dramatic improvement in performance. 256K of Pipeline burst cache is better than 512K of ordinary cache RAM. The difference between 256K and 512K of pipeline burst cache is not major. In his experience mother boards which use the SIS chip set are substantially slower than those which use Triton. In our next news-letter we hope to be able to report on the performance of boards using the new enhanced Triton chip set. We tested a PC which uses the 100/110 MHz CYRIX 686 cpu (manufactured by IBM). This was motivated by some rather major performance claims made by vendors. In the event our benchmark codes compiled with LF90 typically took 3 times longer to execute on the 686 than on our 133MHz Pentium.

USING CHARACTER STRINGS IN I/O - by Alan Miller
A common problem is that of reading a line of data which contains a mixture of characters and numbers in an unknown or complex format. For instance, one client of CTS wanted to read a comma-delimited file from dBase. The problem here was that some of the character fields contained embedded blanks. Another problem is that of reading data files containing missing values which may be denoted by '*', '-', 'NA', '.', etc., depending upon their origin. Fortran 77 introduced two facilities which are very useful for handling
such data. The first was the ability to read from or write to character strings rather than to logical units. These character strings are called internal files. The other facility was the INDEX intrinsic function.
The first stage is to read a line (or record) of input into a character string. The code could look something like:
CHARACTER (LEN=80) :: text
INTEGER :: in_unit = 10
...
READ(in_unit, '(a)') text
Now we have to separate the components of text. Suppose that the only delimiters are commas. The following simple piece of code can be used to do this. i1 is the position of the last delimiter; i2 is the position of the next delimiter.
CHARACTER (LEN=1) :: comma = ','
INTEGER :: i1, i2
...
i1 = 0
DO
i2 = INDEX( text(i1+1:), comma ) + i1 ! Note 1
IF (i2 == i1) EXIT ! Comma not found
READ( text(i1+1:i2-1), 9000 ) something ! Note 2
9000 FORMAT( your format )
i1 = i2
END DO
Note 1. INDEX returns the position of the first occurrence of what you are searching for (a comma in this case), but that position is relative to the start of the character string. Thus if text(i1+1:i1+1) is a comma, then INDEX returns the value 1. If what you are searching for is not found, it returns the value 0.
Note 2. Instead of a logical unit number, we are reading from text. It is sometimes useful here to include 'ERR=' just in case there is a non-numeric character when we were expecting a number.
For many people it will be useful to have a subroutine GET_NEXT_FIELD to extract the next field from a record instead of the simple DO loop in my example above. In Fortran 90 the SCAN function is useful when there is more than one delimiter. Similarly lines of text can be constructed for output using something like:
text(1:12) = 'Started at: '
text(51:63) = 'Finished at: '
WRITE( text(i1:i2), '(i2, ":", i2, ":", i2, ".", i2)' ) hours, mins, secs, hundredths
Then later get the finishing time and write it into text and finally:
WRITE( 6, '(1x, a)' ) text

F90Plus
F90Plus is a Fortran 90 compiler produced by N.A. Software. It is priced at $900 ($570 academic). The source code debugger is an optional extra $395 ($250 academic). Versions are available for MSDOS using the Phar Lap extender (provided), Windows 95, OS2, and SUN (SunOS or Solaris). There is also a personal version of F90Plus for the PC. It is the same as the standard version except documentation is on disk, there are fewer command line options, and compiled programs may not be distributed. It is $550 ($275 academic).
We had significant difficulties with F90Plus in the modest amount of testing we have carried out using the Windows95 and extended DOS versions. Some of this was due to the very minimal (and completely unindexed) documentation. The compiler is very slow and must be invoked two or three times if the source code is not arranged so that subprograms are in dependency order. This restriction should be removed in the next release of the compiler. There are several obsolete features of Fortran77 which are not implemented in F90Plus. These include the ENTRY statement, assigned GOTO, assigned labels, the ASSIGN statement, alternate returns, SEQUENCE records, and INQUIRE by output list. In addition there are restrictions on array arguments being constants, EQUIVALENCE, assumed size and explicit shape dummy array arguments may not be OPTIONAL, different instances of a given COMMON block can only rename fields - they cannot change their types, the first occurrence of a COMMON block is treated as the defining one, and it is preferable for COMMON blocks appear in a BLOCK DATA unit. These omissions and restrictions rendered some of our Fortran77 test programs incompatible with F90Plus. For many users the major drawback of the compiler will be the slow execution speed of the compiled code.



Return to Computer Transition Systems home page

Updated 21 June 1996