1.4. The Scientific Software Stack

../_images/linuxStack2.png

Our Scientific Computing Environment will consist of a number of programs which work together to allow us to carry out the activities `Scientific Computing`_ in Section 1. You might download them separately (I call this the “à la carte” method), or as a large package. In addition, the list usually changes from year to year as new packages appear that do the job better than what we used previously.

In some Environments–like at supercomputing centers–the stack includes several packages to do a specific task and users can choose the one that suits their needs the best, or the one which they are most familiar with. Also, supercomputing centers typically have a variety of machines designed for specific tasks. You use one for high performance number crunching, and another system for 3-D data visualization.

For this course I have chosen a standard set of applications/programs, which I list below. I have set the color of the cells in this table to light red, like this: to show items that are Built-in to the OS or come with the installation.

  Fedora Scientific Windows PC Mac OSX
Unix Shell
Built-in:
  • Bash
  • Cygwin
  • MSYS
  • Git Bash
Built-in:
  • Zsh
Text Editor
Built-in:
  • Vim
  • Emacs
  • Eclipse
  • SciTE
  • Notepad++
  • Others...
  • Emacs via MacPorts
  • Kate via MacPorts
  • TextWrangler
Data Visualization
Built-in:
  • Gnuplot
  • MatPlotlib (in Python)
  • Mayavi
  • Gnuplot
  • Matlab (U. Pacific Lic.)
  • AVS ($)
  • Others... ($)
  • Gnuplot (via MacPorts)
Scientific Publishing
*Built-in:
  • LaTeX
  • Kile Editor
  • MikTex
  • MacTex
Drawing/CAD
Built-in:
  • Xfig
  • Inkscape
  • Dia
  • GIMP
  • WinFig ($)
  • Inkscape
  • Dia
  • GIMP
  • SolidWorks ($)
  • WinFig ($)
  • Inkscape
  • Dia
  • GIMP
Remote Computing
Built-in:
  • SSH
  • SFTP
  • SCP
  • CURL
  • Putty
  • WinSCP
Built-in:
  • SSH
  • SFTP
  • SCP
Math / Science
Built-in:
  • Octave
  • Python
  • Sage
  • R
  • SciPy
  • Root
  • Units
  • Maxima
  • Mathematic (by remote login at U. Pacific)
  • Mathematica ($) or by remote login
  • Python tools via Anaconda
  • R
  • Octave
  • Mathematica ($) or by remote login
  • Python tools via Anaconda
  • R
  • Octave
Programming
Built-in:
  • C/C++
  • Fortran
  • Java
  • Python
  • iPython
  • PERL
Distributed Computing
  • OpenMP Shared Memory Computing
  • OpenMPI Cluster/Parallel Processing
Libraries
  • GSL GNU Scientific Library
  • FFTW Fast Fourier Transforms
  • C/C++/Python via Cygwin
  • Python via Anaconda
  • PERL via ActivePerl
  • C/C++ via gcc/MacPorts
  • Python via Anaconda

Most of these tools are available a la carte i.e. as individual applications; you have to install each separately. While that is certainly possible, it takes some effort and the individual applications are not setup to work together effectively.

If you use a PC, the `Cygwin`_ application installs a suite of programs which emulate a Unix environment under the Windows OS. However, it is not a real Unix operating system, only a set of Windows programs which make it possible to build other unix programs and allow them to run under Windows.

If you use a Mac, the underlying OS actually IS Unix. This is why the first item, the Unix Shell, is built-in. You can access it by opening Finder->Applications->Utilities, and clicking on Terminal . This opens a text window, with a prompt (more on this in the next chapter), waiting for you to enter Unix commands.

Notice all the Built-in‘s in the first column under Fedora Linux/Scientific Spin! The simplest way to get all the programs needed for a robust scientific computing environment would be to get a real Unix system running the Scientific Spin of the Fedora Linux OS. Otherwise, you have to install all of the programs individually (” à la carte ”). There are a number of ways to get Linux on your computer.

  • Erase your current Windows or Mac OS, Reformat your hard drive,

and install Fedora Linux as your operating system. Yes–pretty extreme. But if you are really committed... Linux gets your whole computer; all your hard drive space, and when running all your memory and CPU speed.

  • Dual Boot This method installs the Linux OS on a separate

partition of your hard drive. Thus your Windows (or Mac) OS looses some hard drive space to the new partition. When you turn on your computer, you are asked if you want to boot into Windows (or OSX), or Linux. Once chosen, the OS gets all of the CPU and memory of the machine, and the whole of the disk partition belonging to that OS.

  • A Virtual Machine running Linux The Best of Both Worlds AT THE SAME TIME!

From the Wikipedia page on Virtual Machines (please read the introduction):

"a virtual machine (VM) is an emulation of a particular computer system"

The Virtual Machine software interfaces with your computer’s hardware at a low level, and then provides an environment which looks like a clean and blank computer. The software can create several such VM’s, each blank and ready to be loaded with whatever software you like–AND they can all run at the same time. You configure the size of the disk drive for each, the amount of memory, and several other configuration options. When you run the VM software, you can start each of the virtual machines you have configured.

Thus on your Windows machine, you could have two VM’s running (each in a window of their own), one a complete Linux computer, and the other running OSX. It is important to note that these running machines will take their resources (CPU speed, memory, and disk) from the actual physical resources in your computer. Thus if your Windows computer has 8 Gigabytes of memory, and you asign 4 Gb or memory to your “guest” Linux VM, then your “host” Windows computer will have only 4 Gb for itself. However, unless you are pushing either of your computers to their limit (such as gaming, streaming video, or doing significant numerical computation), then you won’t really notice the fact that your physical computer is being shared by your native OS and your VM. Magic! There are several popular Virtual Machine programs (see: this`article`_).

One of the most popular and FREE Virtual Machine applications is`VirtualBox`_ from Oracle. VirtualBox runs on Windows, Macs, and Linux “hosts”. This means, you could even take the first option–erase your OS, install Linux as the primary OS, then run Windows in a VM as a guest. However, most of you will be running either Windows on a PC or OSX on a Mac. Thus, for this class, I am recommending that you install the appropriate VirtualBox package for your computer, then you will configure a VM and install the Scientific Spin of Fedora Linux on it. You can then run Linux and the scientific tools on your computer.

Whether you have a Mac or a PC won’t matter, since in either case you will be running Linux. VirtualBox even comes with some cool features, like Seamless Mode which runs the Unix programs in individual windows so that they look and feel just like other native programs. However, with this method, you have a real Unix kernel running, so the Unix applications are full-featured. In the next chapter, we will assemble these tools and install them.

1.5. Homework

Homework 1 is here