Installing Developer CASA
From CARMA
Contents |
User install
Installing CASA from a users point of view is trivial. Install the correct binary tar ball, add the correct bin/ directory to your $PATH, and type casapy. At UMD we use astromake, so a command like astroload casa will probably do the job. However, the current user release does not (currently) enable you to develop applications. For this a developer release must be installed, from source. This remains a challenging operation and you need to talk to somebody who has done this recently.
Developer install (new style)
The new-style installation uses cmake, followed by make, replacing the autoconf based scripts. I have finally had luck on my own Ubuntu 10.10 system getting this to compile and develop the carmafiller. It will remain a running target, as the CASA build system changes frequently. The most recent change, supporting the gcc 4.4.1 compiler, was being put on hold (Aug 2011).
Installation notes, and lots of info, are now gathered on CasaIndex. In the example below we're going to assume all packages are installed, either via my native Ubuntu, or via some patches, explained in the examples below
First we create a developer tree, but note that /opt/casa is going to be the install tree
set prefix=/opt/casa cd ~/CASA svn co https://svn.cv.nrao.edu/svn/casa/active/casacore core svn co https://svn.cv.nrao.edu/svn/casa/active/code code svn co https://svn.cv.nrao.edu/svn/casa/active/asap asap (i actually skipped this since it's gone now) svn co https://svn.cv.nrao.edu/svn/casa/active/aatm aatm ccmtools rpfits wcslib mkdir builds/{core,code}
The install tree still needs user data
cd /opt/casa svn co https://svn.cv.nrao.edu/svn/casa-data/distro data
Developer install (old style)
I call this old style, as it is mostly configure/make based, and some of it uses scons. I don't use it anymore (as of August 2011) as the developers have switched everything to cmake (see above)
As of this writing (Feb 2009) the original CASA is being split into a casacore and non-code (code) trees, and I will only describe that new setup.
There are a number of packages that casacore (and in particular casa) needs in order to compile. Since some of them collide or are not recent enough with what you have on your linux distro, it is best to install them in a separate /opt/casa/{bin,lib,include} type of tree. Most open source packages will then be installed as follows:
./configure --prefix=/opt/casa make make install
or for python plugins (using casa's version of python) the typical command will be
python setup.py install
some Java based tools (e.g. ccmtools) are a little different.
Here are some old links to help on installing casa/casacore (probably better to use the new CasaIndex):
- CASAInstallFromSource (now on CasaIndex)
- ObtainingCasaLinux - should have dependancies
- CASACoreBuildNotes
- CASACoreMigration (now on CasaIndex)
- CASA_changelogs
Some packages you will have to get via the CASA repository. Here are some examples:
http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz https://svn.cv.nrao.edu/casa/devel/ipython-0.9.1.bzr.r1152.tar.gz https://svn.cv.nrao.edu/casa/devel/modified-ant-contrib.tar.gz
Dependencies
This is a bit of a can of worms for me still. Either you set aside a /opt/casa type tree.... or yum your system. More to come.
casacore
The code is under SVN control. There are two versions, and two ways to install. First pick the code, depending if you want the stable version:
svn co https://svn.cv.nrao.edu/svn/casa/v2/stable/casacore
or the active version:
svn co https://svn.cv.nrao.edu/svn/casa/casacore/alma-evla/
Method-1 uses a GNUMakefile approach, recently developed by Darrell.
- edit GNUmakefile and set DESTDIR to the place you want the libraries & includes to end up (defaults to ./build/). The only oddity to make sure is if -I/usr/include/cfitsio is a correct directory for the CFITSIO package.
- run gmake setup (this step can now be skipped as of about revision 7300 give or take)
- run gmake
this last process will take a while. Took 45 mins. on my 2GB 2GHz Core2Duo laptop. Important note: if you update your code tree (typically: svn update) you'll need to go through these 3 steps again.
Method-2 uses a python based tool called scons. This is the original version, developed by Malte/Ger.
Typical dependencies:
- lapack
- blas
- cfitsio
casacore (google)
There is also a casacore being hosted via Google Code. This code should be mostly up to date with the SVN repo hosted by NRAO. From time to time there are some differences, so be aware. We are not using the google repo.
You can grab a read-only version of this version of casacore as follows:
svn checkout http://casacore.googlecode.com/svn/trunk/ casacore-google
casa (non-core or code)
Same deal, SVN, and two versions to download. Pick the stable version:
svn co https://svn.cv.nrao.edu/svn/casa/v2/stable/code
or active version:
svn co https://svn.cv.nrao.edu/svn/casa/v2/active/code/
Then follow the usual instructions:
cd code install/configure
where you have to answer some questions and edit some files (aipsrc and makedefs) to tailor for your system.
You can do some tests to see if this was properly set up. Some examples on the CASAInstallFromSource wiki page are still referring to the old pre-casacore times and are thus not working.
Eventually the big install is as follows:
gmake allsys
Usually you will then find out what's all missing from your distribution. Here are some of my Fedora 9 casa install notes.
