Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Parallel

Fortran and IMSL: It's MacOS's Turn


Joining us today is Wood Lotz, president of Absoft -- a company that specializes in developing software development tools for Fortran, C/C++, and high-performance computing on Windows, OS X, and Linux on 32-bit and 64-bit processors from Intel, IBM, and AMD.

DDJ: Wood, you recently announced the availability of the IMSL Fortran Numerical Library -- the first implementation of such a library, in fact, for the MacOS/Intel. What is the IMSL library?

WL: IMSL in an acronym for "International Mathematical and Statistics Library". It is a platform-independent numerical library of core subroutines useful in a wide variety of fields and important for those who develop numerically intensive applications. The library consists of over 1000 special function routines and is deployed on over 70 different platforms (Mac, Windows, Linux/Intel, Linux/SPARC, AIX, etc.) worldwide. IMSL libraries are generally regarded as the most sophisticated, flexible, and scalable numerical libraries available. They dominate that space in the U.S., the Far East, and have a good presence in Europe. The benefits of having a platform-independent numerical library such as IMSL benefit customers in three ways:

  • Application developers typically focus their energy addressing the unique requirements of their application and utilize existing core routines for basic linear and algebra routines (rough analogy: carpenters build the building but don't make their own hammers). Open source routines are available but they are generally not as good or robust. Those who require more advance routines for: FFTs, Interpolation, Differential equations, Regressions, etc. may be faced with limited choices: develop their own or use a commercial library such as IMSL. Thousands of applications use IMSL routines as their underlying libraries.
  • The fact that the same IMSL routines, which operate in the same manner, are available on multiple platforms makes porting applications to different environments much easier because the underlying math routines are already there.
  • Savings is in time and resource by using IMSL rather than developing, testing, debugging and deploying a basic routine usually pays for the cost of an IMSL license.

DDJ: So what was it like to implement the library for this platform? More difficult than you expected? What were the stumbling blocks, if any?

WL: Absoft has been porting the IMSL library to various platforms for over 17 years. The library consists of almost 8500 FORTRAN 77 and Fortran 90 source files. Porting is simplified with an extensive makefile system developed for the gnu toolset (make, as, ar, ld, ranlib, etc).

The first step is to build the library at the highest optimization level. The library is then tested with an extensive test suite. Failures are identified and optimization is reduced until the failure is eliminated.

There are four library configurations: basic, SMP (with ATLAS BLAS), MPI, and MPI/SMP.

Once all test cases pass for all library configurations, the library is submitted to VNI for final acceptance testing and packaging.

Neither the 32-bit nor the 64-bit port of the library posed any significant problems on the Macintosh.

Two issues were identified:

  • The Macintosh loader cannot properly link Fortran COMMON blocks from shared libraries, so only the static version of the IMSL library is supported.
  • Apple provides its own versions of the ATLAS and LAPACK libraries. Neither of these would validate with the IMSL library, so the Absoft versions were substituted.

Other than that, things went very smoothly. Our IMSL customers include virtually all large universities, Fortune 100 companies, and most national labs.

DDJ: With all the hoopla about Java, Ruby, Python, and other languages of the day, Fortran seems to get lost in the shuffle at times. Are developers still using it? If so, for what and where?

WL: You are certainly correct that Fortran does not enjoy high visibility in the current fashion world of computer languages. Fortran used to be taught in many of the colleges but with the trend toward Linux the focus has moved to C. C is also used to build the majority of commercial business applications and newer languages like Java and Ruby always attract attention. However, Fortran is still alive and well, just not highly visible...

  • Fortran is still the most efficient language for writing very fast, numerically intensive programs. It could be considered more primitive in nature than C++, but its very nature allows one to apply more advanced optimizations which result in faster code.
  • There is a LOT of existing Fortran code which just works and it is to expensive and time consuming to recreate it or convert it to another language so the old adage, 'If it ain't broke...' applies.
  • Fortran is one of the few languages with an active ANSI (American National Standards Institute) committee working on new and improved future versions of Fortran. There would be no committee if the language was not used enough to warrant it.
  • At a national conference on High-Performance Computing (HPC) I attended two years ago in Washington DC, it was stated that 50 percent of the HPC applications are written in Fortran. So HPC customers, are generally Fortran users. In fact. if you look at any supplier of HPC tools, you will find the two languages they offer for software development are, Fortran and C/C++. Companies like IBM and Intel who also develop compilers offer only two languages: Fortran and C/C++.
  • Fortran applications are typically special purpose built apps, not the stuff sold in shrink wrap boxes you see in the store. But, you encounter the benefits of Fortran based apps every day. For example, data for the doppler radar weather news you see on your evening news is generated by Absoft Fortran running on a Linux server (nationwide); large components of CFD programs, used to design of engines, aircraft, automobiles, ships, and many other complex products are typically written in Fortran; earth science programs such as weather, oil drilling, atmospheric and ocean studies are written in Fortran; the medical industry has developed Fortran-based applications to simulate nano particles, genomes, dna and atomic structures; ditto drug companies; banking and insurance industries use Fortran to develop actuarial tables to trade funds or predict risk. The list goes on... Chicken farmers even use Fortran to determine how to breed the most cost effective chickens (feed/space/meat) based on genetic selection.

DDJ: Can you point to a website that readers can visit for more information on FORTRAN and other such topics?

WL: Readers should feel free to come to Absoft and we welcome questions. Also, you may recall the space shuttle Columbia which broke apart during re-entry in 2003. Absoft Fortran was one of the primary tools used to help diagnose the cause of the shuttle disaster. This article describes the process and provides a good practical illustration of how Fortran helps solve modern problems. It is quite interesting.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.