The MIRIAD MacPort Homepage

This is the homepage of the MacPorts package of the MIRIAD radio astronomy suite, which makes it easy to install and update MIRIAD on your Mac OS X computer.

This is not a website about MIRIAD itself and we’re not going to discuss what MIRIAD is or why you might want to install it. If you have questions along those lines, see:

  1. the MIRIAD wiki
  2. the CARMA MIRIAD site
  3. the CARMA bugzilla (which tracks MIRIAD bugs amongst others)
  4. the homepage for the ATNF version of MIRIAD (which differs somewhat from the software we’re discussing)

The version of MIRIAD distributed through MacPorts was last updated on 2014 November 5. See below for information on what’s changed since the last snapshot.

Background: MacPorts?

MacPorts is a system to ease the installation and management of Unix-oriented software on Apple computers. Since MIRIAD is hard to build as it is and OS X is somewhat different than most Unix-like operating systems, we think that installing MIRIAD through MacPorts will be an appealing choice for the many astronomers with Apple hardware.

MacPorts works by providing some general tools for managing software installations as well as a database of recipes for compiling many, many pieces of software. The “MacPorts package of MIRIAD” is one of these recipes. It links to a recent snapshot of the MIRIAD source code, the other pieces of software which need to be present in order to compile MIRIAD, and so on. We update the snapshot and the recipe periodically so that MacPorts users can easily track recent MIRIAD development.

The key advantage to using MacPorts to compile something like MIRIAD is that it provides a relatively controlled environment for building the software. Most build problems are due to little differences between the software installed on one person’s computer and another’s, so eliminating those differences goes a long way to eliminating build problems.

A secondary goal of the MacPorts distribution of MIRIAD is to provide frequently-updated, versioned packages of the MIRIAD source code. It’s easier to track down bugs and reproduce results when the code you’re using comes in discrete, uniquely-named releases. The MacPorts packages of MIRIAD have unique version numbers (via the inclusion of their release date in the version number) so that it’s easy to specify exactly which code you’re using. The source code bundles distributed on this page will compile on all systems, so you don’t have to be an OS X user to take advantage of this.

Installing MIRIAD with MacPorts

Installation can take a long time but is as straightforward as we can make it. The steps are:

  1. Make sure you will be able to leave your computer running for several hours. The initial install does not need much attention but will take a while to compile everything. (Updates are faster.)
  2. Install the MacPorts system on your computer using these instructions. If you need help with this step, there’s a lot of information available online; see the MacPorts help links at the bottom of their installation page or the generic MacPorts support page.
  3. Open a terminal and run
    sudo port sync
    to fetch the most up-to-date data from the MacPorts server.
  4. Which telescope will you be reducing data from?
    • If you’re using CARMA, note down that your “variant string” is +carma.
    • If you’re using the Allen Telescope Array, note down that your “variant string” is +ata.
    • If you’re using the Westerbork Synthesis Radio Telescope, note down that your “variant string” is +wsrt.
    • If you’re using the Submillimeter Array, note down that your “variant string” is +sma.
    • For anything else: contact the port maintainer and ask for a “variant” to be created for your telescope. In the meantime, you can probably use an empty “variant string” and get started OK.
  5. Install the software on which MIRIAD depends. Execute the following magic command in your terminal, replacing “VARIANTS” with the “variant string” you determined above, and putting the whole command on one line:
    sudo port -u install `port info --depends miriad VARIANTS |perl -ne 'print "$1 " while /port:([^,]+)/g'`
    For example, for an ATA user,
    sudo port -u install `port info --depends miriad +ata |perl -ne 'print "$1 " while /port:([^,]+)/g'`
    Your computer will begin to work for a long time. (If the command fails instantly, triple–check that you entered it in correctly.) You might take this opportunity to read the MacPorts Guide for some overall documentation of the MacPorts system, how it works, and how to keep it running smoothly on your machine.
  6. Eventually, your computer should finish without printing any obvious error messages. If something seems to have failed, the problem is outside of the MIRIAD MacPort and we can’t offer you any specific advice. Consult your local system administrator or ask the port maintainer nicely.
  7. Install MIRIAD itself. In your terminal, run
    sudo port -vku install miriad VARIANTS
    replacing “VARIANTS” as before.
  8. It will take something like half an hour to compile MIRIAD. Once again, consider reading the MacPorts Guide while this is happening. Your computer should finish with a message about “Activating miriad”, some notes on setting up your shell, and no obvious error messages. If something seems to have failed, contact the port maintainer with the exact text of the output that’s worrying you.

For general help with the MacPorts system, see the MacPorts support page, which we hope you will find useful. That page, however, has no MIRIAD-specific information.

Updating MIRIAD with MacPorts

Once you have MIRIAD installed in this way, you can update your installation with the following steps:

  1. Open a terminal.
  2. Run
    sudo port sync
  3. Run
    sudo port -vunk upgrade miriad
    If nothing happens, you already have the most recent version of MIRIAD that’s been uploaded to MacPorts.

If you get an error, you might try opening a terminal and running:

  1. sudo port selfupdate
  2. sudo port -u upgrade outdated

It is also good to run these commands once in a while even if you don’t get any errors with MIRIAD. They may, however, take a long time to run. More information on keeping your MacPorts installation running smoothly are beyond the scope of these instructions. Once again, consult the MacPorts support page.

The MacPort version of MIRIAD is updated approximately every few months. Updates will be released more rapidly for key bugfixes to the tasks or build system — contact the port maintainer to request an update. The source code bundles are produced by a make dist using the autotools in a pristine checkout of the MIRIAD source code. The “last updated version” mentioned at the top of this webpage may be either ahead of or behind what your MacPorts system says is available, depending on the timing of updates to their site and this one.

Manuals

Note that the ATNF guides describe ATNF MIRIAD. This is not identical to CARMA MIRIAD, but there is a substantial overlap. All manuals are formatted as PDFs.

Release History

Releases of MIRIAD itself are infrequent, so we name our releases with the date they were produced as well as the MIRIAD version number. Note that you don’t need to download the source code here to install MIRIAD with MacPorts — the MacPorts system takes care of that step for you.

miriad 4.3.8.20141105 (source code)

miriad 4.3.8.20140718 (source code)

miriad 4.3.7.20131227 (source code)

miriad 4.3.7.20131222 (source code)

miriad 4.3.7.20130915 (source code)

miriad 4.3.7.20130827 (source code)

miriad 4.3.7.20130726 (source code)

miriad 4.3.4.20130606 (source code)

miriad 4.3.4.20130224 (source code)

miriad 4.3.4.20120913 (source code)

miriad 4.3.4.20120618 (source code)

miriad 4.3.2.20120608 (source code)

miriad 4.2.3.20120407 (source code)

miriad 4.2.3.20120309 (source code)

miriad 4.2.3.20111010 (source code)

miriad 4.2.2.20110722 (source code)

miriad 4.1.7.20110426 (source code)

miriad 4.1.3.20100706 (source code)

miriad 4.1.3.20100512 (source code)

miriad 4.1.1.20100302 (source code)

miriad 4.1.1.20100222 (source code)

miriad 4.1.1.20091018 (source code)

miriad 4.1.1.20090925 (source code)

Contact Information

For more information or troubleshooting help, contact the port maintainer, Peter Williams, at pwilliams@cfa.harvard.edu.

Advanced Topic: Choosing Compilers

The MIRIAD MacPort allows you flexibility in choosing the compiler used to compile MIRIAD. Unless you know of a specific reason to avoid the default compiler, you should use it. If you want to use a specific version of the MacPorts–distributed copies of gcc, there are +gccXY variants in the MacPort that will build MIRIAD using GCC version X.Y. Use the command port info miriad to get a listing of which of these variants are supported.

It is also possible to use a compiler other than the MacPorts-provided version of GCC to compile MIRIAD. This setup is neither recommended nor supported because of the subtle bugs that very often result from nonstandard compiler configurations. If you are not able to install MIRIAD on a Mac successfully without the use of the MacPort, you should probably not attempt to use a nonstandard compiler configuration. However, the use of a custom compiler can provide certain advantages:

You can choose which compiler will be used to build MIRIAD by installing the gcc_select MacPort, specifying a compiler with the gcc_select command, and building the MIRIAD MacPort while specifying the +gcc_select variant.

To build MIRIAD with a custom compiler, then, you need to define your compiler’s setup in the gcc_select system and then select it. This is done by creating a file in /opt/local/etc/select/gcc named something like custom of the form:

/path/to/cc
/path/to/cpp
/path/to/c++
/path/to/c++
-
-
/path/to/fc

Each line in the file specifies the path to a standard compiler executable. Most notably, the last line specifies the Fortran compiler to use. (The two lines with dashes point to the Java compiler and the code coverage tool, typically gcj and gcov. These are not used when compiling MIRIAD.) If you mix and match executables from different compiler versions, your build will almost assuredly fail. Then, “select” your new compiler by running a command such as

gcc_select custom

This support should be sufficient for you to attempt building the MIRIAD MacPort with any compiler you want, but be prepared for a lot of frustration and wasted time unless you know exactly what you’re doing.