FORTRAN: From Mainframe (to PC) with Love
Edward R.H. McDowell · All Days · 1995
Edward R.H. McDowell. Jr. Abstract In 1993, PipeSoft Corporation ported 250,000 lines of FORTRAN code in 600 subroutines written for IBM 370 mainframes to the PC. This process produced PipeSoft's PC-based multiphase fluid flow simulator. PIPESOFT-2. The original simulator was developed by Chevron between 1976 – 1992. The new PC-based simulator, PIPESOFT-2 provides the same functionality as the mainframe version. The wide acceptance and power of the PC makes porting legacy mainframe systems a realistic alternative to designing and building software from scratch for the PC. Porting not only extends a program's useful life, but also increases distribution opportunities. And, once ported to a mainstream platform the software can continue to be improved without loss of the original investment. The Plan PSC would receive a tape containing the FORTRAN source, quality control data and run results. A Unix workstation would serve as PSC's "mainframe." Our plan was simple: get the code running under Unix and compare Unix OC results to IBM OC results. Then port the code to the PC and compare PC OC results to Unix OC results. (This double port wasn't quite as ambitious as it seems - Chevron had already ported the code to a Cray.) Since PIPESOFT-2 is dynamically dimensioned we felt that recoding platform specific memory management routines would be the biggest obstacle. PIPESOFT-2 actually consists of 10 modules. Three of which run sequentially and provide pre-processing of data. The fourth module (or more) run depends on selected modeling options. We chose to use Microsoft FORTRAN PowerStation because:–A large, flat, 32 bit address space was necessary for the program.–A prior attempt to port the program to a PC using a different FORTRAN compiler encountered difficulties.–We anticipate that Microsoft will migrate support of their FORTRAN offerings to other platforms (e.g. Windows NT) in the future. We anticipated this effort to be straight forward because the code was originally written with then current programming techniques, such as "modularization," and "top down structured programming." The code, on the whole, is well constructed. P. 331