home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1995-07-25 | 131.0 KB | 3,363 lines
Subject: Fortran FAQ Newsgroups: comp.lang.fortran,comp.answers,news.answers From: khb@chiba.Eng.Sun.COM (chiba) Date: 02 Aug 1994 23:09:01 GMT Archive-name: fortran-faq Frequency: mostly monthly Expires: 15 September 1994 Last-Modified: 94/7/20 Here are some answers to frequently asked questions. The "author", as is the custom, has appropriated posted responses as seemed apt. I have tried to leave attributions in, as correctly as possible. To anyone who has been offended by omission or otherwise, my apologies. I shall give priority to corrections regarding attribution. No one takes responsibility for any of this text, neither the employer of the "author", the "author", friends of the "author", pets of the "author" nor anyone else. Your mileage WILL vary. A good place to look for FAQ's is: rtfm.mit.edu, /pub/usenet If you have comments/suggestions/edit proposals please send them to me (keith.bierman@eng.sun.com). I do not promise to accept 'em. I encourage others to make better FAQ lists, so I can retire this one. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; summary of changes: q2) updated q7) updated q12) updated q34) moved to 35 q34) new ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Questions: Q0) How should one spell FORTRAN/Fortran? Q1) Is Fortran 90 a Standard? Where can I get a copy of the Fortran 90 Standard? How about electronic copies? Q2) What Fortran 90 translators are available? Q3) I have heard of fortran "lints"; what are they, and where can I get one? Q4) "Why do people use FORTRAN? C is so much better" Q5) Why can't I get an electronic version of the standard? Q6) Where can I get "foo" (some random package) Q7) Where can I get a free compiler? Q8) What is the best compiler for a PC? Q9) How does Fortran 90 relate to FORTRAN '77 and what is Fortran 90? Q10) My compiler is mis-behaving; who enforces the standard? Q11) What are good books on Fortran? Q12) Are there pretty printers for FORTRAN? Flowchart generators? Q13) Why are there aimless debates? Q14) How do I call f77 from C (and visa versa) Q15) What constitutes good FORTRAN style? Q16) For whatever reasons, I want to translate my Fortran into C. What tools are available? Q17) For whatever reasons, I want to translate my existing C code into Fortran. What tools are available? Q18) What is preprocessing, how can it help? How can it hurt? Q19) How can I convert an existing FORTRAN 77 program to the free form source of Fortran 90? Q20) Who creates these silly standards anyway? Q21) How can I read my VAX binary data somewhere else? Q22) My F77 program compiled ok on a <system1>, but gives me heaps of syntax errors on a <system2>. What's wrong? Q23) My F77 program ran ok on a <system1>, but on a <system2> it just gives me strange results. What's wrong? Q24) Is there a WEB for Fortran (and what is WEB anyway)? Q25) Where can I find coded BLAS (and what are coded BLAS?) Q26) How common is DO ... END DO? Q27) Where can I learn more about the history of Fortran? Q28) Fortran text editors? Q29) What are ENCODE and DECODE statements, and how are they translated to standard Fortran? Q30) Tell me about Parallel Fortran dialects, what are they, etc. Q31) Where can I find a f90 tutorial? Q32) Where can I get mathematical software? Q33) What is the best Fortran for... Q34) What classes are available? Q35) f90.faq from Michel Olagnon ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Q0) How should one spell FORTRAN/Fortran? FORTRAN is generally the preferred spelling for discussions of versions of the language prior to the current one ("90"). Fortran is the spelling chosen by X3J3 and WG5. In this document a feeble effort has been made to capitalize accordingly (e.g. vast existing software ... FORTRAN vs. generic Fortran to mean all versions of the standard, and specifically the modern dialect, ISO 1539:1991). From: walt@netcom.com (Walt Brainerd) There was an effort to "standardize" on spelling of programming languages just after F77 became a standard. The rule: if you say the letters, it is all caps (APL); if you pronounce it as a word, it is not (Cobol, Fortran, Ada). See, for example the definitive article describing Fortran 77 in the Oct 1978 issue of the Comm. of the ACM. The timing was such that FORTRAN got put on the standard itself, though many always after that have referred to it as Fortran 77. Of course, there are those who think it is not truly Fortran if not written with all caps. <ed note> ISO 1539:1991 and its ANSI counterpart X3.198-1992 consistently employ the spelling "Fortran" to refer to the language being defined. Reference(s) to the older version employ "small caps" for the "ORTRAN" characters. Q1) Is it a Standard? Where can I get a copy of the Fortran 90 Standard? Fortran "90" is an ISO standard endorsed/adopted by several countries. It is also a US standard in its own right. ANSI adopted it on 21 September 1992 (X3.198-1992). It was adopted by ISO July 1991 as ISO/IEC 1539:1991. <khb> You can't get it from ftp. The various standards bodies get a substantial fraction of their income from sales of standards documents. This is unfortunate <khb> Electronic versions are available, see the note from Walt below. From: julian@cernvax.cern.ch (julian bunn) The new Fortran 90 standard has now been formally published and is available from the ISO central secretariat or from the national member bodies. The price is about $120. Some ordering detail follow. I can supply addresses in other countries not mentioned on request (to METCALF@CERNVM). The document reference is ISO/IEC 1539 : 1991. There is no ISBN. ISO 1, rue de Varembe Case postale 56 1211 Geneva 20 Switzerland Fax: +41 22 734 10 79 cost 185 swiss francs. ANSI 1430 Broadway New York, NY 10018 or American National Standards Institute Attn: Customer Service 11 West 42nd Street New York, NY 10036 Phone: (212)642-4900 8:45-4:45 (EST) Fax: (212)302-1286 BSI 2 Park Street London W1A 2BS DIN Burggrafenstrasse 6 Postfach 1107 D-1000 Berlin 30 AFNOR Tour Europe Cedex 7 92049 Paris La Defence SCC 1200-45 O'Connor Ottawa Ontario K1P 6N7 Mike Metcalf (metcalf@cernvm) and from walt@netcom.com For those of you who don't read comp.lang.fortran, you might be interested to know that I (Walt Brainerd) just called Global Engineering to see if they sell ISO 1539:1991. They do; the price is $225. And You can obtain copies through: Global Engineering Documents 2805 McGaw Ave. Irvine, CA. 92714 (714) 261-1455 (800) 854-7179 New ANSI number ANSI X3.198-1992 How about electronic copies? Return-Path: walt@netcom.com Subject: ISO 1539 in electronic form In accordance with an official agreement with the International Standards Organization, Unicomp is now able to distribute electronic versions of the Fortran 90 standard: "ISO/IEC 1539 : 1991, Information technology--Programming languages--Fortran". The money received from this effort will go partly to fund ISO activities and partly to recover the costs incurred by Unicomp in preparing and typesetting the standard document. The prices are set by ISO. The document can be obtained in three versions: 1. An ASCII version suitable for viewing on a computer terminal using any kind of editor. Cost: USD 125. 2. A PostScript version with a license allowing the purchaser to print n paper copies. Cost: USD 125 + 10n. 3. Complete source in ditroff with macros and software to extract and create the annexes. The source constitutes a fairly high level marked-up document; for example, each program beginning and ending is marked and there are few low-level typographic commands such as size and font changes. Cost USD 1000. I am quite enthused especially about version (2). If you want to have 10 copies for your organization, and it costs $10 to make a printed copy, then the cost to make the 10 copies would be $125 + $200, or just $32.50 per copy, which is a substantial savings over purchasing paper copies. Versions (1) and (3) will be accompanied by a license restricting use to one CPU and prohibiting copying, except for backup purposes, etc. The version (2) license will prohibit distributing any of the printed copies outside of the purchasing organization. If you have special requirements, such as wanting to distribute a copy with each version of your compiler or using the source as a part of your documentation, we can make special arrangements, subject to the approval of the ISO. Please advise me of your requirements and we can work up a proposal together. ISO and Unicomp think this will provide the oft requested access to the standard in electronic form. This is the first time this is being tried, so we hope that organizations will be careful to observe the rules and encourage the continued availability of this and other standards in electronic form. Payment can be made by Visa or MasterCard, or with a check on a US Bank in US funds. We <unicomp> will accept a purchase order only if the amount is $500 or more. Walter S. Brainerd; Unicomp; phone: (415) 949-4052 email: walt@netcom.com; fax: (415) 949-4058; Q2) What Fortran 90 translators are available? From: schumanm@Informatik.TU-Muenchen.DE (Matthias Schumann) From: macphed@dvinci.USask.Ca (Ian MacPhedran) This is the promised summary of my request for information about Fortran 90 (f90) compilers. I am sorry for the delay in getting this posted, but I was away for a week, and still haven't caught up. I received a large amount of information, including a previous summary. Rather than parroting the entire list, I have prepared the following breakdown of the points which interested me. ------------------------------------------------------------------------------ A more current list can be found (if you have gopher) direct from NAG's own Bulletin Board thus: gopher nags2.nag.co.uk 70 Product: NAGware Fortran 90 Compiler Descript: Compiles f90 code to C source, or directly to executable file under MS-DOS. Therefore requires native C compiler as back end on most platforms. Platform: Apollo DN10000, DECstations, HP 9000, IBM RS/6000, NeXT, Intel 386/486 (MSDOS), Sun 3, Sun 4 (SunOS 4.1) VAX/VMS forthcoming. Pricing: Varies with platform. Academic Pricing available. Site licenses are available +------------------------------------------------------------+ | NAGWare F90 Compiler | +------------------------------------------------------------+ | License Fee Options for Initial Computer | +------------------------------------------------------------+ | | Standard | Academic | +--------+-------------------------+-------------------------+ | | Perpetual| Maintenance| Perpetual| Maintenance| | | Fee | Fee | Fee | Fee | +--------+-----------+-------------+-----------+-------------+ | CLASS 1| $895 | $160 | $537 | $97 | (MSDOS) +--------+-----------+-------------+-------------------------+ | CLASS 2| $1,495 | $270 | $897 | $162 | (Low end work- +--------+-----------+-------------+-----------+-------------+ stations) | CLASS 3| $1,995 | $360 | $1,197 | $215 | +--------+-----------+-------------+-----------+-------------+ | CLASS 4| $2,495 | $450 | $1,497 | $270 | (Server class +--------+-----------+-------------+-----------+-------------+ computers) | CLASS 5| $3,295 | $594 | $1,977 | $356 | +--------+-----------+-------------+-----------+-------------+ | CLASS 6| $4,295 | $774 | $2,577 | $464 | +--------+-----------+-------------+-----------+-------------+ | CLASS 7| $5,295 | $945 | $3,177 | $572 | +--------+-----------+-------------+-----------+-------------+ (US Dollars) Contact: Sheila Caswell, Account Manager, Numerical Algorithms Group, Inc. 1400 Opus Place, Suite 200 Downers Grove, IL, USA 60515-5702 Phone: (708) 971-2337 Source: E-mail messages, postings, and paper mailing ------------------------------------------------------------------------------ Product: VAST-90 Descript: Compiles Fortran 90 to Fortran 77 source (requires native Fortran 77 compiler). Also converts Fortran 77 to Fortran 90. Platform: Sun, IBM RS/6000, HP, DEC, Convex, Cray Research. Pricing: Single system: starts at $1250 for Unix workstations; higher prices for larger machines. Academic discount is 10%. Volume discount and site license are also available. Included: VAST-90, f90 driver, f90 library and documentation. Contact: Pacific-Sierra Research Corp. Switchboard: (310) 314-2300 2901 28th Street Fax: (310) 314-2323 Santa Monica CA 90405 VAST-90 e-mail: info@psrv.com ------------------------------------------------------------------------------ Product: PF90 Version 2.0 Descript: Converts f90 programs to f77, then compiles with native f77 compiler. Therefore native f77 compiler is required. Platform: Sun 4, IBM RS/6000, Silicon Graphics, DECstations, Convex, Alliant, IBM 3090 (AIX), Cray Pricing: $595 any platform, single copy. Also available are special site licenses for Universities at only $2000 ($3000 outside the US). This license includes binaries for all platforms that ParaSoft currently supports. Similar license are also available for goverment and commercial sites. Contact: ParaSoft Corporation 2500 E. Foothill Blvd Pasadena, CA 91107 Phone: (818) 792-9941 E-mail: f90-info@parasoft.com Source: E-mail messages, and PostScript advertisement ------------------------------------------------------------------------------ Product: PV version 1.1 of Fortran 90 compiler Descript: Port of NAG's f90 compiler to MS-DOS, together with Salford Software Ltd. Platform: Intel 386/486 Computers Pricing: $1950.00 (single user, US currency) Contact: OTG Systems Inc Phone: (717) 222-9100 Source: E-mail message/summary of previous queries ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ I wish to thank the following people for their help, and apologize to any which I have missed. psrv!bob@uu.psi.com naginc!caswell@sunbird.Central.Sun.COM malcolm@nag.co.uk roman@parasoft.com khb@chiba.Eng.Sun.COM METCALF@crnvma.cern.ch ---------------------------------------------------------------------------- Ian MacPhedran, Engineering Computer Centre, University of Saskatchewan. 2B13 Engineering Building, U. of S. Campus, Saskatoon, Sask., CANADA S7N 0W0 macphed@dvinci.USask.CA macphedran@sask.USask.CA Walt Brainerd walt@netcom.com: Yes, a Fortran 90 system can be had for $134. Salford FTN90 is a full PC Fortran 90 implementation based on the front end developed by the Numerical Algorithms Group, Ltd. The Entry Level system requires that all parts of a program reside in one file (except those that are brought in with an INCLUDE line). That file is compiled and executed without producing a permanent executable file. It runs on a 386SX, 386DX, or 486 system with DOS 3.3 or later. Contact Unicomp for ordering information in North America. +1-415-949-4052 4058 (fax) To find out the price and how to get it outside of North America, contact Salford Software, Venables Building, 5 Cockcroft Road, Salford, M5 4NT, United Kingdom, +44 61 745 5678, +44 61 745 5666 (fax). >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Media: Steve Conway 612/683-7133 Financial: Bill Gacki 612/683-7372 CRAY RESEARCH ANNOUNCES FIRST COMPLETE FORTRAN 90 IMPLEMENTATION FOR SUPERCOMPUTERS Cray Fortran 90-Based Products Will Also Be Marketed For PCs, Workstations, Servers PORTLAND, Ore., Nov. 15, 1993 -- At the Supercomputing 93 conference held here this week, Cray Research, Inc. (NYSE:CYR) announced the Cray Fortran 90 (CF90) Programming Environment, calling it the first native, complete implementation for supercomputers of the Fortran 90 standard. The company said products based on the CF90 Programming Environment will also be marketed for leading personal computers, workstation products and servers. "Our goal is for the CF90 Programming Environment to become an industry standard," said Cray .... The CF90 Programming Environment will be available for Cray Research's complete line of parallel vector supercomputers by year-end 1993. Support for the company's CRAY T3D massively parallel processing (MPP) systems is planned for the second release of the CF90 Programming Environment, due out about a year from now, she said. ... Under the company's new CraySoft initiative, Cray-compatible, CF90- based products for SPARC-based workstations and servers, including Sun products and the recently announced CRAY SUPERSERVER 6400 series from subsidiary Cray Research Superservers, are slated for availability by mid-1994, according to CraySoft manager Leary Gates. Versions will also be developed for other leading workstation products. ... CraySoft will also oversee Cray Research's previously announced agreement calling for Absoft Corp., Rochester Hills, Mich., to develop and market Cray-compatible versions of the CF90 compiler for personal computers based on Intel 486 and Pentium processors, as well as the forthcoming series of PowerPC-based Macintoshes, by mid-1994, he said. .... CRAY RESEARCH, VISUAL NUMERICS SIGN JOINT TECHNOLOGY AND DISTRIBUTION AGREEMENT FOR FORTRAN 90 SOFTWARE PRODUCTS PORTLAND, Ore., Nov. 16, 1993 -- Cray Research, Inc., and Visual Numerics, Inc., today announced at Supercomputing 93 an agreement to cooperate in the development and marketing of leading Fortran 90 technologies. ... DEC Fortran 90 V1.0 for DEC OSF/1 AXP Systems HIGHLIGHTS o New ANSI and ISO compliant Fortran 90 compiler for DEC OSF/1 AXP systems o Enhanced DEC Fortran and DEC Fortran 90 debugger support o Supports High Performance Fortran syntax for parallel processing .... Digital's response to the new Fortran 90 standard and the HPF extensions is a new product called DEC Fortran 90 (SPD 46.41), a member of the DEC Fortran family of COHESION compilers. DEC Fortran 90 is a full featured optimizing compiler .... DEC Fortran 90 provides an expanded array of language features, such as the FORALL statement, many array operations (including the ability to handle arrays by using a concise notation), modules, and numeric computation facilities. Other new features include user defined data types, pointers, new control constructs, and many new intrinsic procedures. .... DEC Fortran 90 will be platform independent, though initially available only on DEC OSF/1 AXP systems. These systems will include Alpha AXP workstations, worksystem farms, and shared memory systems running the DEC OSF/1 operating system. It will generate code to run in serial mode on a single processor or in parallel across multiple processors. It will complement DEC Fortran, Digital's existing Fortran 77 family of products, and in fact, DEC Fortran 90 and DEC Fortran will share the same Fortran runtime libraries. Programs can be written in either language and can call programs written in the other language. ... AVAILABILITY AND ORDERING DEC Fortran 90 V1.0 will be available in June 1994 under QL order numbers. It will also be available as a component of the Digital High Performance Fortran 90 package, which will be available for a limited time at a reduced price. The package will contain one each of a DEC Fortran 90 Concurrent Use license, DEC Fortran 90 documentation, a Digital Parallel Software Environment (PSE) capacity license, and Digital PSE documentation. Order No. Description DEC Fortran 90 V1.0 Licenses and Packages: QL-2AS*M-3B/3C/3D DEC Fortran 90 for DEC OSF/1 AXP, 1/5/10 Concurrent Use licenses QL-2AS*9-AA DEC Fortran 90 for DEC OSF/1 AXP, Traditional license (all tiers) QA-2AS*A-GZ DEC Fortran 90 for DEC OSF/1 AXP, documentation only QA-054*A-H8 DEC OSF/1 AXP Consolidated CDROM QB-2W5*A-A* High Performance Fortran 90 license packages ... TECHNICAL DATA DEC Fortran 90 is fully compliant with ANSI X3.198-1992 and ISO/IEC 1539:1991(E). It also supports many, though not all, DEC Fortran extensions of the Fortran 77 standard. Support for the High Performance Fortran Specification is complete with two exceptions. The first release of DEC Fortran 90 will not support dynamic mapping at other than procedure boundaries (the REALIGN and REDISTRIBUTE directives, and transcriptive parameter passage), and the nesting of FORALL and WHERE statements in FORALL statements and constructs. ... DEC Fortran 90 requires DEC OSF/1 V2.0 or later and requires either the DEC OSF/1 C Developers' Extension or the DEC OSF/1 Developers' Toolkit to be on the development system. The Digital Parallel Software Environment requires DEC OSF/1 V3.0. TECHNOLOGY LICENSING OF DEC Fortran 90 COMPILER FRONT END Because of the large software engineering investment required, hardware vendors may find it difficult to support Fortran 90 on modern RISC and parallel hardware platforms, while researchers may find it difficult to develop compiling strategies for it. To facilitate a common language environment across multiple vendor platforms, Digital is making available the object and source code of the DEC Fortran 90 compiler front end, and related technology, to selected compiler developers, computer hardware vendors (including partners and competitors), and computer researchers on a case-by-case basis subject to terms of a negotiated technology licensing agreement. The DEC Fortran 90 compiler front end analyzes programs written in the DEC Fortran 90 language, diagnoses and reports errors, and translates programs into an internal form suitable for additional processing. Its licensing will provide the following benefits: o End users will benefit from the portability of applications and from increased standardization across multiple vendors and multiple hardware architectures, both serial and parallel. o Compiler developers will benefit from the decrease in the software engineering required to produce a product compiler for Fortran 90. o University computer science compiler researchers will benefit from the ability to use a product-quality component in their research, allowing them to spend more effort on the direct area of their research. __________ OSF/1 is a registered trademark of the Open Software Foundation, Inc. -- From: lionel@quark.enet.dec.com (Steve Lionel) Newsgroups: comp.lang.fortran,comp.unix.osf.osf1 Subject: DEC Fortran 90 for DEC OSF/1 AXP submitted to manufacturing Date: 10 Jun 1994 17:34:26 GMT Organization: Digital Equipment Corporation, Nashua NH Reply-To: lionel@quark.enet.dec.com (Steve Lionel) DEC Fortran 90 V1.0 for DEC OSF/1 AXP (Digital's UNIX), the first in a family of high-quality, high-performance, full language compilers for Fortran 90, was submitted to manufacturing yesterday, ahead of schedule. We expect shipments to begin on June 27. It can be ordered now. DEC Fortran 90 also includes support for High Performance Fortran, including the FORALL statement, directives, "extrinsic" procedures and the HPF library. With the optional Digital Parallel Software Environment, Fortran 90 applications can be automatically "decomposed" and run in parallel on DEC OSF/1 AXP symmetric multiprocessor systems or across a workstation farm. (The PSE is planned for release later this summer.) If you maintain a FAQ or other list of Fortran 90 implementations, please add DEC Fortran 90. If you need specific details for your list, let me know. -- Steve Lionel Mail: lionel@quark.enet.dec.com SDT Languages Group WWW: http://www.digital.com/info/slionel.html Digital Equipment Corporation 110 Spit Brook Road, ZKO2-3/N30 Nashua, NH 03062-2698 "Free advice is worth every cent" Q3) I have heard of fortran "lints" what are they, and where can I get one? Fortran compilers are not required (and most do not) to protect users from themselves, that is to say call sub(1) ... subroutine sub(i) i=i+10 return end Is non-standard complying but the compiler need not tell you about it. Arguably worse, the compiler can produce any result it deems fit, up to and including the start of world war III (assuming the right optional hardware has been installed). Fortran lint programs focus on searching out programming errors (or likely errors) and alerting the user. There are a wide variety of commercial and pd products. A partial list follows: IPT FORTRAN lint 1096 East Meadow Circle, Palo Alto, CA 94303, 415/494-7500. Forwarn from quibus 719 527 1384. QA-FORTRAN from PRL UK 44 372 4621 30 fax 44 372 468353 and *perhaps* (817) 589 0949 FORCHECK from Leiden University ND 31 71 276804 " Announcing: The demo of FORCHECK a Fortran development tool. The MS-Windows (or WABI) based demo of FORCHECK, a Fortran development tool, is now available via anonymous FTP from simtel as pub/msdos/fortran/fckdemo1.zip If you are a Fortran programmer it will be a great asset in developing portable and reliable code. Leiden University email: forchk@Rullf2.LeidenUniv.NL " Actually contrary to the posters claim, this isn't a demo, its a hypertext file. Useful, helpful, but not a demo in the usual sense of the word ;> <khb> FTNCHEK from netlib. One may receive FTNCHEK by mailing to netlib@ornl.gov the following message: send ftnchek from fortran And Ajay Shah, (213)749-8133, ajayshah@usc.edu You may want to mention f2c followed by an ANSI C compiler as a great free fortran lint. I could not have survived writing fortran if it were not for f2c. You need to know some C to deal with the error messages, but that's not a bad price to pay. From: atae@spva.ph.ic.ac.uk (Ata Etemadi)... A very kind soul who wishes to remain anonymous sent me the answer below. .... 1. There is a prettyprinter (called TIDY) available via FTP from simtel20. It's in PD2:MSDOS.FORTRAN or some directory with a similar name. Capsule review: does an ok job, sometimes has trouble with newer extensions (and even some Fortran 77 standard features). Not too bright about making good continuation-line break decisions. Free, and available via FTP, so probably the quickest solution. Includes source (in Fortran). 2. Greg Flint (afc@klaatu.cc.purdue.edu) at Purdue distributes a program called CLEAN77. Pretty good (higher quality than #1 above), also free, but must be obtained from Purdue (not available via FTP, not redistributable). Available for assorted systems: PC, UNIX, etc. In Fortran, comes with source. 3. There is an excellent prettyprinter in TOOLPACK - probably has more options than any other. Has trouble with extensions, such as long variable names. Free, comes in source form, in Fortran. TOOLPACK as a whole is pretty huge, and requires some work to install, but it might be worth it if you stick to pretty much standard Fortran. Available by FTP from Los Alamos (lanl.gov, directory pub/toolpack/NAG). Also distributed commercially for a fee by NAG, who may have a new, improved version that is better than the free one - I don't really know. 4. SPAG, sold by OTG Systems (about $1000 for MS-DOS, more for Unix). Its main function is to restructure GOTOs into IF-THEN-ELSEs, but it also prettyprints. (I think they renamed this within the past year). 5. FOR-STRUCT, sold by Cobalt Blue. Also a GOTO restructurer that prettyprints. About $700 for MS-DOS. Available from most of the big PC software dealers (Programmer's Paradise, etc...) (They now have a "budget" version that costs about $250 but has program-size limitations.) 6. PRETTY, sold by Quibus Enterprises, Inc. Restructures GOTOs, also indents, relabels, moves Formats, etc. $149 for MS-DOS, $500 for Unix workstations. Call (719) 527-1384 for more info. From: "John D. McCalpin" <mccalpin@perelandra.cms.udel.edu> Not too many people use it, but you might want to add TOOLPACK to the list of FORTRAN "lint" packages. Here is the blurb that I send to people who are interested: ====================================================================== TOOLPACK is a large set of utilities written in FORTRAN to do FORTRAN code analysis and transformation. TOOLPACK begins by actually parsing the program with a fully FORTRAN- compliant parser and then does all the code transformations on the parse and comment trees. This means that you cannot confuse TOOLPACK by silly FORTRAN-isms that can easily overwhelm more naive utilities (such as ftnchek). For example, TOOLPACK correctly handles statements such as: D O U B L E P R E C I S I O N A(100,100) doubleprecision fred DO I = 1.2 READ(I,J) = 10. The usual interface to TOOLPACK is a set of 'csh' scripts that run the various TOOLPACK utilities to do specific tasks. The ones you will find most useful are: pol, polx, apt, dapt, decs, getlst, and discard. These are the prettyprinter, precision converter, declaration standardizer, and some necessary utilities. See below for more details. By aware that TOOLPACK is *very* rigorous about the FORTRAN-77 standard. You may or may not consider this an advantage. The scripts are described by the 'scripts' script, which delivers the following: ---------------------------------------------------------------------------- In the Toolpack script summaries below, the section numbers refer to the Unix environment Users' Guide where more detailed information can be found. To obtain on-line information about a script's usage, type its name without any arguments. FORTRAN Analysis Facilities getlst Produce a listing showing statement and token numbers. Report lexical scanning warnings and errors. (3.1.1) syn Report errors and warnings detected by lexical scanning, parsing, and examining a set of symbol attributes. (3.1.2) sem Report errors and warnings detected by lexical scanning, parsing, and examining an extended set of symbol attributes. (3.1.3) pfort Report errors and warnings detected by lexical scanning, parsing, examining an extended set of symbol attributes, checking for unsafe references, and checking conformance to a portable subset of FORTRAN. (3.1.4) statdoc In a user-supplied report template, place information derived from static analysis to assist in documenting the program. Examples of information the user may request are COMMON block usage, symbol attributes, and a graph of subprogram calls. (3.1.5) inst Instrument a FORTRAN program so that the instrumented program, when executed, produces information about program execution. (3.2.1) rundoc Execute a program instrumented by inst and, in a user-supplied report template, place information derived from dynamic analysis to assist in documenting the program. For example, the user may determine the frequency of execution of program segments. (3.2.2) FORTRAN Transformation Facilities pol Format a FORTRAN program under control of user-supplied options in a Polish option file. (4.1.1) polx Construct a Polish option file via a menu-driven editor. (4.1.2) decs Rebuild the declarative part of a FORTRAN program. (4.2.1) apt Transform a single-precision version of a FORTRAN program to double precision or vice versa. (4.3.1) dapt Convert precision and rebuild the declarations, combining the functions of apt and decs. (4.3.2) cname Change the names in a FORTRAN program that satisfy conditions derived from information in either the lexical token stream or the symbol table or both. (4.4.1) lname Transform a FORTRAN program containing long names to a program with standard names. (4.4.2) stf Rebuild the flow of control in a FORTRAN program to standardized form. (4.5.1) ucs Transform nests of DO loops matching certain paradigms so that the transformed code executes more efficiently on vector machines. (4.6.1) Miscellaneous Facilities fdiff Compare two FORTRAN programs at the lexical token level. (5.1.1) dac Compare two data files, neglecting certain formatting differences and numerical differences smaller than a given tolerance. (5.1.2) vcon Create, edit, and retrieve versions of a file contained in a version file. (5.2.1) discard Remove unneeded files created by the above scripts. (5.3.1) scripts Print this summary of the scripts. (5.4.1) ---------------------------------------------------------------------------- TOOLPACK can be obtained by anonymous ftp from perelandra.cms.udel.edu in the directory pub/Lang/Toolpack/. The UNIX version is in the file toolpack.tar.Z Serious hackers will want the versions in the Distrib directory. The package is known to compile on Silicon Graphics and Sun machines, though the Makefile is reasonably braindamaged. You will need about 16 MB for the stripped executables on an SGI machine. Figure on double that for compiling the package..... Have fun! -- John D. McCalpin mccalpin@perelandra.cms.udel.edu Assistant Professor mccalpin@brahms.udel.edu College of Marine Studies, U. Del. John.McCalpin@mvs.udel.edu Aside from code reformatting, there is the other meaning of pretty printing ... From: James F Hall <james.f.hall@uwrf.edu> .... Second, on Q12 in the faq, about available pretty printers for Fortran... Some time ago, I found a pretty printer called "lgrind", which converted a Fortran program into LaTeX/TeX. This text could be included in a larger LaTeX/TeX file, or processed immediately. I chose not to use this because I found it was not the best use of my quota, but others may find it useful. Lgrind may be found using an archie search: archie lgrind ;;;; Q4) "Why do people use FORTRAN?, C is so much better" One should avoid such pointless arguments .... if you feel this way, don't subscribe to comp.lang.fortran. This sort of question always triggers off a protracted discussion, the highlights of which are typically: a) FORTRAN and C have different semantics. A FORTRAN optimizer knows more about aliasing, function interactions, and I/O. A C optimizer has to infer or compute such information. C bigots typically have neither written such optimizers nor worked with folks who do it for a living, and are prone to dismiss such arguments as being petty and neolithic. FORTRAN programmers are often a bit more in touch with high performance computing, and are unwilling to bet that heavily on compiler wizardry. <enter Peter van der Linden author of "Expert C Programming" > In addition, ANSI C section 2.1.2.3 on Program Execution makes it clear that associative and commutative regrouping of operands is only allowed if it produces the same result as it would if the regrouping had not been done. Where it makes a difference is on hardware that produces an exception on arithmetic overflow, and the regrouping either causes or avoids an exception, that otherwise would not/would take place. In ANSI C a = a + 32760 + b MUST be evaluated as (a + 32760) + b NOT as a +(32760 + b) UNLESS the overflow exception will be the same in either case. Fortran is somewhat less tightly-buttoned about this, and allows the compiler-writer to regroup the expression and evaluate it in either order. Thus, in Fortran, whether you get an exception or not depends on the compiler, the level of optimization, and the hardware. In ANSI C, itonly depends on the hardware. Of course, compiler options, vendor extensions and the like sometimes narrow the difference. Also, some Fortran compilers do not take advantage of all of these features of the language, thus narrowing the gap in the other direction. On any given code, on any given system, all bets are off. b) There is a vast body of existing FORTRAN code (much of which is publically available and of high quality). Numerical codes are particularly difficult to "vet", scientific establishments usually do not have large otherwise idle programming staffs, etc. so massive recoding into any new language is typically resisted quite strongly. c) Fortran tends to meet some of the needs of scientists better. Most notably, it has built in support for: - variable dimension array arguments in subroutines - a compiler-supported infix exponentiation operator which is generic with respect to both precision and type, *and* which is generally handled very efficiently or the commonly occuring special case floating-point**small-integer - complex arithmetic - generic-precision intrinsic functions d) Retraining staff is quite expensive. e) It is sometimes argued that: - Jonathan Thornburg <also responsible for misc. other fixups> Fortran tends to be easier for non-experts to learn than C, because its "mental model of the computer" is much simpler. For example, in Fortran the programmer can generally avoid learning about pointers and memory addresses, while these are essential in C. More generally, in Fortran the difference between (C notation) x, &x, and often even *x is basically hidden, while in C it's exposed. For non-experts this makes Fortran a considerably simpler language. Because of this relative simplicity, for simple programming tasks which fall within its domain, (say writing a simple least-squares fitting routine), Fortran generally requires much less computer science knowledge of the programmer than C does, and is thus much easier to use. Q5) Why can't I get an electronic version of the standard? Someday, perhaps you can. However, at the moment the various standards bodies finance some fraction of their work via sales of standards documents. ISO and ANSI have both claimed copyright to the finished standard, so those who would make and distribute copies should be forewarned. It should be noted that various people are working to correct this; but it is unlikely to ever become free. Q6) Where can I get "foo" (some random package) Q6) Where can I get "foo" (some random package) contributed by: Marc R. Roussel mroussel@alchemy.chem.utoronto.ca Use archie. archie is an online database of what is available and where on the "net". Archie can be used either via telnet or by mail. For information about archie send mail archie@archie.rutgers.edu subject: help And you will get back copious directions on how to use archie. If you prefer interactive experimentation, telnet to archie.rutgers.edu and log in as archie. No password will be required. The first thing you will be shown is a list of other archie servers. If one of these servers is geographically much closer to you than Rutgers, NJ, please disconnect (by typing 'quit') and use that one. To save you this step, here is the latest list of archie sites: archie.rutgers.edu 128.6.18.15 (Rutgers University) archie.unl.edu 129.93.1.14 (University of Nebraska in Lincoln) archie.sura.net 128.167.254.179 (SURAnet archie server) archie.ans.net 147.225.1.2 (ANS archie server) archie.au 139.130.4.6 (Australian server) archie.funet.fi 128.214.6.100 (European server in Finland) archie.doc.ic.ac.uk 146.169.11.3 (UK/England server) archie.cs.huji.ac.il 132.65.6.15 (Israel server) archie.wide.ad.jp 133.4.3.6 (Japanese server) I believe that all of these servers run the mail server as well as the telnet and archie server software. (The archie server is a third way to use archie. It's probably the best way, but it requires that you install software.) Once you logged into an archie server, you will want to make sure that all the information you will retrieve will be mailed to you. Type set mailto userid@machine.foo.edu where, of course, you will substitute your own email address for the made-up one shown above. You are now ready to search the database. If at any time you want to know what options are available to you, type help. To search for a program or file, type prog foo where foo is the name of the program or file required. Once your search is done, type 'mail' to have the output sent to you. (The output will almost always be several pages long.) Then type 'quit' to exit. Q7) Where can I get a free compiler? One such is f2c. From: mwm@a.gp.cs.cmu.edu (Mark Maimone) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Fortran to C translator Keywords: fortran, C, translator, f2c Date: 13 Sep 90 01:43:30 GMT Organization: Carnegie-Mellon University, CS/RI Since there have been several requests for a Fortran to C translator in the past week, I'm reposting the announcement about f2c. The short answer is you can get f2c by anonymous-ftp from research.att.com in directory dist/f2c. ------------------------------------------------------------------------------ Source for f2c, a Fortran 77 to C translator jointly developed by folks from Bell Labs, Bellcore, and Carnegie Mellon, is now freely available. F2c was derived from the original UNIX operating system's f77(1), and the generated C follows f77's calling conventions; on some machines, the resulting object files are interchangeable with (and behave indistinguishably from) objects compiled by f77. The main "advantage" of f2c is that it converts ANSI standard Fortran 77 into C without manual intervention, at least when invoked by a suitable script or makefile (that may need to exercise an f2c option to ensure that COMMON blocks are defined just once). The main "problems" are that f2c does no code restructuring (e.g., gotos are preserved) and that Fortran I/O gets converted into a bunch of calls; thus the translated C code doesn't look too pretty, and in general one would need to maintain the Fortran rather than its translation into C. [F2c is not meant to displace the services of commercial vendors whose business is to convert Fortran into maintainable C.] There is a plethora of options, many of which exist to support different compilation environments for the translated C (e.g., ANSI C or C++ compatibility, different type sizes, separate files for COMMON blocks to appease "smart" linkers). So far f2c (and f2c-generated source) has compiled successfully on many machines: Sun, Vax, IBMRT, Apollo, SGI, MIPS, and Cray to name a few. F2c has been under test by the net community for over a year and has been verified on the NBS tests, several large math libraries, floating point tests, even code for laying cable on the ocean floor! To find out about f2c, send the following E-mail message to netlib (netlib@research.att.com or research!netlib): send index from f2c Your message will be answered automatically (by a program -- see CACM vol. 30 #5 (May, 1987), pp. 403-407). You will receive a reply explaining how to automatically acquire f2c source (about 600K), f2c library source (130K), and supporting info (man page, etc). Or you can anonymous-FTP to research.att.com and look in directory dist/f2c at these files: all.Z -- 250K compressed shar file for f2c f2c.ps.Z -- 24 page tech report describing f2c index -- general info about files libf77.Z, libi77.Z -- compressed shar files for libraries ****************************** DISCLAIMER ****************************** Careful! Anything free comes with no guarantee. ************************************************************************ ---------------------------------------------------------------------- Mark Maimone phone: (412) 268 - 7698 Carnegie Mellon Computer Science email: mwm@cs.cmu.edu cmcspt!mwm@cs.cmu.edu Notes: f2c accepts only fairly vanilla FORTRAN; vendor supplied f77's usually produce better quality code, and accept a wider variety of codes. The FSF is working on a f77 front end to be integrated with the gcc back end. "A mailing list exists for those interested in the Fortran front end for GCC. To subscribe, ask: `info-gnu-fortran-request@prep.ai.mit.edu'. Or try "finger -l fortran@gate.gnu.ai.mit.edu" There is no FSF project to do a f90 front end. The author of the gf77 front end is willing, if anyone will fund it. Mike Craymer Geodetic Survey of Canada craymer@emr.ca ___________________________________________________________________ Newsgroups: comp.lang.fortran,comp.compilers From: wgalazka@chem.uw.edu.pl (Wojciech Galazka) Subject: Free FORTRAN compilers - summary Date: Wed, 26 Jan 1994 12:12:01 GMT Here's a summary of postings sent in reply to my letter sent to comp.lang.fortran about availability of a free FORTRAN compiler. Thanks to all who responded to me. --------------------------------------------- From: Greg Lindahl <gl8f@fermi.clas.virginia.edu> Subject: Re: Public Domain/Shareware version of Fortran Newsgroups: comp.lang.fortran f2c is quite free. --------------------------------------------- From: zrzm0111@helpdesk.rus.uni-stuttgart.de (MUFTI) Newsgroups: comp.lang.fortran Subject: re: CHEAP MSDOS fortran compiler: was: nocommercial users have to pay nothing for bcf77 Organization: User Helpdesk Comp. Cent. (RUS) U of Stuttgart, FRG Someone asked for a cheap MSDOS fortran compiler for students. The bcf77 by andreas koesterli has a student version, which costs nothing. The student version may not be used in any comercial enviroment and problems. Its a version that write a none standart object format and requires 640KB. If all input is in UPPERCASE, it supports full fortran 77 standart. The site is ftp.uni-stuttgart.de, the compiler can be found in /pub/systems/pc/lang/fortran/compiler/bcf77.zip. It can be access via ftpmail@ftp.uni-stuttgart.de for those of You without ftp. PI at the User Help Desk Comp.Center U of Stuttgart, FRG 26 years to go ! EMail: pi@rus.uni-stuttgart.de Phone: +49 711 685-4828 (aka Kurt Jaeger) ------------------------------------------------- From: barbee@noir.llnl.gov (Troy Barbee) Newsgroups: comp.lang.fortran Subject: re: CHEAP MSDOS fortran compiler: was: nocommercial users have to pay nothing for bcf77 In article <1991Dec11.160531@IASTATE.EDU>, cfrandal@IASTATE.EDU (Charles F Randall) writes: |> Note that the .txt file for this NOT in English: |> |> BC-FORTRAN77 Version.b besteht aus Compiler, Linker, |> Modulbibliothek und einem residenten Laufzeitsystem, das |> u.a. einen einfachen Debugger enthaelt. Diese Version |> laeuft auf einem MS-DOS Rechner mit 640kB RAM. Eine |> Festplatte ist nicht erforderlich. Hiermit soll in |> einfacher Weise ein Compiler fuer Programmierkurse |> zur Verfuegung stehen. Dem kommt entgegen, dass |> entsprechende Compiler fuer ATARI ST und AMIGA existieren. |> |> Anfragen nach Zusendung einer anderen oder neueren Version |> werde ich nur noch beantworten, wenn DM 20.- (Schein oder |> Scheck) Aufwandsentschaedigung (Diskette, Umschlag, Porto |> und Zeit) beigefuegt sind. Ich versende ausschliesslich |> 3 1/2 Zoll Disketten. |> |> Anybody willing to translate? Here's a quick and dirty translation (i.e., I didn't look in my dictionary, so the sentences in [] are just rough translations) BC-FORTRAN77 Version b consists of a compiler, linker, module library, and a resident runtime system that contains (among other things) a simple debugger. This version runs on a MS-DOS computer with 640KB RAM. A hard disk is not required. [The intent is to provide a compiler for programming courses in a simple manner. Similar compilers exist for the ATARI ST and the AMIGA.] Requests for another or a newer version will only be answered if they are accompanied by DM 20.- (check or cash) to defray costs (diskette, envelope, postage, and time). I can only send 3 1/2 inch diskettes. --------------------------------------------------------- From: pmh2962@zeus.tamu.edu (Pat Hayes) Newsgroups: comp.lang.fortran Subject: Re: free fortran for PC running MSDOS >From Public software List (PsL), Houston, TX: (their number 3940) "BC-FORTRAN 1.3b, is a FORTRAN compiler from Germany. The documentation is in German. Sample source code is included. The compiler generates big, inefficient EXE programs and is offered only because there are no other pd/shareware FORTRAN compilers available. 700K of disk space is required." -------------------------------------------------------------- From: pmh2962@zeus.tamu.edu (Pat Hayes) Newsgroups: comp.lang.fortran Subject: BC Fortran -- PD/Share Fort Compiler -- English Docs Available Can you figure this out? Here's info about translated docs for that PD/SH Fort compiler I mentioned. ******************************************* From: "DOYLECM@ROSEVC.Rose-Hulman.Edu" 3-FEB-1992 00:53:12.08 Subj: BC F77 documentation available From: PVT Joe Snuffy <DOYLECM@ROSEVC.Rose-Hulman.Edu> I am sort of asking for your help here. I translated the documentation for BC-F77 and am willing to make it available to people. However, my newsreader will not let me post with distribution wider than our local site (or at least, that appears to be what is going on). Could you do me a favor and post the text that follows? You might also tell those others who write to you that this translation is available. Chris Doyle DoyleCM@RoseVC.Rose-Hulman.Edu Stuff to be posted starts below this line. Adjust header/newsgroup/etc as appropriate. Thanks! -------------------------------------------------------------------------------- Newsgroups: comp.lang.fortran From: doylecm@HYDRA.ROSE-HULMAN.EDU Subject: Re: free fortran for DOS PC/BCF77 Date: Mon, 3 Feb 1992 00:33:21 GMT For those people who FTP this thing and want to be able to read the documentation, I have translated the README file into English and will let you have a copy of the translation upon request. Translation is about 400 lines long. BCF77 (FORTRAN 77 compiler, written by Andre Koestli) distribution. This compiler/linker/run-time module and supporting files are available via anonymous FTP from "rusmv1.rus.uni-stuttgart.de" as the file "/soft/pc/lang/fortran/compiler/bcf77.zip". ---------------------------------------------------------- Newsgroups: comp.lang.fortran From: burton@asdsun.larc.nasa.gov (John Burton) Subject: Re: BC Fortran -- PD/Share Fort Compiler -- English Docs Available There is another alternative...netlib@research.att.com distributes f2c which is a translator for converting FORTRAN 77 code into C (ANSI C or K&R C), or C++ (I think). There is a version of f2c that is ported to MSDOS machines. How fast & efficient the code is now depends on how good your C compiler is (I hear MSC and BC++ do a pretty good job of optimization)... f2c is available via anonymous ftp...ftp to research.att.com & login as netlib. ----------------------------------------------------- From: icsu8209@cs.montana.edu (Lou Glassy) Newsgroups: comp.lang.fortran Subject: Re: BC Fortran -- PD/Share Fort Compiler -- English Docs Available In article <3FEB199217343244@zeus.tamu.edu> pmh2962@zeus.tamu.edu (Pat Hayes) writes: [comments about an english translation of the BCF77 readme.doc] Has anyone attempted translating the error messages inside the compiler? (This involves editing the binary.) from the translation a friend provided for me: "...the error messages are self-explanatory, except for the following: [a page or two of error messages] ..." the self-explanatory error messages (not listed in the readme.doc) comprise the bulk of the error messages, i think. -------------------------------------------------------- >From alan@dmsmelb.mel.dms.CSIRO.AU Wed Jan 26 12:27:49 1994 Subject: Re: Public Domain/Shareware version of Fortran BCF is available by ftp from many places. For instance, it is in the directory fortran on simtel20. I did `archie bcf' and found it is also in directory /usenet/comp.archives/languages/fortran on src.doc.ic.ac.uk. On simtel20 it is file: bcf7713b.zip You may find it has the same name elsewhere. There have been many complaints about bcf - but it is free. I recommend Lahey's Personal Fortran PF77L to those who have been disappointed with bcf. I believe it costs US$99. Alan Miller, Quality Improvement Project CSIRO Division of Mathematics & Statistics, Melbourne, Australia Phone: +61 3 542-2266 Fax: +61 3 542-2474 E-mail: alan@mel.dms.csiro.au Mail: CSIRO DMS, Private Bag 10, Rosebank MDC, Clayton, Vic. 3169, Australia Wojciech Galazka -- Wojciech Galazka <wgalazka@chem.uw.edu.pl> Computer Center Chemistry Department, University of Warsaw Pasteura 1, 02-093 Warsaw, Poland Q8) What is the best compiler for a PC? There are many products, some are quite good. Few are free. f2c and gcc can be had for the PC environment. Popular ones are: Lahey (very fast compilation; excellent reputation for support) Watcom (touted for good optimization) MicroWay (support for odd floating point units) LPI (multi-platform support) MicroSoft (various good hooks into windows and such) Absoft (multi-platform support) It is beyond the scope of a faq to provide a commercial endorsement. Q9) How does Fortran 90 relate to FORTRAN '77? With a few minor exceptions, Fortran 90 is a superset of X3.9-1978 FORTRAN. But this does not mean that all "77" codes will port sans changes. Many (if not most) programmers employed constructs beyond the '77 standard, or rely on unspecified behavior (say, assuming that an OPEN of an existing file will position the file pointer to just past the last record already written) which has changed (that is to say, has become specified). This leads to the obvious question, what is new in Fortran 90? A complete answer would require considerable text. Some of the most obvious additions are: 1) array notation (operators, etc.) 2) dynamic memory allocation 3) derived types and operator overloading 4) keyword argument passing, INTENT (in, out, inout) 5) modules 6) modern control structures 7) free format source code form 8) other stuff While it is always tricky to characterize the motives of a large group of people, I <khb> am inclined to try as follows: '90 incorporates two sets of improvements: (1) relatively minor fixups that *could* have been done earlier (2) relatively major changes to enable better software engineering practices. Sometimes a "minor" fixup has major effect, such as addition of free form source form combined with canonization of the MIL-STD 1753 INCLUDE. I further go off on a limb and assert that it was the goal of the *committee* to evolve Fortran in a fashion to enable it to continue to be the premier language for scientific computation. Q10) My compiler is mis-behaving; who enforces the standard? ANSI and ISO standards do not usually have a particular enforcement mechanism. Local bodies sometimes do. However, it should be borne in mind that if *your* source code is not standard compliant there is *NO* obligation for a FORTRAN ('77 and before) compiler to do *ANYTHING* in particular. In Fortran (90) the text in "constraints" must be tested and a warning produced (compiler option can be used to evade this, of course). Some (notably Guy Steele, with respect to another standard) have noted that when non-standard complying code is encountered, a compiler may do *ANYTHING* including initation of Global Warfare. Keep this in mind. When you do find a bona fide compiler bug, you are generally best served by reporting it to the *vendor*. If you neglect to tell the vendor, how can you complain about it not being fixed? When reporting a *suspected* bug be sure to be quite specific about the computer system, operating system rev level (patches applied if known) and *compiler*version* (and patches thereof). It is very hard for people to read your mind; but they will try. The attempts are often entertaining, sometimes helpful, but always an inefficient use of people-time and net-bandwidth. Also note that it is generally helpful if you cut down the example to the smallest size you can. Vendors are developers too; the tendency is invest time/money where one can get the biggest bang for the buck. Q11) What are good books on Fortran? Don't know if they are good. Inclusion in the list is not endorsement. Have misplaced name of the compiler of the original list <sorry> Author Title Year Morgan/Schonfelder Programming in Fortran 90 1993 Kerrigan Migrating to Fortran 90 1993 Kruger Efficient Fortran Programming 1990 Mojena/Ageloff FORTRAN 77 1990 Metcalf/Reid FORTRAN 90 EXPLAINED 1990 Boyle FORTRAN 77 PDQ 1989 Bezner FORTRAN 77 1989 Tremblay PROGRAMMING IN FORTRAN 77 1988 Salmon ... ENGINEERS & SCIENTISTS WITH FORTRAN 77 1988 Nyhoff/Leestma FORTRAN 77 FOR ENGINEERS & SCIENTISTS 1988 McCracken/Salmon ... ENGINEERS & SCIENTISTS WITH FORTRAN 77 1988 Davis/Hoffman FORTRAN 77: A STRUCTURED DISCIPLINED STYLE 1988 Barnard/Skillicorn FORTRAN 77 FOR ENGINEERS AND SCIENTISTS 1988 Mashaw PROGRAMMING STRUCTURED FORTRAN 77 1987 Cole FORTRAN 77: A STRUCTURED ... APPROACH 1987 Boillot UNDERSTANDING FORTRAN-77 1987 Starkey/Ross FUNDAMENTAL PROGRAMMING WITH FORTRAN 77 1986 Rouse/Bugnitz INTRODUCTION TO FORTRAN 77 1986 Ratzer FORTRAN 77 COURSE 1986 Page FORTRAN 77 FOR HUMANS 1986 Lehman ... SOCIAL SCIENCES: ALGORITHMS & FORTRAN 77 1986 Smith FORTRAN 77: A PROBLEM-SOLVING APPROACH 1985 Shelly FORTRAN 77: AN INTRODUCTION 1985 Nickerson FUNDAMENTALS OF FORTRAN 77 PROGRAMMING 1985 Metcalf EFFECTIVE FORTRAN 77 1985 McKeown STRUCTURED PROGRAMMING USING FORTRAN 77 1985 Hume FORTRAN 77 FOR SCIENTISTS & ENGINEERS 1985 Dillman PROBLEM SOLVING WITH FORTRAN 77 1985 Brainerd FORTRAN 77 FUNDAMENTALS AND STYLE 1985 Borse FORTRAN 77 & NUMERICAL METHODS FOR ENGINEERS1985 Adman FORTRAN 77 SOLUTIONS NON-SCIENTIFIC PROBS. 1985 SSI, Inc. Staff FORTRAN 77 REFERENCE 1984 Etter PROBLEM SOLVING WITH STRUCTURED FORTRAN 77 1984 Etter PROBLEM SOLVING USING FORTRAN 77 ? Dyck FORTRAN 77: A STRUCTURED APPROACH ... 1984 Chivers/Clark FORTRAN 77: A HANDS ON APPROACH 1984 Adman FORTRAN 77 FOR NON-SCIENTISTS 1984 Willamson/Levesque * A GUIDEBOOK TO FORTRAN ON SUPERCOMPUTER 1989 Rule FORTRAN 77: A PRACTICAL APPROACH 1983 Rouse/Bugnitz PROGRAMMING THE IBM PC: FORTRAN 77 1983 Nyhoff/Leestma PROBLEM SOLVING WITH FORTRAN 77 1983 Marateck FORTRAN 77 1983 Lehmnkuhl FORTRAN 77 1983 Law ANSI FORTRAN 77: INTRO. TO SOFTWARE DESIGN 1983 Holoien/Behforooz ... STRUCTURED PROGRAMMING WITH FORTRAN 77 1983 Grout FUNDAMENTAL ... PROGRAMMING USING FORTRAN 77 1983 Fleming/Redish THE U. S. MC MASTER GLOSSARY OF FORTRAN-77 1983 Cole ANSI FORTRAN IV WITH FORTRAN 77 EXTENSIONS 1983 Wu ANSI FORTRAN IV & 77 AND BUSINESS PROGRAMS 1982 Pollack STRUCTURED FORTRAN 77 PROGRAMMING 1982 Katzan FORTRAN 77 1982 Gibson/Young INTRODUCTION TO PROGRAMMING USING FORTRAN 77 1982 Ellis STRUCTURED APPROACH FORTRAN 77 PROGRAMMING 1982 Durgin FORTRAN 77 1982 Nanney A PROBLEM-SOLVING APPROACH USING FORTRAN 77 1981 Merchant FORTRAN 77: LANGUAGE AND STYLE 1981 Khailany BUSINESS PROGRAMMING FORTRAN IV/ANSI FORTRAN 1981 Ashcroft PROGRAMMING WITH FORTRAN 77 1981 Wagener FORTRAN 77 ? Wagener PRINCIPLES OF FORTRAN 77 PROGRAMMING 1980 Meissner/Organick FORTRAN 77 FEATURING STRUCTURED PROGRAMMING 1980 Hume/Holt PROGRAMMING FORTRAN 77 1979 Balfour PROGRAMMING IN STANDARD FORTRAN 77 1979 Brainerd Programmer's guide to Fortran 90 1990 Adams et al Fortran 90 Handbook 1991 Counihan Fortran 90 1991 O'Reilly&Assoc Unix for FORTRAN Programmers 1990 From: dtm@castle.ed.ac.uk (D Muxworthy) Newsgroups: comp.lang.fortran Subject: Fortran 90 text books (was: Fortran 8x Information sought) Date: 16 Jul 93 12:10:32 GMT Distribution: comp Organization: Edinburgh University In article <KUMAZAWA.93Jul15114854@sutkbcn1.c1.kagu.sut.ad.jp> kumazawa@c1.kagu.sut.ad.jp (Tomonobu Kumazawa) writes: > > I would appreciate any information (books, information materials, > contacts of software publishers etc.) related to FORTRAN 8x. Here is a bibliography of Fortran 90 text books. Any information on additions would be welcome, as would the ISBN number of Schobert's book. 1. Fortran 90 - Counihan, Pitman, 1991, ISBN 0-273-03073-6. 2. Fortran 90; Approche par la Pratique - Lignelet, Se'rie Informatique E'ditions, Menton, 1993, ISBN 2-090615-01-4. 3. Fortran 90: eine informelle Einfu"hrung - Heisterkamp, BI-Wissenschaftsverlag, 1991, ISBN 3-411153-21-0. 4. Fortran 90 Explained - Metcalf and Reid, Oxford University Press, 1992, ISBN 0-19-853772-7 (also available in French, Japanese [from Oct 1993] and Russian [Q4, 1993] translation). 5. Fortran 90 Handbook - Adams, Brainerd, Martin, Smith and Wagener, McGraw-Hill, 1992, ISBN 0-07-000406-4. 6. Fortran 90; Initiation a` partir du Fortran 77 - Aberti, Se'rie Informatique E'ditions, Menton, 1992, ISBN 2-090615-00-6. 7. Fortran 90 Referenz-Handbuch: der neue Fortran-Standard - Gehrke, Carl Hansen Verlag, 1991, ISBN 3-446163-21-2. 8. Programmer's Guide to Fortran 90 - Brainerd, Goldberg and Adams, McGraw-Hill, 1990, ISBN 0-07-000248-7. 9. Programmieren in Fortran - Langer, Springer Verlag, 1993, ISBN 0-387-82446-4. 10. Programmierung in Fortran 90 - Schobert, Oldenburg, 1991. 11. Programming in Fortran 90 - Morgan and Schonfelder, Blackwell Scientific Publications, 1993, ISBN 0-632028-38-6. 12. Software Entwicklung in Fortran 90 - U"berhuber and Meditz, Springer Verlag, 1993, ISBN 0-387-82450-2. David Muxworthy Edinburgh University Q12) Are there pretty printers for FORTRAN? Flowchart generators? Yes. One such is SPAG: OTG <usa> voice 717 222 9100 fax 717 229 9103 Authors are Polyhedron Software Ltd Magdalen House 98 Abingdon Road Standlake Witney Oxon OX8 7RN Tel 0865 300 579 part of their plusFORT product. Another is Fortran development Tools from Quibus 714 527 1384 Also FOR_STRUCT from cobalt-blue. 404 518 1116 fax 404 640 1182 These more than pretty print, they optionally restructure your code (duplicating code as needed to tidy up strange GOTO lists, turning them into IF-THEN chains, and etc.). From: dappel@grafted.UUCP (Dave Appel) Newsgroups: comp.lang.fortran Subject: Re: code beautifier wanted Date: 4 Mar 92 21:30:25 GMT Organization: GRAFTED, Central Indiana's Usenet BBS 317-881-4369 wg@cbnewsm.att.com (Bill Gieske) writes: > I have tons of old FORTRAN code, most of it in upper case, the majority > of it not indented. Is there a code beautifier, either PD or $$ that I > can run the code through to improve the readability, hence the main- > tainability? > Reply to me direct. I will summarize if appropriate. > Bill Gieske > AT&T Bell Laboratories > wg%alux2@att.research.com Call "The Connection at 800-336-1166" and ask for their software catalog. In their catalog that I have, Sprint 1992, there is an ad on page 39 from AutoCASE Technology. They have a product called "AutoFLOW-FORTRAN" that lists for $1,995. It claims to automatically document your existing source code. AutoCASE's number is 408-446-2273. On page 93 is an ad from POWERLINE Software Inc. Their number is 800-257-5773, 206-623-9204. They offer a product called SOURCE PRINT+, which they call a code management tool with "multi-style formatting with structured code blocking." They have a Fortran/Basic version for $169, and a Delux Multi-language version for $249. This program is for DOS (MS-DOS presumably) Windows, and OS/2. Hope this helps. -- Dave Appel The Grafted Branch BBS 317-881-4369 internet: dappel@grafted.UUCP uucp: ..!uunet!grafted.UUCP!dappel -= newsfeeds available, contact robert@towers.rn.com =- Hindsight/Fortran Summary: Features include the ability to draw an interactive structure chart and display coverage, software complexity and performance information on the structure chart. There are also code tracing features, for instance 3 logic diagrams are produced. Common blocks can be traced through the structure charts, including specific variables within common blocks. Hindsight is excellent for documentation, code inspection, and bringing new software engineers up to speed on new code. For more information or a free demo copy, contact: Rich Fienberg, National Account Manager Advanced Software Automation, Inc. 3130A Coronado Dr Santa Clara, 95054 Phone: 408 492-1668 Fax: 408 492-1669 Free Seminars Fridays 2-4pm Email: rich@hindsight.com Alternative contact (if Dan cannot be reached: support@hindsight.com Hindsight/FORTRAN Version 1.0 features Hindsight/FORTRAN Version 1.0 is a fully integrated software maintenance, testing, and re-engineering environment which addresses many problems of the software development cycle, from design to maintenance. Hindsight/FORTRAN Version 1.0 parses FORTRAN source code, decomposes system structure, and from this analysis, produces a single database from which all of Hindsight's charts, diagrams and reports are produced. The results of Hindsight's analysis is a detailed picture of the static structure of the software system, a representation of the common and local data, and connections to the dynamically collected run-time data. From this, Hindsight generates active structure charts where the user can isolate logical subtrees to analyze both the parents and the children of a selected function. Hindsight collects and analyzes performance, complexity, and test coverage data. With the structure chart, the user can display this data in a graphical and easy to use format. From the structure chart, the user can edit multiple functions at a time without having to specify the file or directory path where the file exists. Hindsight even displays the use of common blocks on the structure chart. Lastly, Hindsight generates logic diagrams for the entire program, provides point-and-click tracing between high-level and detailed logic with active line numbers, and generates over fifty detailed reports. All capabilities mentioned above are integrated in a menu driven environment utilizing the OpenLook or Motif Graphical User Interface. Engineers only need to specify a list of source files to be analyzed and select the operation and parameters for their purposes. Hindsight provides the ability for multiple diagrams and reports to be produced simultaneously during a single Hindsight session. Hindsight/FORTRAN Version 1.0 provides an innovative technique to graphically represent a software system. The structure chart reflects the system structure, from which the user can get a clear overview of the program being examined. Hindsight also allows the user to view or edit the original code with a click on any subprogram box in the structure chart. A major time-saving advance is Hindsight's ability to reanalyze an edited function and update the structural database without reanalyzing the entire system. The J-Diagram and ActionPlus diagram are two graphical representations of the logic in a software system and can contain a single module or the entire system. Both diagrams utilize the active line number technique to link high-level module calls with detailed module logic. Hindsight also actively links computed GOTO statements with their destination labels by clicking on the label. Users can walk through programs and trace the logic without having to memorize the directories and files where subprograms are defined and called. This technique saves a great deal of the users time. Hindsight/FORTRAN Version 1.0 has many integrated automated tools to generate documents either on-screen or on paper. Because the documents are automatically generated, they can be updated as soon as engineers have modified their source code. This approach guarantees the consistency between the design documents and the source code. The updated and correct documents will be of great value in maintaining and improving software products. These documents are available on-line to the user and readily accessible through Hindsight's interactive report mechanism. Hindsight Version 1.0 has the ability to provide segment or line test coverage data. Hindsight generates test coverage data and displays the data on the structure chart in a statistical way. Hindsight can also display the precise location of testing deficiencies on the J-Diagram, which helps engineers find the exact part of the program where the code has not been tested. Hindsight's ability to display performance data, complexity metrics, and test coverage data on charts and diagrams play an important role in controlling program quality. Hindsight/FORTRAN Version 1.0 uses a new notation for the J-diagram which accommodates branch test coverage capability. The new notation has a better and more precise method of showing control levels, complexity, and segment number counting. The branch test coverage data generation and display is a great enhancement for test coverage analysis. Hindsight's branch test coverage is able to detect invisible branches, finding more problems that would otherwise be hidden in programs. With this information, users can add test cases for covering the untested code. Hindsight/FORTRAN Version 1.0 contains the ability to speed up the development process by generating a specific order for coding the modules of a users system. By analyzing a group of modules containing nothing more than empty shells of subprograms that call the other subprograms in the system, Hindsight generates the coding order for the modules to ensure that the process will be testable with the use of a single driver process and without the need to stub out uncoded subprograms. The bottom-up coding approach saves time that would be wasted coding unneeded stubs. As development proceeds, Hindsight's ability to verify that calls to other subprograms are utilizing the proper interface will also save time and improve program quality. Other tools: Refine/FORTRAN ("re-engineering tool") Reasoning Systems Inc 415 494 6201 FORM (graphical interface to toolpack) University of Kent 44 227 762811 pub/fortran/fxref.tar.Z from biome.bio.ns.ca. create cross reference of a FORTRAN program. CLEAN77 available from Purdue University. Mail Greg Flint (afc.klaatu.cc.purdue.edu) for more info. There is a program called TIDY that is available via FTP from simtel20 pub/msdos/fortran/tidy621.zip on oak.oakland.edu ************************************************************************ Cadre Teamwork Cadre Technologies Inc. Cadre Teamwork is a large suite of integrated CASE tools that run on Unix and VAX platforms. Their core products are structured analysis (with real-time extensions) and design, information modeling, and an integrated data dictionary. More recently, they have added many extensions, including a C development environment, C and Fortran reverse engineering (build a structure chart from source code), testing tools, and others. 222 Richmond Street Providence, RI 02903 Phone (401) 351-5950 Fax (401) 351-7380 From: lionel@quark.enet.dec.com (Steve Lionel) Newsgroups: comp.lang.fortran Subject: Re: Code formatter for FORTRAN Date: 15 Jun 1994 15:02:38 GMT Organization: Digital Equipment Corporation, Nashua NH Reply-To: lionel@quark.enet.dec.com (Steve Lionel) In article <2tn1bf$aod@rcsuna.gmr.com>, jgatowsk@rinhp750.gmr.com (Jan Gatowski EN/16) writes: |>Does anyone know if there exists a (commercial or freeware) FORTRAN |>code indenter/formatter? A friend is faced with revamping a largely |>unreadable old code and could use any available tools to render it more |>legible. While I was at UK DECUS I attended a talk which described a product called The FORTRAN Partner which has as its capabilities (according to the documemtation I have): Screening: automatically checking whole FORTRAN programs for classes of error not detected by compiler Troubleshooting: analysing programmes interactively to expose problems or inconsistencies Porting: moving code to different FORTRAN environments Standardising: converting code to a consistent style and creating a framework for documentation Optimising: optimising code for speed of execution The product is available on the following platforms: Alliant FX80 Avalon Vaccelerator AP/30 Digital VAX (OpenVMS) Digital Alpha AXP (OpenVMS) HP Risc Processors under Unix IBM PC and compatible systems with minimum 80386 processor and Maths Coprocessor IBM Risc System 6000 under AIX Parsys Supernode under Idris Silicon Graphics MIPS processors under IRIS Sun SPARC and compatible under Solaris and SunOS The vendor is: Software Validation Limited PO Box 270 Swindon SN4 0TQ England Tel: +44 (0) 793 740002 Fax: +44 (0) 793 740974 A single workstation/PC price is given as 945 Pounds. I don't know what a US price would be. One of the claims which impressed me was the ability to understand many different syntax variants and convert them to a more standard form. The formatting rules are customizable. (The optimizations consist of inline expansion and loop unrolling.) I have not actually tried this product (I just got a demo disc today) and this should in no way be considered an endorsement of the product by either myself or Digital Equipment Corporation. However, it looks like it would be worth considering for some applications. -- Steve Lionel Mail: lionel@quark.enet.dec.com SDT Languages Group WWW: http://www.digital.com/info/slionel.html Digital Equipment Corporation 110 Spit Brook Road, ZKO2-3/N30 Nashua, NH 03062-2698 "Free advice is worth every cent" Q13) Why are there aimless debates? There are some persistent individuals who would like computer systems to work in a fashion somewhat unlike they do now. It seems pointless to debate with them; the debates (in various groups) always take the same form and never result in meaningful dialog. One can usually recognize such by reading a week or so's worth of postings. Sometimes you may have to read for a month to recognize such. When you do, please try to avoid triggering (or responding to) such individuals. Many (if not most) newsreaders support a feature entitled KILL files. As you recognize individuals, you may wish to put them into your local kill file. For example, the style employed by GNUS: (gnus-kill "From" "hrubin@pop.stat.purdue.edu") (gnus-kill "Subject" "test") the first kills off all postings from the named individual, the second kills off all postings including the beloved "test" string. See your local NewsGod for details suitable for your local system. Q14) How do I call f77 from C (and visa versa) This is quite platform dependent. For Suns see the FORTRAN User's Guide, Chapter 14. There is a package available from usenet which attempts to make this "quick and easy" for a wide range of platforms: Host ftp.germany.eu.net Location: /newsarchive/comp.sources.misc/volume20 DIRECTORY drwxr-xr-x 512 Jul 7 1993 cfortran Host ftp.sunet.se Location: /pub/usenet/comp.sources.misc/volume20 DIRECTORY drwxrwxr-x 512 May 28 1993 cfortran Host ftp.wustl.edu Location: /usenet/comp.sources.misc/volume20 DIRECTORY drwxr-xr-x 8192 Oct 30 15:09 cfortran Host halcyon.com Location: /dec/.0/usenet/comp.sources.misc/volume20 DIRECTORY dr-xr-xr-x 512 Jul 8 1993 cfortran Host lth.se Location: /pub/netnews/sources.misc/volume20 DIRECTORY drwxr-xr-x 512 Jun 7 1993 cfortran Host math.mps.ohio-state.edu Location: /pub/archives/comp.sources.misc/vol20 DIRECTORY drwxrwxr-x 512 Jun 2 1993 cfortran It is on many other sites (around the world) too. See archie if you need other pointers. For some systems, you have to initialize a runtime system explicitly if you call a different language, and stopping execution from the other program may not work. The most recent version of cfortran.h is available via anon. ftp at zebra.desy.de. ;;;; ----8< -------------8< ---------------- 8< ------------8< -------------- First post: --From: vankemme@imec.be (Rudi Vankemmel) --Subject: A: [F77-C] call NAG F77 Library in C ? --Message-ID: <1993Jun23.113910.28819@imec.be> ------------------------------------------------------------------------ Yongtao Chen (yongtao@watnow.uwaterloo.ca) wrote: : ....... : * How to call NAG Fortran Library with C (under Unix) ? * : We have a NAG Fortran Library on our machine but I do not : know how to call them in my C program. Can anybody give : me some advice about how to do this? Hello, we have some programs written in C calling the NAG library (which is written in Fortran). There are a number of important things you must be aware of: 1) Fortran uses a column wise storage of matrices while C stores them row wise. This means that when you want to parse a matrix from your C-program to the NAG (-fortran-) routine you must transpose the matrix in your program before entering the routine. Of course, any output from such a routine must be transposed again. If you ommit this step, then probably your program will run (because it has data to compute on) but it will generate wrong answers. B.T.W. if you have the Fortran source code (of any routine) then on some platforms you may use compiler directives specifying that the Fortran compiler must use row wise storage. Some platforms support these directives. However watch out with this if you call the same routine from another Fortran routine/program. 2) Your Fortran compiler may add an underscore "_" to the routine name in the symbol table e.g. subroutine example(..,..,..) becomes example_ in the table. Hence in the calling C-program/routine you must add a trailing underscore ! Otherwise the loader will complain about an undefined symbol "example" while "example_" is loaded. However, check your compiler for this. For example the Fortran compiler on VAX-VMS systems does NOT add a trailing underscore (there watch out with the fact that the VAX-Fortran compiler translates everything in uppercase). 3) Fortran passes its variables by reference. This means that you MUST give adresses in your calling C-program (i know, this is a stupid remark but it is too often forgotten (my experience ....)). 4) Watch out especially with float's and double's. Make sure that the size of the variable in the calling program is identical to the size in the Fortran routine e.g. double <----> real*8, float <---> real This is extremely important on machines with little endian byte ordening. Parsing a float (C-routine) to a real*8 (Fortran) number will not generate SEGV but give wrong results as the data is parsed wrongly. 5) Remember that the array index in Fortran starts at 1 while in C this is at index 0; hence a parsed array fortran_array[1:100] must be used in the C-routine/program as c_array[0:99]. Good luck with it !! ------------------------------------------------------------------------------- Rudi Vankemmel | These are my opinions, not those of IMEC vzw. - ASP division | my employer, so don't take them away Process and Device Modelling group |________________________________________ Kapeldreef 75 phone: (32)-(0)16/28 13 37 3001 Leuven fax: (32)-(0)16/28 12 14 Belgium email: vankemme@imec.be ------------------------------------------------------------------------------- another post: --From: beardsl@mepsi.mobil.com (Reginald Beardsley) --Subject: A: [F77-C] Fortran to c and c to fortran --Message-ID: <2081se$26j@dlsn31.dal.mobil.com> I do a lot of this. The following is true on the following machines. I cannot say about others. Sun 3 & 4 IBM RS/6000 SGI DECstation Intergraph Clipper (Apogee & Green Hills compilers) H-P 7xx 1) If possible, do not pass strings to FORTRAN from C or vice versa. 2) Do not mix I/O on the same file descriptors. 3) Do all your math in FORTRAN, and all the rest in C if at all possible. 4) NEVER ever attempt to write the equivalent of a FORTRAN function that returns a character variable in C. Life is too short for the suffering it causes. 5) If you do ANY I/O in FORTRAN, you MUST use a FORTRAN main program. 6) FORTRAN always passes pointers. 7) FORTRAN passes string lengths BY VALUE in the order the strings appear in the argument list. These do NOT appear in the FORTRAN argument list, but will appear in the C argument list. 8) You will need to take care of nulls and blanks spaces explicitly if you ignore #1 above. 9) The Sun FORTRAN compiler used lex and yacc to do the conversion of a run time format from a character variable. If you use lex and yacc either rename the variables and functions or partially link before you link to the FORTRAN libraries. 10) FORTRAN symbols have trailing underscores appended. Some compilers require a compiler flag to get this. Use it! It makes the code more portable. 11) Don't pass structures. If you must access a structure element, pass a pointer through to a routine which passes back the element pointer. 12) Don't forget that the storage orders for arrays is opposite and transposition is expensive. I currently have many lines of code with FORTRAN calling C calling FORTRAN. It's not my choice of things to do, but it works well. Much better than using the wrong language for the task. My only regret is that I'm forced to pass a lot of strings between the two languages. ------------------------------------------------------------------------ Reginald H. Beardsley Contract Consultant/Programmer Mobil Exploration and Production Technology Office: (214)-851-8547 beardsl@dal.mobil.com Home: (214)-306-3907 --------------------------------------------------------------------------- followup to first post: --From: andrew@rentec.com (Andrew Mullhaupt) --Subject: A3: [F77-C] How to call NAG Fortran Library with C ? --Message-ID: <1813@kepler1.rentec.com> In article <C9JnIF.Mzp@bernina.ethz.ch> brech@vision.ethz.ch (Christian Brechbuehler) writes: >It is important that you know what's happening when Fortan and C access >array elements. But I never had to perform any "transposition" step in a >program. You just have to read the definitions the other way. When the >manual says A(j+1,i+1) I understand this means a[i][j] in C, etc. This is true enough, but there are times when you don't want to modify already existing FORTRAN and C you may have to write a transposition wrapper. This can be advisable for reasons of clarity (i.e. keeping the documentation the code and the math in sync.) and for reasons of performance. Later, Andrew Mullhaupt ;;;; Most vendors have surprisingly complete documentation of this sort of thing ... if one troubles to look for it. There is, for example, an entire chapter in the SunPro Fortran documentation <khb> Q15) What constitutes good FORTRAN style? One rendition of a FORTRAN 77 style guide is available through anonymous ftp from ics.uci.edu (128.195.1.1). To retrieve (please note that it's not really "anonymous", that's just the Name that you'll be using): % ftp ics.uci.edu anonymous <enter your e-mail address at Password: prompt> cd pub/levine ascii get F77_Style_Guide bye If you can't access this site directly, please send an e-mail request to levine@ics.uci.edu (BITNET: levine@uci, UUCP: ...!uunet!ucivax!levine). Q16) For whatever reasons, I want to translate my Fortran into C. What tools are available? f90 from NAG, see above f2c see above. FORTRAN=C=FORTRIX=Rapitech Rapitech (914) 368-3000 FORTRAN=C=FOR_C=Cobalt Blue 404 518 1116 FORTRAN=C=PROMULA.FORTRAN=Promula (614) 263-5512 Q17) For whatever reasons, I want to translate my existing C code into Fortran. What tools are available? Regretably none. This is indeed unfortunate, as even a limited translator could help with typical C header files. Q18) What is preprocessing, how can it help? How can it hurt? Preprocessing often refers to usage of a Macro-prepressor upon ones source code prior to compilation. How can this help? It can make it easier to move code between machines. How can this hurt? It can cause difficulties in compilation of the processed code; most (if not all) macro-preprocessors know nothing about Fortran syntax and code layout rules. So, a common problem is that after preprocessing some text may be lost past "sacred" column 72. Those working with compilers that optionally compile *past* line 72 should probably employ that option when using a preprocessor. Common prepressors are: cpp, m4, and ratfor. Many sites have their own custom prepressors. Basic functions are: 1) definition of a symbol 2) conditional code selection based on a symbol 3) substition of a symbol by its definition Traditional BSD Unix f77 processors treat a file named foo.F (as opposed to foo.f) as one that should be run through cpp prior to compilation "automatically". Q19) How can I convert an existing FORTRAN 77 program to the free form source of Fortran 90? Source code conversion program from ftp --------------------------------------- Many people who start to code in Fortran 90 prefer to do so using the new, less restictive, source form. However, a problem arises when wanting to modify old FORTRAN 77 code while sticking to the new style. To help in this situation, a source code conversion program has been written (and well tested) and made availble by anonymous ftp. Apart from the conversion, the program can: ensure that blanks are used correctly in the code as they are significant with the new source form; indent DO-loops and IF-blocks; replace CONTINUE by END DO, where appropriate; add subprogram names to END statements; change non-standard length specification syntax, like INTEGER*2, to the Fortran 90 equivalent, in all contexts (type statements, FUNCTION statements, and IMPLICIT statements); produce an interface block automatically from the source code of a procedure - useful to the library developer when wishing to use this important new facility with an existing library. The source code can be obtained by anonymous ftp to jkr.cc.rl.ac.uk (130.246.8.23). When prompted for a userid, reply with anonymous and give your name as password. The directory is /pub/MandR and the file name is convert.f90. Mike Metcalf (metcalf@cernvm.cern.ch) Q20) Who creates these silly standards anyway? Typically X3J3. X3J3 is an ANSI subcommittee dedicated to Fortran. WG5 is the ISO counterpart. WG5 owns responsibility for Fortran on an international basis. WG5 has previously tasked X3J3 to do the work. This arrangement continues. WG5 is composed of Fortran users, vendors, and academics from several ISO supporting nations. Delegates represent *their*countries* not their companies; so several delegates from a single company is permitted. ANSI rules prohibit multiple voting delegates from the same company. X3J3 is composed of users (aerospace, government labs, military, DECUS, railroads, oil to name a few), vendors (IBM, CRI, Sun, Convex, DEC, UNISYS, to name a few) and the odd academic (oxford, yale, liverpool, to name a couple). Members need not be US citizens nor must their company be US domiciled. Being a member of a standards group is typically involves non-trivial work. To be effective, one should plan on at least 8 weeks of time per year (those who are really doing the hard work do far more). This time commitment is typically far more expensive than the travel and membership costs. X3J3 meetings are open to the public. There are typically 4 meetings a year, typically 3 are in the US and 1 *may* be overseas (to precede or follow the WG5 plenary session). Membership fees are levied by ANSI, and are on the near order of $400 (plus an extra $300ish for those who wish to be members of the US delegation to ISO). In addition, attendees to a particular X3J3 meeting pay a "meeting fee" which covers reproduction costs, snacks and etc. WG5 has established various goals and targets for future work. Roughly speaking 5yrs rather than 13years are the targets for future work. Current work projects include cleanup and interpretations of Fortran (90), features for future versions of the standard (e.g. parallel processing, "object-oriented" technologies, etc.). In addition to work done directly by X3J3, there is work on standardized modules, and OS bindings taking place in other organizations. X3J3 would like to keep track of such efforts, those involved are invited to inform X3J3 early in their development efforts if possible. X3J3 is currently working with X3H5, DIN (varying string character) and tracking the efforts of HPFF. New members are always welcome. Visitors are also; though it is very hard to get a good grip on things in only one meeting! Contact the X3J3 chair for more information: jwagener@trc.amoco.com chair KELBLE%TRPROGB@trenga.tredydev.unisys.com vice-chair Upcoming meetings are: February 7-11 1994 Palmdale California May 1994 Lake Tahoe Summer 1994 Scotland Q21) How can I read my VAX binary data somewhere else? Some vendors provide bulit in methods (DEC provides this via special options on the OPEN statement). Others provide library support (on SPARC products, with the SunPro compilers, checkout convert_external) In addition, Accerl8 provides a commerial tool. Contact: Robert Hickler Tel (303) 863-8088 Accelr8 Technology Email robert@accelr8.com for more information. The following three Q's and A's based on email from: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig) Q22) My F77 program compiled ok on a <system1>, but gives me heaps of syntax errors on a <system2>. What's wrong? Most likely, the program was written with a line length greater than 72. If your compiler supports it, turn on the option for greater line length (e.g. -e is not uncommon) ; otherwise, split up the lines by hand, or via one of those pretty-printers/restructing tools mentioned above. Q23) My F77 program ran ok on a <system1>, but on a <system2> it just gives me strange results. What's wrong? There are different reasons why this could be. Possibly, your program violates the standard in some way which is not caught by the compiler on <system1>. Many programs rely on variables to be initialized to zero when a subroutine or function is first called, and also on the retention of values between calls. While many compilers (VAX/VMX and IBM VS, for example) exhibit this behaviour, compilers on newer architectures often fill variables with garbage on each new function call. This is permitted, according to the standard. Initialize variables explicitly, and put the variables which you need to keep across function calls into SAVE statements. Your compiler may have an option to trap unititialized variables; use that to find the trouble spots. Alternatively, compile using a flag which forces static allocation of all variables. Another problem might be that the accuracy of REAL and DOUBLE PRECISION differs between different platforms; that can cause roundoff error to wipe out your results or your program to go into endless loops. Yet another (and much more subtle) problem can occur if a lot of formatted I/O is employed. The conversion from internal to external representations can introduce very significant errors; much worse on some platforms than others (doing correctly rounded base conversion is expensive). There are, of course, lots of other possibilities, these are just a starting point. Q24) Is there a WEB for Fortran (and what is web anyway)? FWEB is available via anonymous ftp; use archie(above) to determine current location(s). As for the more general question, what is WEB .... WEB is a "literate" programming system created by Knuth (he of reference book fame, and TeX fame, and etc.). It permits the programmer to write code and documentation together. WEB takes the "high level code and documentation" and creates real publishable documentation (using TeX or LaTeX) and compilable code. WEB versions for many languages are available. Some features of FWEB are: 1) FWEB is a pretty printer. Code is pretty printed by sending the FWEB file through "fweave" and "TeX". fweave inserts TeX control characters around the code for pretty printing. Fweave also collects a cross-referenced index of *all* identifiers and prints them at the end of the code listing. 2) FWEB has built in macro preprocessing, which *does* understand FORTRAN syntax and code layout rules. A line extending beyond column 72 will be broken into proper continuation lines. 3) FWEB is multilingual: it understands C,C++,f77,f90, and RatFor. Q25) Where can I find coded BLAS (and what are coded BLAS?) The BLAS (basic linear algebra software) comes in several flavors: BLAS-1, -2, and -3. These can be described as scalar, vector and matrix-matrix levels. "Coded" BLAS are either hand coded in assembler, or at least tweaked for a given machine. Some vendors provide these, some are provided on the net (see archie) and some are marketed by various commercial organizations. In addition, it should be noted that BLAS-3 is very amenable to parallel processing. Done cleverly, this could be done by a network of processors over a net. DSS markets just such an implementation. Contact: Mike Boucher Dakota Scientific Software, Inc. 501 East Saint Joseph Street Rapid City, SD 57701-3995 fax: (605) 394-1256 scisoft@well.sf.ca.us for more information about their implementation. Q26) How common is DO ... END DO It is very common; and of course is part of Fortran 90. Compilers claimed to *not* support it (much shorter list this way) 1) Salford ftn77/Primos version 2) Prime f77 compiler 3) Microsoft Fortran for CP/M 8080/Z80 machines 4) Fujitsu VPxxx UXP/M compiler Q27) Where can I learn more about the history of Fortran? From: metcalf@apofort.cern.ch (Michael Metcalf ) The history of Fortran is documented in: Annals of History of Computing, 6, 1, January, 1984 (whole issue). Programming Systems and Languages (S. Rosen ed.), McGraw Hill, 1967, pp 29-47 (this is Backus's original paper). History of Prorammining Languages (R.L. Wexelblat ed.), Academic Press, 1981, pp 25-74. A summary appears in vol. 5 of the Encyclopedia of Science and Technology, Academic Press, 1986, under 'Fortran'. and in Chapter 1 of Fortran 90 Explained (Oxford, 1990). Q28) Fortran text editors? Thomas Koenig, ig25@rz.uni-karlsruhe.de, ig25@dkauni2.bitnet If you use EMACS, you can use M-x fortran-mode. An extended version, which includes the fortran-auto-fill-mode minor mode, is available via anonymous ftp from hallc1.cebaf.gov [129.57.32.62] in the directory /emacs. More generally, Unipress emacs has a Fortran mode. There are XEDIT, BRIEF, TPU and EDT clones available on many common platforms these days. Newsgroups: comp.lang.fortran From: davis@pacific.mps.ohio-state.edu ("John E. Davis") Subject: Re: Fortran FAQ In-Reply-To: khb@chiba.Eng.Sun.COM's message of 05 Apr 1994 02:14:15 GMT Followup-To: comp.lang.fortran Reply-To: davis@amy.tch.harvard.edu (John E. Davis) Organization: "Dept. of Physics, The Ohio State University" Date: Tue, 5 Apr 1994 05:51:14 GMT In article <KHB.94Apr4191416@chiba.Eng.Sun.COM> khb@chiba.Eng.Sun.COM (chiba) writes: Q28) Fortran text editors? [...] More generally, Unipress emacs has a Fortran mode. There are XEDIT, BRIEF, TPU and EDT clones available on many common platforms these days. In addition, JED has a Fortran mode that is very much like the emacs Fortran mode. JED also has a very nice EDT emulation and runs on MSDOS, Unix, VMS, as well as DEC Alpha systems. The latest version of JED is on amy.tch.harvard.edu in pub/jed. Archie will show it elsewhere but these versions are somewhat dated. The latest version is 0.95. Despite the fact that the version number is below 1.0, the editor is VERY stable--- the version is below 1.0 because I feel that the documentation is not quite up to 1.0 levels. Here is a partial list of features: runs under Unix, VMS, and IBMPC (all versions) X Window version also available emacs*, wordstar*, EDT* emulation C, Fortran*, tex*, text editing modes C-like extension language called S-Lang. user configurable (bind keys, write functions, etc....) region highlighting (even on character based terminals!) Syntax highlighting in Beta test (even on character based terminals) 8 bit clean, edit binary files too. rectangular (box) cut/paste backup and autosave files full undo regular expressions GNU Emacs compatable info reader* calendar* mail*, elm like rmail* (rmail new in 0.95 version) dired directory editor* automatic horizontal pan/scroll (configurable) parenthesis matching/blinking filename, buffername, function name completion Menu driven for novice users* incremental search/replace* sorting no hardcoded buffer/line limits multiple windows and buffers keyboard macros with macro query feature. buffer mode lines are configurable, e.g., display time, line number, etc... ispell* shell commands and ``interactive'' shell* * Note: these functions are written in the extension language. -- _____________ #___/John E. Davis\_________________________________________________________ # # internet: davis@amy.tch.harvard.edu # bitnet: davis@ohstpy # office: 617-735-6746 # Q29) What are ENCODE and DECODE statements, and how are they translated to standard Fortran? ENCODE and DECODE are vendor extensions to Fortran (invented in the sixties, long before X3.9-1978 added internal I/O to the language) which are most often used to convert data between numeric and character representations. They may be viewed as formatted writes to (ENCODE) or reads from (DECODE) memory. The standard-conforming alternatives are internal write and internal read statements respectively. For example, INTEGER MONTH, DAY, YEAR MONTH = 7 DAY = 4 YEAR = 93 C FORM THE STRING 7/ 4/93 IN VARIABLE "DATE" ENCODE (8,10,DATE) MONTH,DAY,YEAR 10 FORMAT (I2,'/',I2,'/',I2) The above can be translated as "write 8 characters, formatted according to format 10, storing the results in variable DATE, and using the contents of variables MONTH, DAY, and YEAR as the data to write." A DECODE statement would be used to reverse the process (extract the variables MONTH2, DAY2, and YEAR2 from the string DATE). Thus: INTEGER MONTH2, DAY2, YEAR2 DECODE (8,20,DATE) MONTH2, DAY2, YEAR2 20 FORMAT (I2,1X,I2,1X,I2) Conversion of ENCODE/DECODE to standard Fortran-77 is not difficult. The critical thing to remember is that the variable to be written to (ENCODE) or read from (DECODE) must be a CHARACTER variable which is long enough to contain the string. The first number within the parentheses (in this case 8) is the minimum length to use in a type declaration. Thus a standard- conforming equivalent of the above example is: CHARACTER*8 DATE INTEGER MONTH, DAY, YEAR INTEGER MONTH2, DAY2, YEAR2 MONTH = 7 DAY = 4 YEAR = 93 WRITE (DATE,10) MONTH, DAY, YEAR 10 FORMAT (I2,'/',I2,'/',I2) READ (DATE,20) MONTH2, DAY2, YEAR2 20 FORMAT (I2,1X,I2,1X,I2) Although the above example used integers, any other data type may also be used. <forags@nature.berkeley.edu (Al Stangenberger)> Q30) Tell me about Parallel Fortran dialects, what are they,etc. Newsgroups: comp.lang.fortran,comp.parallel.pvm From: lfm@pgroup.com (Larry Meadows) Subject: Re: Parallel FORTRAN Questions Date: Fri, 20 Aug 1993 00:13:33 GMT Nntp-Posting-Host: pacific2.pgroup.com Organization: The Portland Group spencer@glint.mcc.com (Steve Spencer) writes: >We are trying to decide what parallel FORTRAN environment >to port to a MIMD multiprocessor that we are building >for ARPA. We are looking for information on the follwing >environments: > FORTRAN90 > HPF (High Performance FORTRAN from Rice U. I think) > FORTRAN D > PVM (works with F77 to provide a parallel env.) >Does anyone know where we can get information on the >above programming environments or any others that may >be appropriate? Fortran90 is an ANSI and an ISO standard. The usual reference is Fortran 90 Handbook, published by McGraw Hill. Several vendors provide Fortran 90 translators and/or compilers. HPF is Fortran 90 augmented with data distribution statements to allow portable programming for distributed memory multiprocessors. The language was defined by a committee consisting of over 40 organizations over a period of about one year. The effort was spearheaded by Geoffrey Fox and Ken Kennedy. Several vendors have announced HPF products or development efforts. The language document is available via anoymous ftp: ftp cs.rice.edu cd public/HPFF/draft get hpf-v10-final.ps.Z Fortran D is a precursor to HPF; as a commercial product it has been superceded by HPF, but several academic projects still exist that target Fortran D. PVM is a message passing library and run-time environment; as such, it exists at a lower level than the previous items. One might imagine an HPF compiler that produced FORTRAN77 with calls to PVM. There is a newsgroup on PVM. It is available through netlib, and possibly from Oak Ridge as well. Hope this helps. -- Larry Meadows The Portland Group lfm@pgroup.com ;;;; Q31) Where can I find a f90 tutorial? Newsgroups: comp.lang.fortran From: metcalf@apofortn.cern.ch (Michael Metcalf ) Subject: f90 tutorial on World Wide Web Keywords: f90 WWW Organization: CERN European Lab for Particle Physics Date: Wed, 24 Nov 1993 12:15:43 GMT Those of you with access to the World Wide Web (WWW) may like to know that my colleague Michel Goossens has now installed a Fortran 90 tutorial under the URL http://asis01.cern.ch/CN/CNTUT/f90/Overview.html There is no copyright on this material. To access WWW, try typing www on your workstation or look for its icon on your PC. If it's unavailable, please contact your system manager, not me. Mike Metcalf (metcalf@cern.ch) Q32) Where can I get mathematical software There are, of course, many commerical operations which provide high quality software. NAG and IMSL to name just two. netlib and archie (mentioned above) can be used to good effect to find specific freeware (public domain, shareware or mostly freely distributable source). In addition, NASA's COSMIC distributes some government funded software. One particular bit of NASA software, MATH77 a large math library created by numerical analysts at JPL is available from: Language Systems Corp. 441 Carlisle Dr. Herndon, VA 22070 (800) 252-6479 email: langsys@aol.com Q33) What is the best Fortran for... Such recommendations are, at best, personal opinions. I've <khb> tracked some of the discussions and it would appear that a) For the mac, Language Systems 800-252-6479 (inside US and Canada) 703-478-0181 703-689-9593 (fax) 703-709-0134 (BBS) langsys (Applelink) langsys (America Online) langsys@aol.com (Internet) Language Systems Corp. 100 Carpenter Drive Sterling, VA 20164 b) For the PC it is harder. Many like Lahey Lahey Computer Systems, Inc. 865 Tahoe Blvd. P.O. Box 6091 Incline Village, Nevada 89450 Phones: (800) 548-4778 (702) 831-2500 Fax: (702) 831-8123 BBS: (702) 831-8023. UUNET: Sales sales@lahey.com Tech support support@lahey.com Good code generation, good diagnostics, fast compilation, and good support are often quoted as reasons why folks liked LCS. Q34) What Classes are available (an ever changing list) Date: Wed, 29 Jun 94 09:19:59 EDT From: "Janice Shepherd" <JANSHEP@TOROLAB2.VNET.IBM.COM> To: comp-fortran-90@mailbase.ac.uk Subject: Fortran 90 course X-List: comp-fortran-90@mailbase.ac.uk Reply-To: "Janice Shepherd" <JANSHEP@TOROLAB2.VNET.IBM.COM> Sender: comp-fortran-90-request@mailbase.ac.uk Precedence: list If you are anywhere near Toronto and you want to learn more about Fortran 90, you might be interested in the following course. There is some mention of extensions, but the bulk of the course concentrates on Fortran 90. The XL Fortran team has recently put together a three-day hands-on course that focuses on: 1) the new features introduced by Fortran 90, and 2) XL Fortran extensions. The first offering takes place later this year in Toronto. Please let Luc know if you have any questions. SCHEDULE October 12-14, 1994 (9:00AM - 5:00PM) LOCATION IBM Canada Limited 3600 Steeles Avenue East Markham, Ontario (just outside Toronto) COST $1185 (Canadian) per student PREREQUISITES FORTRAN 77 experience and some UNIX knowledge REGISTRATION Contact IBM Education and Training (1-800-661-2131 or 905-946-1100) COURSE DETAILS Contact Luc Chamberland (lchamber@torolab4 or lchamber@vnet.ibm.com) Janice C. Shepherd IBM Toronto Lab. ;;; Bo Einarsson and Yurij Shokin have written a tutorial on the transition from Fortran 77 to Fortran 90, with the title "Fortran 90 for the Fortran 77 programmer". The English version is available as a pure ASCII text file via anonymous ftp from the computer nsc.liu.se (130.236.100.5) and is available in the directory pub/bibliotek as the file f77to90.txt. ;;;; Q35) f90.faq F90 FAN's : Fortran 90 Frequently Asked about News. A Fortran 90 addition to the Fortran FAQ. Michel Olagnon - October 1st, 1993. Last updated - May 24th, 1994. Send flames and suggestions for improvement to Michel.Olagnon@ifremer.fr Contents : ======== | 1.- Fortran 90 and Fortran 77 2.- Available in Fortran 90: Compilers | Code re-structurers and converters | Libraries and utilities Tests and Benchmarks Tutorials Examples Courses and Consultancy 3.- Documentation: Standards Journals | Books | Articles 4.- Fortran 90 Benchmarking 5.- Announced, foreseen, and rumours 6.- Workshops, seminars, conferences 7.- Developments, related languages Standard HPF PVM Parallel Programming 8.- Addresses 1.- Fortran 90 and Fortran 77: ############################## Fortran 90 is, with very few exceptions, a superset of Fortran 77. The FAQ of the Usenet group Comp.lang.fortran deals with both standards, and may be obtained, like any FAQ, via anonymous ftp from rtfm.mit.edu, directory /pub/usenet. It is also available on the WWW http://www.cis.ohio-state.edu/hypertext/faq/usenet/fortran-faq/faq.html The present document is an attempt to supplement that FAQ with some specific Fortran 90 information. Anyone interested is also invited to join the mailbase list comp-fortran-90, by sending an e-mail message to mailbase@mailbase.ac.uk, containing as the only line: join comp-fortran-90 <firstname> <lastname> The main extensions of Fortran 90 over Fortran 77 are: * array notation (for instance, X(1:N)=R(1:N)*COS(A(1:N))) * dynamic memory allocation (ALLOCATE, DEALLOCATE, ...) * derived types and operator overloading * better declarations, and prototyping possible * MODULES, allowing users to create ``storage pools'', or to define environment * more of modern control structures (SELECT CASE, EXIT, ...) * more of useful intrinsics (date, precision, arrays, ...) * free format source code form ``Pure'' Fortran 77 is F90 compatible. Yet, it is better to convert it to a ``mixed'' format, acceptable both as free and fixed source form Fortran 90, which only requires replacing C by ! as the comment character, to use & as the continuation line character, and to append it to the continued line, to remove blanks embedded inside constants or identifiers, and to check some intrinsics usage. Most of this can be done automatically. Fortran 90 allows the Fortran 77 programmer to write code faster, to make it more legible, and to avoid many bugs. For a newcomer to programming, it is an opportunity to learn a modern language, with most recommended features, and yet to be in line with scientific and industrial engineering communities where Fortran is and is going to remain for a good while THE favourite language. 2.- Available in Fortran 90: ############################ Compilers --------- CRAY CF90 - presently, for Crays YMP and YMP-C90 EPC Fortran 90 - for Sparc Solaris 1.X and 2.X, IBM RS/6000, Intel 3/486 (SVR3&4, Solaris 2.x), Motorola 88000/100/100 (SVR3&4) IBM XLF V3 - full compiler for RISC System/6000 MicroWay - for DOS, OS/2, Unix NAG f90 - uses C as intermediate language Pacific Sierra VAST-90 - uses F77 as intermediate language Parasoft - uses F77 as intermediate language Salford FTN90 - PC implementation of NAG f90, direct generation of object code. NOTE: Some vendors, such as Fujitsu with its "Numerical Workbench" for Sparc Solaris 2.x, or Convex on their machines, offer a number of F90 extensions, for instance array syntax or ALLOCATE instruction. Code re-structurers and converters ---------------------------------- Pacific-Sierra VAST-90 (see article by JKP in Fortran Journal 5/4) FOREST-90, by Simulog NAGWare f90 tools, pretty-printer, declarations standardiser, precision standardiser, names changer. CONVERT, conversion to F90 free format, proposed by Mike Metcalf via anonymous ftp on jkr.cc.rl.ac.uk (130.246.8.23), file /pub/MandR/convert.f90. ftof90.c, minimal F77 -> F90 conversion, via anonymous ftp on molene.ifremer.fr (134.246.150.6), file pub/ifremer/fortran90/ftof90.c) Libraries and utilities ----------------------- NAG fl90, numerical and statistical library, Sun 4 and Sgi. Syntax verifier extracted from NAG compiler, put into public domain by NAG for Sun 3, Sun 4, Sgi. Lahey has F90 components (manual, array intrinsics, front end,...) that they would like to license to others. CADNA, by professeur Vignes from Universite Pierre et Marie Curie, implements stochastic arithmetic in Fortran 90, and enables monitoring of precision loss and/or numerical instabilities during execution. (Control of Accuracy and Debugging for Numerical Aplications in Fortran) More information available from ICHOR. (see also aricles by J. Vignes) ISO/IEC 1539-2 - Variable length character strings (Draft auxiliary standard) in Fortran (with a demonstration of implementation) LAPACK, (minimaly) translated by myself, successfully passed all its tests with NAg-f90 2.0. I aggressively translated single precision Blas, and intend to do the same with other Blas as soon as I have time. Steve Moulton works on LAPACK conversion. Tests and Benchmarks -------------------- NAGware Test suite - tests for compilers (same (?) as: U_F90_TS Test suite - from Dr. Brian Smith (University of New Mexico), marketed by Unicomp and NAG. Lahey Test suite - F77 & F90 (license agreement) SHAPE Test suite - 3400 tests of array instructions, from Spackman & Hendrickson, Inc. Parasoft Test suite - 1500 tests for compilers Quetzal Benchmark from John K. Prentice, via anonymous ftp on unmfys.unm.edu, in pub/quetzal. Benchmark of Syracuse University, via anonymous ftp on minerva.npac.syr.edu, in /benchmark. Channel benchmark by John D. McCalpin, via anonymous ftp on perelandra.cms.udel.edu, in bench/channel. Tutorials --------- Michel Goossens has now installed a Fortran 90 tutorial on the World Wide Web (WWW) under the URL : http://asis01.cern.ch/CN/CNTUT/f90/Overview.html There is no copyright on this material. Examples -------- Nag has set up a repository for contributed code: WWW: http://www.nag.co.uk:70/1/nagware/Examples Gopher: Host=www.nag.co.uk, Port=70, Type=1, Path=1/nagware/Examples Lahey Computer Systems is planning to set up an FTP'able site for F90 modules - a kind of clearing house for public domain code. More info soon ! 11 000 lines offered by Richard Maine via anonymous ftp on ftp.dfrf.nasa.gov (130.134.64.17), file pub/fdas/f90sample/fdas.tar.Z STEJOI, statistical package for joint occurrence events, on Sun, including source code and everything, via anonymous ftp on molene.ifremer.fr, file pub/ifremer/fortran90/f90dvl.tar.Z. Module unsigned_32, for definition and use of unsigned 32 bits integers, also on molene.ifremer.fr, file pub/ifremer/fortran90/unsi32.f90.Z. Algorithm 999 by A.G. Buckley for unconstrained nonlinear minimization, on ftp.royalroads.ca, pub/software/bbuckley/alg999/source. Courses and Consultancy ----------------------- IT Independent Training Limited, UK CTS, Germany Unicomp, USA Pacific-Sierra Research Corp., USA 3.- Documentation: ################## Standards --------- ISO/IEC 1539:1991 (E) International Standard Information technology - Programming langages - Fortran Somewhat expensive (CHF 210 ~ US$ 140 !) for instance, at ISO. Surprisingly enough, the identical, save for foreword and acknowledgements, ANSI standard X3.198-1992 is even more expensive. Walter S. Brainerd, Unicomp., offers: - for 125 US$, an electronic ascii monouser version, - for 125 + 10n US$, an electronic PostScript version, and the right to make n paper copies, - or for 1000 US$, an electronic ditroff monouser version. A French translation is available as European norm NF EN 21539. Journals -------- Fortran Journal ISSN 1060-0221 Enquiries: Walt Brainerd walt@netcom.com Subscriptions: Fortran Users Group / P.O. Box 4201 / Fullerton, CA 92634 (about $30/year individual, $100/year company, ~$50/$150 outside the USA, call 1 (714) 441 2022) Fortran Forum edited by Loren Meissner. Books ------ * in English, Adams, Brainerd, Martin, Smith, Wagener. Fortran 90 Handbook, McGraw-Hill, 1992. ISBN 0-07-000406-4 Brainerd, W., Goldberg, and Adams. Programmer's guide to Fortran 90, 2nd edition, Unicomp, 1994. ISBN 0-07-000248-7 Counihan. Fortran 90, Pitman, 1991. ISBN 0-273-03073-6 Ellis, T.M.R, Lahey, T. and Philips, I. Fortran 90 Programming, Addison Wesley, 1994 ISBN 0-201-54446-6 Hahn, B.D. Fortran 90 for Scientists and Engineers, Edward Arnold, 1994. ISBN 0-340-60034-9 Kerrigan, J. Migrating to Fortran 90, O'Reilly and Associates, 1993 ISBN 1-56592-049-X Charles H. Koelbel, David B. Loveman, Robert S. Schreiber, Guy L. Stelle Jr., Mary E. Zosel High Performance Fortran Handbook, MIT Press, 349 pages, 1994. ISBN 0-262-61094-9 $24.95 in paper back ISBN 0-262-11185-3 $45 for hard cover Metcalf, M. and Reid, J. Fortran 90 Explained, Oxford University Press, 1992. ISBN 0-19-853772-7 Morgan and Schonfelder, Programming in Fortran 90, Alfred Waller Ltd., 1993. ISBN 1-872474-06-3 * in French, ABERTI, C. Fortran 90: Initiation partir du Fortran 77, Serie Informatique, 1992. ISBN 2-090615-00-6 AIN, M. Savez-vous parler Fortran, Bibliotheque des universites (de Boeck), 1994. ISBN 2-8041-1755-3 DELANNOY, C. Programmer en Fortran 90, Eyrolles, 1992. ISBN 2-212-08723-3 DUBESSET, M. et VIGNES, J. Les specificites du Fortran 90, editions Technip, 1993. ISBN 2-7108-0652-5 LIGNELET, P. Fortran 90: Approche par la Pratique, Serie Informatique, 1993. ISBN 2-090615-01-4 METCALF, M. et REID, J. (translated by M. Caillet and B. Pichon) Fortran 90: Les concepts fondamentaux, AFNOR Editions, 1993. ISBN 2-12-486513-7 * in German, Gehrke. Fortran 90 Referenz-Handbuch, Carl Hansen Verlag, 1991. ISBN 3-446163-21-2 Heisterkamp. Fortran 90: Eine Informelle Einfuehrung, BI-Wissenschaftsverlag, 1991. ISBN 3-411153-21-0 Langer. Programmieren in Fortran, Springer Verlag, 1993. ISBN 0-387-82446-4 Schobert, Oldenburg. Programmierung in Fortran 90, 1991. Ueberhuber, C., Meditz, P. Software-Entwicklung in Fortran 90, Springer Verlag, 1993. ISBN 0-387-82450-2 Wojcieszynski, B, Wojcieszynski, R. Fortran 90 Programmieren mit dem neuen Standard, Addison-Wesley, 1993. ISBN 3-89319-600-5. * in Russian, Metcalf, Reid Fortran 90 Explained * in Japanese Metcalf, Reid (translated by H.Nisimura, H.Wada, K.Nishimura, M.Takata) Fortran 90 Explained, Kyoritsu Shuppan Co., Ltd., 1993 Articles -------- Appleby, D., FORTRAN First in a six-part series on languages that have stood the test of time -- BYTE, Sep. 1991, 147-150 Bernheim, M., Fortran Mode d'emploi - Fortran 90 -- Intereditions (1991) 163-176 Brankin, R.W., Gladwell, I., A Fortran 90 Version of RKSUITE: An ODE Initial Value Solver, Annals of Numerical Mathematics, Vol 1, 1994, in press. Buckley, Albert G., Conversion to Fortran 90: A Case Study -- accepted (Sep. 93) for ACM TOMS (ftp.royalroads.ca:pub/software/bbuckley/alg999) Buckley, Albert G., Algorithm 999: A Fortran 90 code for unconstrained non linear minimisation -- accepted (Sep. 93) for ACM TOMS Chesneaux, J.M., Description d'utilisation du logiciel CADNA_F -- MASI 92.32 (1992) Institut Blaise Pascal, Paris Corde, P., Girou, D., Fortran 90: la nouvelle norme -- Tribunix Dossiers calculateurs, Vol 8. No. 41 (1992) 12-17 Du Croz, Jeremy J., Building Libraries with Fortran 90 Fortran Journal 4/5, Sep./Oct 1992 Glassy, L., Tiny-Ninety: A subset of F90 for beginning programmers -- Fortran Journal 4/3, May/Jun. 1992, 2-6 Hanson, R.J., A design of high-performance Fortran 90 Libraries -- IMSL technical report series No. 9201 (1992) Hanson, R.J., Matrix multiplication in Fortran 90 using Strassen's algorithm -- Fortran Journal 4/3, May/Jun. 1992, 6-7 Iles, Robert, Fortran 90: The First Two Years -- Unicom Seminar on Fortran and C in Scientific Computing, 1993. Iles, R., Palant, L., Fortran 90: 2 ans deja -- Tribunix No. 49 Mai/Juin 1993, 32-37. Lahey, T., Fortran 90 is coming ! -- Programmer's Journal, Mar/Apr 1991. Lignelet, P., Fortran -- Les Techniques de l'ingenieur, H2120, Dec 1993. Maine, R., Review of NAG Fortran 90 translator -- Fortran Journal 3/6, Nov/dec 1991. Metcalf, M., Recent progress in Fortran standardization -- Computer Physics Communications 57 (1989) 78-83. Metcalf, M., Fortran 90 - A summary -- Int. Journal of modern Physics C, Vol. 1, Nos. 2&3 (1990) 193-206. Metcalf, M., A derived data type for data analysis -- Computers in Physics, Nov/Dec 1991, 599-604. Metcalf, M., A first encounter with Fortran 90 -- Fortran Journal 4/1, Jan/Feb 1992, 2-7. Metcalf, M., An encounter with F90 -- Particle World 3/3 (1993), 130-134. Metcalf, M., Fortran 90 Tutorial -- CERN Computer Newsletter, Nos. 206/207/208/209/210/211 (1992-1993). Metcalf, M., Using the f90 compiler as a software tool -- CERN Computer Newsletter, No. 209 (1992). Metcalf, M., Still programming after these years -- New Scientist, (12 Sep. 1992), 30-33 Olagnon, M., Experience with NagWare f90 -- Fortran Journal 4/6, Nov/dec 1992, 2-5. de Polignac, Christian, Du Fortran VAX au Fortran 90 -- Decus, Paris, 7 Avril 1993. Prentice, John K., Fortran 90 benchmark results -- Fortran Journal 5/3, May/June 1993. Reid, John, The Fortran 90 Standard -- Programming environments for high level scientific problem solving, Gaffney ed., IEEE Trans., North-Holland (1992), 343-348. Reid, John, Fortran 90, the language for scientific computing in the 1990s --Unicom Seminar on Fortran and C in Scientific Computing, 1992 Reid, John, The advantages of Fortran 90 -- Computing 48, 219-238. Robin, F., Fortran 90 et High Performance Fortran, Bulletin technique CEA, Oct. 1992, 3-7. Sawyer, M., A summary of Fortran 90 -- EPCC-TN92-04, Univ. of Edinburgh, (1992). Schonfelder, J.L., Semantic extension possibilities in the proposed new Fortran -- Software practice and experience, Vol.19, (1989), 529-551. Schonfelder, J.L., Morgan, J.S., Dynamic strings in Fortran 90 -- Software practice and experience, Vol.20(12), (1990), 1259-1271. Sipelstein, J.M., Blelloch, G.E., Collection-oriented languages -- Proceedings of the IEEE, Vol. 79, No. 4, (1991), 504-530. Vignes, Jean, Vers un calcul scientifique fiable : l'arithmetique stochastique -- La Vie des Sciences, Comptes rendus, serie generale, tome 10, 1993, No 2, 81-101. Vignes, Jean, A stochastic arithmetic for reliable scientific computation MATCOM 940 - Mathematics and Computers in Simulation 35 (1993) 233-261. Walker, D.W., A Fortran 90 code for magnetohydrodynamics. Part I: banded convolution -- Oak Ridge National Lab. report TM-12032 (1992). Walter, W., Fortran 90: Was bringt der neue Fortran-Standard fuer das numerische Programmieren ? -- Jahrbuch Ueberblicke Mathematik Vieweg, (1991) 151-174. Wampler, K. Dean, The Object-Oriented programming Paradigm and Fortran programs -- Computers in Physics, Jul/Aug 1990, 385-394. Willhoft, Robert G., Comparison of the functional Power of APL2 and Fortran 90 -- APL Quote Quad, 1991 4.- Fortran 90 Benchmarking ########################### An interesting article by John K. Prentice appeared in the May/June 93 issue of Fortran Journal. He also gave a more complete one in HPNews July/August 93. I made some tests myself with LAPACK, and got a ratio of 10 between Sun f77 and Nag f90 2.0 when no source change was performed. With an aggressive rewriting, especially using array instructions and intrinsics, the ratio gets back to 2, which is also that of a f77 [sd]axpy to a C one. On actual applications, this ratio seems to be much closer to 1, and even sometimes in favor of Fortran 90. On Sept. 7th, 1993, John wrote "I think there is in fact beginning to be a quite large body of evidence to suggest that most of the efficiency fears about F90 are unfounded." For Nag f90 on workstations, the effect of the underlying C compiler (gcc, vendor, etc...) seems very limited (less than 4%). 5.- Announced, foreseen, and rumours #################################### CRAY full compiler CF90 in a Sparc version in 94 DEC full compiler (officially June 1994) Sun full compiler (unofficially mid-94) MicroSoft after next release of present PowerStationFortran Lahey (2nd quarter 94, pre-order, +400$ when buying F77L-EM/32) NA Software F90+, from ESPRIT - Supernode II project (June 1994) 6.- Workshops, seminars, conferences #################################### 3 - 5 May 94. "Parallel processing in Fortran" Seminar, Placerville, California. Applied Parallel Research, Inc. 18 - 21 October 94 "High Performance Fortran (HPF)" Workshop, Swiss Scientific Computing Center, CSCS-ETHZ, Manno (Ticino), Switzerland. Applied Parallel Research, Inc. 7.- Developments, related languages ################################### Standard -------- Work did not stop with the publication of the Fortran 90 standard. A new release is scheduled for 1996 (called 95), mainly devoted to clarifications, corrections and interpretations. A more important revision is scheduled for 2000 (or 2001 ? called F2k though C.Burley's F00 is a pleasant alternative). Documents related to the work of X3J3 can be found via anonymous ftp on ftp.ncsa.uiuc.edu, directory x3j3. HPF --- High Performance Fortran (HPF) is a language for programming massively parallel architectures. It lets the user insert directives for code and data distribution among the processors in the (Fortran 90) code. Electronic copies of HPF draft specification are available by anonymous FTP from the following sources: Machine name File name titan.cs.rice.edu public/HPFF/draft/hpf-v10-final.tar titan.cs.rice.edu public/HPFF/draft/hpf-v10-final.tar.Z titan.cs.rice.edu public/HPFF/draft/hpf-v10-final.ps titan.cs.rice.edu public/HPFF/draft/hpf-v10-final.ps.Z think.com public/HPFF/hpf-v10-final.ps.Z ftp.gmd.de hpf-europe/hpf-v10-final.ps.Z theory.tc.cornell.edu pub/hpf-v10-final.ps.Z minerva.npac.syr.edu public/hpf-v10-final.tar.Z PVM --- Parallel Virtual Machine consists of a library and a run-time environment which allow the distribution of a program over a network of (even heterogeneous) computers. It works with Fortran 77 (which is the way we presently use it), C and probably Fortran 90. There is a usenet comp.parallel.pvm group, and the FAQ for it can be found via anonymous ftp on rtfm.mit.edu, /pub/usenet. Parallel Programming -------------------- An interesting report can be obtained via anonymous ftp on bulldog.wes.army.mil:/pub/report.ps.Z, for a large review of products related to parallel systems programming. 8.- Addresses ############# AFNOR, Tour Europe, Cedex 7, F-92049 Paris la Defense, France tel: +33 1 42 91 55 55 Applied Parallel Research, Inc., 550 Main St., Placerville, CA 95667 tel: (916) 621-1600, fax: (916) 621-0593, forge@netcom.com ftp://ftp.netcom.com/pub/forge/home.html CTS, Prinz-Otto Str. 7c, D-85521 Ottobrunn, Germany tel: +49 89 6083758, fax: +49 89 6083758 DEC http://www.digital.com/info.html, info@digital.com EPC, 17 Alva St, Edinburgh, EH2 4PH, United Kingdom tel: +44-31-225-6262, fax: +44-31-225-6644, support@epc.ed.ac.uk EPC, 20 Victor Square, Scotts Valley, California 95066 tel: (408) 438-1851, fax: (408) 438-3510, info@epc.com Fortran Journal, P.O. Box 4201, Fullerton, CA 92634, USA fax: (714) 441-2022 ICHOR, 27 rue Linne, F-75005 Paris, France tel: +33 1 43 37 02 02 ISO, 1 rue de Varembe, Case postale 56, CH-1211 Geneve 20, Switzerland fax: +41 22 734 10 79 IT Independent Training Limited, 113 Liscombe, Birch Hill, Bracknell, Berkshire, RG12 7DE, UK tel: +44 344 860172, fax: +44 344 867992 Microway, Research Park, Box 79, Kingston, MA 02364, USA tel: (508) 746-7341, fax: (508) 746-4678 NA Software Ltd, Roscoe House, 62 Roscoe St., Liverpool L1 9DW, UK tel: +44 51 7094738, fax: +44 51 7095645, f90doc@nasoftwr.demon.co.uk NAG Ltd., Wilkinson House, Jordan Hill Road, Oxford, OX2 8DR, UK tel: +44 865 311744, fax: +44 865 311755, infodesk@nag.co.uk http://www.nag.co.uk:70/intro NAG Inc., 1400 Opus Place, Suite 200, Downers Grove, IL 60515-5702, USA tel: (708) 971-2345, fax: (708) 971-2346, infodesk@nag.com NAG GmbH., Schleissheimerstr. 5, D-85748 Garching, Germany tel: +49 89 3207395, fax: +49 89 3207396 NAG Users Association, PO Box 426, Oxford, OX2 8SD, UK tel: +44 865 311102, fax: +44 865 310139, nagua@nag.co.uk Pacific-Sierra Research Corp., 2901 28th Street, Santa Monica, CA 90405 tel: (310) 314-2300, fax: (310) 314-2323, info@psrv.com ParaSoft Corporation, 2500 E. Foothill Blvd, Pasadena, CA 91107, USA tel: (818) 792-9941, f90-info@parasoft.com Quetzal Computational Associates, 3200 Carlisle N.E., Albuquerque, NM 87110-1664, USA tel: (505) 889-4543, fax: (505) 889-4598, quetzal@aip.org Simulog, 1 rue James Joule, F-78286 Guyancourt Cedex, France (Mr. E. Plestan) tel: +33 1 30 12 27 00, fax: +33 1 30 12 27 27 Spackman & Hendrickson, Inc., 13708 Krestwood Drive, Burnsville, MN 55337, USA tel: (612) 892-5847, fax: (612) 892-5844 Unicom Seminars Ltd., Brunel Science Park, Cleveland Road, Uxbridge, Middlesex, UB8 3PH, UK tel: +44 895 256484, fax: +44 895 813095 Unicomp, Inc., 1123 Marigold Drive, Albuquerque, NM 87122, USA tel: (505) 275-0800, fax: (505) 856-1501, walt@netcom.com I am always pleased to receive informations. Thanks to all those who sent some to me, and that I can not cite all because I lost some of their names and addresses :-) Michel | Michel OLAGNON | email : Michel.Olagnon@ifremer.fr | | IFREMER: Institut Francais de Recherches pour l'Exploitation de la Mer| | Centre de Brest - B.P. 70 | phone : +33 98 22 41 44 | | F-29280 PLOUZANE - FRANCE | fax : +33 98 22 41 35 | -- ---------------------------------------------------------------- Keith H. Bierman keith.bierman@Sun.COM| khb@chiba.Eng.Sun.COM SunSoft Developer Products | 2550 Garcia MTV 12-40 | (415 336 2648) fax 964 0946 Mountain View, CA 94043 <speaking for myself, not Sun*> Copyright 1994