GAMIT/GLOBK Prerequisites

A PDF version (68 kB) of this web page is available in A4 or letter paper format and in the documentation directory of the GAMIT/GLOBK FTP server.

This information is compiled through experience with first-time users of GAMIT/GLOBK from workshops and elsewhere. Details are provided for installing GAMIT/GLOBK on Linux, Mac and Windows. Additional information is provided on optional programs such as GMT (required for any GAMIT/GLOBK scripts that produce plots), Tom Herring's tsview and velview tools and CATS (see here also).

All GAMIT/GLOBK workshop participants must arrive having read through and completed the steps shown on this web page before the start of the workshop.

This is particularly important given the time and resource constraints when downloading very large package files such as Xcode for Mac users, which will produce unnecessary and unwanted delays.

GAMIT/GLOBK
Introductory and reference manuals

We provide a Quick Start Guide and an Introduction to GAMIT/GLOBK as well as more detailed reference manuals for GAMIT and GLOBK. We recommend that all users using the software at least read the first two documents before starting with the software and refer to the latter documents for more advanced information as you gain experience.

In addition to a basic UNIX- or Linux-based operating system, there are four fundamental requirements for installing GAMIT/GLOBK on any system:

Many systems will have some or all of these installed by default but others may not. Below are some details about what to expect from various systems that I have experience with.

Once you have completed the steps described for your system, below, you may download and install GAMIT/GLOBK from the source code provided on the FTP server. Further information is available on the main GAMIT/GLOBK web page.

Linux

There are many different types of Linux system and each is slightly different. However, if you are a Linux user, it is likely that you are familiar with the command line interface, the requirements described above and installing packages as necessary. So I will restrict myself here simply to note a couple of specific points that I am aware of.

It is likely that most Linux systems will have a Fortran and C compliler installed by default. However, be sure to check with your system administrator or review instructions from your OS distributor (e.g. compilers on Ubuntu) to ensure that this is the case. You may also need to install the "gcc-multilib" and/or "gfortran-multilib" packages to ensure compatibility.

Beware that some systems (e.g. Ubuntu) may also require installation of csh and tcsh for GAMIT/GLOBK scripts to run. These may be installed quickly and easily through, e.g., the Ubuntu Software Center or
sudo apt install make libx11-dev csh tcsh

Mac

Apple provides many advanced command line tools with Xcode, a package mostly designed for developers of software but which also contains a C compiler and the X11 libraries and headers required for GAMIT/GLOBK. One must be registered as an Apple Developer in order to log in and download Xcode or the Command Line Tools only but the program is free to join and there are no obligations. Note that this is different from the regular Apple ID.

Once registered, log in, search for Xcode and download the latest version for your system (as of the last update of this web page):

From February 2012 and Xcode 4.3, Command Line Tools are available as a separate, smaller download also, which significantly reduces the size of the installation. Note that Xcode, but not the separate Command Line Tools sub-package, is available through the App Store for Mac OS X 10.7.3 (update of Lion) and later, or macOS.

If using Xcode 4.3.1 or later for Mac OS X 10.7, 10.8, 10.9, 10.10 or 10.11, or macOS 10.12 or 10.13, you must open Xcode (under "Applications") and additionally select to install "Command Line Tools" in "Preferences". Alternatively, run xcode-select --install from the command line. If you are using another version of Xcode, I recommend selecting not to install anything except these command line tools in the installation wizard because Xcode is a very large package from which we only require a small number of programs.

Xcode does not include a Fortran compiler but you can install one using the information provided here.

As of Xcode 4.4, Apple has also discontinued support of X11. XQuartz may instead be installed for the required X Windows libraries and headers described above, which will be placed in /opt/X11/lib and /opt/X11/include, respectively, rather than /usr. However, a link from /usr/X11 to /opt/X11 is created, so all Mac users may keep the following set in libraries/Makefile.config:

X11LIBPATH /usr/X11/lib
X11INCPATH /usr/X11/include

Windows

Recent releases of Windows 10 have the ability to install and run a more "native" command line. Follow the Microsoft Docs installation guide to install the "Windows Subsystem for Linux". Once complete, ensure installation of required packages, e.g. for Debian-based distributions such as Ubuntu:

sudo apt install gfortran make libx11-dev csh tcsh bc

or for RPM-based distributions such as openSUSE:

sudo zypper install gcc-fortran libX11-devel tcsh ftp hostname

Otherwise I recommend installing a virtual machine (e.g. VirtualBox or VMWare Workstation Player), which then requires the installation of a regular Linux distribution (e.g. Ubuntu) to run via the virtual machine. One may then install and run GAMIT/GLOBK on this virtual machine operating system.

Previously I had preferred to use Cygwin, which is a common Linux "emulator" for Windows, for installing and running GAMIT/GLOBK. To install Cygwin, download and run setup-x86.exe (32-bit) or setup-x86_64.exe (64-bit) to begin installation. Generally the defaults shown throughout the installation process are adequate and need not be changed. There are, however, specific packages which are required in addition to the default Cygwin packages that are installed. These are at least:

One may search for the appropriate packages from the Cygwin package search. Search for "libX11.*" and "Xlib.h" for the X11 libraries and header file, respectively, to find the appropriate package.

I also highly recommend installing the X11/xinit package and its dependencies. This will provide an X Windows environment from which one can open and use, for example, Emacs for creating or editing text files. This is important given then different end-of-line characters between Windows and other systems (Unix, Linux and Mac OS X or macOS).

Additional software

There are several additional programs that users may find useful, if not necessary, to install. The major addition is GMT, which is required for any GAMIT/GLOBK scripts that produce plots, e.g. sh_plot_pos, sh_plotvel, etc. GMT produces Postscript graphics which are most readily viewed using, for example, "gs" or "gv".

You can install GMT for Debian-based Linux distributions such as Ubuntu from the main repository with a command such as:

sudo apt install gmt gmt-dcw gmt-gshhg

or for RPM-based distributions such as openSUSE from a community repository with a command such as:

sudo zypper ar -f http://download.opensuse.org/repositories/home:/beyerle:/IAC/openSUSE_Leap_15.1/home:beyerle:IAC.repo

or:

sudo zypper ar -f http://download.opensuse.org/repositories/home:/beyerle:/IAC/openSUSE_Leap_42.3/home:beyerle:IAC.repo

etc. depending on your distribution, then:

sudo zypper install GMT

Tom Herring has produced GUI-based programs for time series (tsview) and velocity (velview) viewing and simple manipulation.