Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.mrao.cam.ac.uk/~bn204/alma/sweng/casacorebuild.html
Дата изменения: Mon Apr 4 13:47:51 2016
Дата индексирования: Sun Apr 10 09:51:53 2016
Кодировка: ISO8859-5
Building the casa-core libraries — Bojan Nikolic web pages (r. 329)

Building the casa-core librariesТЖ

Getting the source-codeТЖ

There are two public SVN repositories that host casa-core:

Unfortunately these two repositories are independent of each other, do not contain identical information, and there is significant loss of information when commits applied to one are moved to the other.

It is necessary to choose one of these to work with; at the time of writing casa is only compatible with the NRAO version of the casa-core therefore only that repository can be used.

Bzr branchТЖ

I have a bzr branch of the casa-core repository (sing the bzr-svn plugin), and I’ve made a branch off this branch with some small build improvements. People in Cambridge can get this branch at: appcd:~bnikolic/d/n/casa-core-nrao/build-improve .

If there is interest in this branch from outside of Cambridge please get in touch and I will be happy to put it somewhere public.

Building the dependenciesТЖ

Here are the commands to build some of the dependencies necessary for casa-core. I have been able to install the remainder of the dependecies using system-wide package managers for the systems I’ve been working on, but you may find you need to install some additional packages in this way too.

# Destination directory
export CCINSTALLDIR=/home/bnikolic/p/casa-main

#HDF5
wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.3.tar.gz
tar xzvf hdf5-1.8.3.tar.gz
cd hdf5-1.8.3
./configure --enable-cxx --prefix=$CCINSTALLDIR
make && make install && cd ..

#WCSlib
wget ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib.tar.bz2
tar xjvf wcslib.tar.bz2
cd wcslib-4.4.4
./configure --prefix=$CCINSTALLDIR
make && make install && cd ..

Note the philosophy here is to install all the dependencies and then casa-core itself into a single directory tree rooted at CCINSTALLDIR. This makes it significantly easier to specify the linker search paths and similar but it does make it hard to mix-and-match different versions of dependency packages.

FFTW3ТЖ

I did not need to build FFTW3 since system-wide libraries were appropriate, but if you do need to do so, the following lines should do the trick:

# Destination directory
export CCINSTALLDIR=/home/bnikolic/p/casa-main


# FFTW3
#
# Note that you need build both the single-precision and
# double-precision versions (that is why there are two invocations
# below), and they all should have the multi-threaded facility.
wget http://www.fftw.org/fftw-3.2.2.tar.gz
tar xzvf fftw-3.2.2.tar.gz
cd fftw-3.2.2
./configure --prefix=$CCINSTALLDIR  --enable-single --enable-shared --enable-threads --with-gcc-arch=core2 --enable-sse2
make && make install
./configure --prefix=$CCINSTALLDIR   --enable-shared --enable-threads --with-gcc-arch=core2 --enable-sse2
make && make install

There are several thing to note:

  • You should build the multi-threaded version (it allows the FFT computation to be distributed across multiple processors)
  • Both single and double precision versions are required for casa-core
  • On my laptop FFTW3 was not able to correctly automatically determine the system processor architecture system in the configuration step which probably leads to sub-optimal performance. The -march flag corrects this problem

Building casa-core itselfТЖ

The main body of casa-core itself can be built very easily using following commands:

# Destination directory
export CCINSTALLDIR=/home/bnikolic/p/casa-main

./batchbuild.py  install hdf5root=$CCINSTALLDIR wcsroot=$CCINSTALLDIR prefix=$CCINSTALLDIR