See also our Miriad Wiki Notes on more recent descriptions. What you see below is probably too old.

1: Installing MIRIAD

There are a number of ways to install miriad. If you are very lucky, there will be a compiled tar or rpm file available for your architecture. Within astromake this has certainly been used, but given the flux of change in miriad at this stage, it is not a recommended approach. The remainder of this page gives examples how to install two CVS based source distributions, and continues to discuss how to upgrade and maintain your MIRIAD distribution.

1-a: Install from a tar file

Currently the Miriad V4 tar file is CVS enabled, which makes it easy to upgrade, but does have the danger that at certain moments programs or subroutines exist that have not been well tested yet.

We are current in version 4.0.4 (see the file $MIR/VERSION)


step1: grab the tar file. There are a few one liners, depending on 
       which program you have installed on your machine:

    curl ftp://ftp.astro.umd.edu/progs/bima/miriad.tar.gz | tar zxf -

    wget -O - ftp://ftp.astro.umd.edu/progs/bima/miriad.tar.gz | tar zxf -


        but if none of these progams exist on your machine, use
        ftp, ncftpget or a web browser or anything.

step2: (optional)

    Since this process will have created a directory miriad_cvs,
    you may want to rename or relocate the directory to something/somewhere
    more appropriate.
    E.g. if you want different versions of miriad optimized for two
    observatory styles, you could have a separate CARMA and SMA style.

    However, since the names of the programs will in the end be all the
    same, you cannot have two version of miriad active in the same
    shell.

    Also optionally, but highly recommanded, it to now "cvs update" your
    source tree, just in case the tar file on the web was a bit old.
    So, to do this, do:

	cd miriad_cvs			(or whatever your renamed it)
	cvs update
 
    If it complains about not having a login, or a missing .cvspass file,
    do this

	cvs login

    and hit ENTER for a blank password for the anonymous user you are now.

step3: install the software. No need to change directories. Be aware of
    the modest number of keywords that be given (check the script
    for details)

	miriad_cvs/install/install.miriad telescope=carma
    


NOTE:  it is possible to have "multiple" versions of miriad running,
albeit never in the same shell. E.g. you could have a V3 and V4,
or a V4-carma and V4-sma all in parallel. The trick is to create them
in well named directories (e.g. see optional step2 above) and then
make sure you have the right aliases, e.g.

	alias miriad-sma   'source ~/miriad/sma/miriad_start.csh'
	alias miriad-carma 'source ~/miriad/carma/miriad_start.csh'
	alias miriad-wsrt  'source ~/miriad/wsrt/miriad_start.csh'


At UMD we generally use the "astromake" system to "astroload" different
versions of the same package, but of course never two in the same shell.
Although tar files may give you a level of comfort, it is highly recommended to use CVS to update your code regularly, or directly use cvs to create and update your source code. See CVS install notes

1-b: Install from CVS

Here's an example, in csh shell notation:
    setenv CVSROOT  :pserver:anonymous@cvs.astro.umd.edu:/home/cvsroot 
    cvs login
			(hit ENTER to enter an empty password)
    cvs -Q co miriad
    cd miriad
    (cd borrow; cvs -Q co wip; cvs -Q co rad)
    cd install
    install.miriad
The install.miriad command has a few optional parameters. Here's some common ones:
  telescope=carma                 [sma, wsrt, vla, fasr, gmrt, lofar, bima, atnf, ata]
  intel=0                         [1: use intel compiler (ifort/icc)]
  g95=0                           [1: use  g95 instead of g77]
  gfortran=0                      [1: use  gfortran instead of g77; needed for gcc4]
  debug=0                         [1: compile miriad in debug mode]
  shared=1                        [0: try to ignore making shared library for miriad]
  generic=0                       [1: use the configure generated compile.$MIRHOST file to compile]

2: Using Miriad

Once miriad has been installed, your shell will need to be changed a bit to know how to find the miriad programs. Depending on the C-shell or Bourne-shell flavors you issue the following command in the shell, or add it to your shell startup file (.cshrc or .bashrc):
    source ..../miriad/miriad_start.csh		<-- the C-shell flavors

    source ..../miriad/miriad_start.sh            <-- the Bourne-shell flavors
where you will have to substitute some path for ..... These startup scripts are created in the root directory of where miriad was installed.

Your shell is now ready to use miriad commands.

3: Updating MIRIAD

We are assuming you have a CVS enabled version of MIRIAD. The most conservative approach is to recompile all of miriad's libraries and binaries, for which there is a very simple command:
    mirupdate
But in most cases just a subroutine or program was updated and you can get away with much less work. You can issue a general CVS update, which you have to do as "mirboss":
    mirboss                             (make yourself the MIRIAD boss, assuming you have permission)
    (cd $MIR ; cvs update)              (update the $MIR tree in a sub-shell)
    mir.subs  fitsio mapper             (or any file from the $MIRSUBS directory)
    mir.prog  itemize uvgen             (or any file from the $MIRPROG/*/ directories)
If shared libraries are used, you don't have to rebuild binaries when just a subroutine was updated. This is the cases for linux. At the current version we don't use shared libraries for MacOSX, so a modified subroutine is best accompanied by rebuilding all programs:
    mir.install prog

4: Problems?

If your install failed, try one of the following links: