Installation from source
Installation from Source
In a nutshell grab the (CVS enabled) source code, and run the install script. If that fails, you should consult the more detailed installation guidelines.
Step 1: grab the source code
curl ftp://ftp.astro.umd.edu/progs/bima/miriad.tar.gz | tar zxf - or wget -O - ftp://ftp.astro.umd.edu/progs/bima/miriad.tar.gz | tar zxf -
Step 2: install using your own compiler
This shell script does have some optional arguments, but you should not need to supply any.
Step 3: Source the appropriate startup file, depending on your shell, and miriad should now be usable in your shell. You can also make this permanent by adding this to your ~/.cshrc or ~/.bashrc file.
For example, for a csh style shell
will add miriad to your current (csh) shell.
An example of hacking a routine where a user ran into a program that had some kind of obvious problem. In this example we assume the user has write permission in the $MIR tree.
% smauvspec .... # oh oh ... program crashes for probably simple reason ### Fatal Error: Buffer overflow(points), when accumulating plots % mirboss # become more powerful miriad boss (to make mods) % cd $MIRPROG/sma # go to where the action is (yes, you'll have to know that) % cvs -nq update smauvspec.for # for sanity, check if there is no update % cvs update smauvspec.for # if there was, probably good idea to update % mir.prog smauvspec # sanity check: make sure it still compiles % edit smauvspec.for # make your changes in your favorite editor % mir.prog smauvspec # compile your version, it will be in $MIRBIN % cd- # go to where you were working.... % smauvspec vis=..... # check it out
If the user had no permission to write inside the $MIR tree, you could still work around this if your local friendly miriad hacker is not available:
% cp $MIRPROG/sma/smauvspec.* . # make a local copy of the two files you need % edit smauvspec.for # edit it % mirmake smauvspec # uses template makefile. The "debug" command ok as well % ./smauvspec vis=... # test your local version explicitly
The next time when you update miriad (e.g. cvs update, or the more rigorous mirupdate command) it will attempt to merge your modification with any possible modification that were made in the official miriad release. This merge usually works, and you should check this by recopiling that program manually. Or simply use the cvs diff command:
% cd $MIRPROG/sma # go to where the action is % cvs -nq update # watch if smauvspec.for or .h have any C's or U's % cvs diff smauvspec.for # difference yours with the CVS master version % cvs diff -Dnow smauvspec.for # difference if you saw a 'U' in the update test