Using OS/2 as a Scientific Platform- by Dr. Dirk Terrell

In May I had an observing run on the historic 100-inch Hooker telescope on Mt. Wilson near Los Angeles. Some fellow astronomers and I were there to measure the variation in brightness of several eclipsing binary stars, stars that orbit one another in such a way that they pass in front of one another as seen from Earth. When I arrived on the mountain, the history of the place made a big impression on me. This was the telescope that Edwin Hubble, for whom the Hubble Space Telescope was named, used to demonstrate that the universe is expanding. For nearly four decades, the 100-inch telescope was the largest in the world after its commissioning in 1917. In 1985 the telescope was mothballed due to a lack of funding. Recently, however, the telescope was refurbished and recommissioned. As I made my way to the telescope control room, I wondered what it was going to be like to use the old giant. Old telescopes are generally very finicky and all have their own personalities. But when I went into the control room, I was greeted by a very familiar sight. The telescope was controlled by a PC running OS/2.

I was mildly surprised to see OS/2 being used to control the telescope, as Unix is much more popular in scientific applications. But OS2's preemptive multitasking and multithreading capabilities make it a powerful contender when considering operating systems for a PC workstation.

I began using OS/2 when version 2.0 was released back in the spring of 1992. I had just bought a top-of-the-line 50 MHz Gateway 2000 486 DX/2 to help speed the completion of my dissertation on a particular type of binary star called "algols". The work involved running my hydrodynamics code and then comparing the results to observations of these stars. It would usually take several days for one simulation to run to completion. Naturally, I wanted to be able to use the PC for other things while the hydro simulations were running. The PC came, of course, with Windows 3.1, and right there in the manual it said that multitasking was possible under Windows. Using the Lahey DOS Fortran compiler, I set a simulation in motion, and then fired up Word to work on a letter. A few minutes later, everything froze and nothing I did would bring the machine back to life. Time to hit the reset switch and start over.

It didn't take long to realize that DOS/Windows just wasn't going to cut it as an operating system for my work. I didn't want to go the Unix route because I had a significant investment in DOS and Windows software. I had heard that OS/2 was a 32-bit, preemptive multitasking operating system that could run DOS and Windows applications as well. So, I wandered over to Babbages in the mall and picked up a copy. I have never looked back.

My simulations could run in their own VDM and not be affected by the crashes of other programs. Not once have I ever lost a simulation due to a crash. I have gotten so accustomed to OS/2's robustness that I cringe when I sit down at a machine running Windows and try to do more than one thing at a time.

Scientific work using computers usually involves three major functions: calculations, viewing the results, and publishing a paper. OS/2 excels in all of these areas. When I first began using OS/2, there were not many native applications for doing these things. But OS/2's DOS and Windows compatibility enabled me to use my existing software without fear of system crashes. I used the DOS Lahey Fortran compiler to compile my code, Sigmaplot for Windows to view the output, and Word for Windows for publishing papers. I also used Mathematica for Windows, but it did not run under OS/2 2.0, so I had to use the Dual Boot feature of OS/2 to run Mathematica. Later, under OS/2 2.1, Mathematica for Windows ran just fine.

Over time I have moved away from DOS and Windows software to native OS/2 versions of the tools I need. The Watcom Fortran compiler is very good. It produces fast, compact 32-bit code and is shipped with sample code for creating Presentation Manager applications and REXX libraries. REXX is one of the many hidden pearls that come with OS/2. It is a relatively simple, yet very powerful language, especially when it comes to dealing with text files. A downside to REXX is that it is an interpreted language and therefore slower than a compiled one, but for small jobs that often creep up, it is ideal. A lot of my work involves processing output files from various programs, and I use REXX to do all of that. Using Watcom's VX-REXX, I have written some very powerful Presentation Manager programs with great ease. If C/C++ is more to your liking (or if you are like me and avoid the silliness of arguing about which language is best and use the one that is best suited to the task at hand), IBM's VisualAge C++ is an awesome tool. It is what I thought I was going to get when I made the mistake of buying Microsoft Visual C++ a couple of years ago. I believe VAC++ is going to lead to a flood of OS/2 applications.

Some people prefer to avoid writing code if possible, and use tools like Mathematica or Maple to do calculations. With these tools you get built-in libraries to perform various numerical or symbolic calculations and avoid the drudgery of chasing bugs in self-written code. These tools can also do many kinds of graphical displays of data, a very important part of the scientific process. Last fall, Wolfram released the first OS/2 version of Mathematica. The OS/2 version is noticeably faster than the Windows version under either DOS/Windows or Win-OS/2. A downside is that there is not yet an OS/2 version of the Notebook interface like that in the Windows version. For some people this may be a severe handicap, but I do not find myself hindered by it. Having served as a beta tester of the OS/2 version of Mathematica, I can say that they are very responsive to input about their product and if demand is high enough, they will produce a Notebook interface for OS/2. It is possible to use the Windows interface and the OS/2 kernel, but there is a performance penalty in doing so. I hear that an OS/2 version of Maple will be released soon, and that is welcome news here. I prefer the graphical output format of Maple to the text output of Mathematica.

When it comes to graphing data, nothing beats the speed of the freely available GNUPlot for OS/2. I use it to do quick looks at results. For publication-quality graphs, I still use Sigmaplot for Windows, but I have recently been working with the demo version of Xact and it seems quite capable.

Publishing the results of one's work is an important part of doing science, and OS/2 is quite capable in that area as well. Many journal publishers will accept manuscripts in electronic format, and I suspect in the future most will it. The most popular format is LaTeX, and many publishers supply templates for their particular journals. The EMTeX tool is available for OS/2 and the only cost is the time to download it from Hobbes. Combined with the Enhanced Editor (EPM) that comes with OS/2 and the EPMTeX add-on, EMTeX makes a fine system for producing manuscripts. These tools are available on in the /os2/unix/tex directory. I prefer to do most of my word processing with Describe, which imports and exports WordPerfect, Word, and AmiPro documents (as well as many others).

If you are like me and exhibit the Pavlovian response of entering Unix commands at a command prompt, you will be glad to know that most of the popular Unix tools have been ported to OS/2 and are freely available at the Hobbes ftp site. These include tools like grep, editors like vi, and even Perl if you are comfortable with that very powerful scripting tool. There are even ports of various Unix shells like the Korn and csh shells that can replace the native OS/2 command shell.

In conclusion, I (and many others) have found OS/2 to be a stellar performer as a scientific workstation OS. The combination of robust multitasking, extensive software compatibility, and the very easily installed network features in Warp Connect turn a PC into a very powerful scientific workstation, be it standalone or as a front end into more powerful number crunchers.

Dr. Dirk Terrell is an astronomer at the University of Florida specializing in interacting binary stars. His hobbies include cave diving, martial arts, painting and writing OS/2 software such as HTML Wizard.

Send a letter to the editor.

Contents | Previous Article | Next Article

This page is maintained by Falcon Networking. We welcome your suggestions.

Copyright © 1995 - Falcon Networking