Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
public:install_lofar_redhat5.8 [2013-10-10 09:55] – created Jose Sabater Montes | public:install_lofar_redhat5.8 [2013-10-10 13:27] – Jose Sabater Montes | ||
---|---|---|---|
Line 8: | Line 8: | ||
* Libraries available: HDF5 and old versions of boost and fftw3. | * Libraries available: HDF5 and old versions of boost and fftw3. | ||
- | After some tests we determined that we needed to isntall, at least, the followin | + | After some tests we determined that we needed to install, at least, the following |
* scons | * scons | ||
* WCS | * WCS | ||
Line 16: | Line 16: | ||
* Python | * Python | ||
* numpy | * numpy | ||
+ | * virtualenv (optional) | ||
+ | * h5py (optional) | ||
+ | * scipy | ||
+ | * matplotlib | ||
+ | * pandas (optional) | ||
+ | * pyfits | ||
+ | * pywcs | ||
+ | * astropy (optional) | ||
+ | * cython | ||
+ | * IPython (optional) | ||
* Boost | * Boost | ||
* LOFAR related: | * LOFAR related: | ||
Line 22: | Line 32: | ||
* casarest | * casarest | ||
* LOFAR (LofIm) | * LOFAR (LofIm) | ||
- | |||
===== Installation steps ===== | ===== Installation steps ===== | ||
- | The software was installed in the home of the use '' | + | The software was installed in the home of the user '' |
+ | |||
+ | We will install Python in ''/ | ||
Previous steps: | Previous steps: | ||
Line 51: | Line 62: | ||
# LOFAR related software | # LOFAR related software | ||
# casacore | # casacore | ||
- | #svn co http:// | + | svn co http:// |
- | cp -r / | + | |
- | rm -rf casacore-1.5.0/ | + | |
# pyrap | # pyrap | ||
- | #svn co http:// | + | svn co http:// |
- | cp -r / | + | |
# casarest | # casarest | ||
- | #svn co https:// | + | svn co https:// |
- | cp -r / | + | |
- | rm -rf casarest/ | + | |
</ | </ | ||
Line 77: | Line 83: | ||
</ | </ | ||
- | Install Python and their important | + | Install Python and some Python |
<code bash> | <code bash> | ||
# Compile | # Compile | ||
Line 131: | Line 137: | ||
</ | </ | ||
- | From now on we need to enter an interactive PBS job to avoid our jobs to be killed after certain amount of time (the maximum allowed | + | From now on we need to enter an interactive PBS job to avoid our jobs to be killed after certain amount of time (the maximum allowed |
< | < | ||
Line 143: | Line 149: | ||
export LD_LIBRARY_PATH=/ | export LD_LIBRARY_PATH=/ | ||
</ | </ | ||
+ | We needed to manually specify the paths to avoid cmake finding old or incorrect versions of the libraries. | ||
Compile the libraries and tools: | Compile the libraries and tools: | ||
Line 151: | Line 158: | ||
cd scons-2.3.0 | cd scons-2.3.0 | ||
python setup.py install --prefix=/ | python setup.py install --prefix=/ | ||
- | |||
## ATLAS + LAPACK + BLAS | ## ATLAS + LAPACK + BLAS | ||
Line 168: | Line 174: | ||
ln -s / | ln -s / | ||
/ | / | ||
- | |||
## WCS | ## WCS | ||
Line 177: | Line 182: | ||
make | make | ||
make install | make install | ||
- | |||
## FFTW3 | ## FFTW3 | ||
Line 192: | Line 196: | ||
make | make | ||
make install | make install | ||
- | |||
## Boost | ## Boost | ||
Line 203: | Line 206: | ||
./b2 install | ./b2 install | ||
</ | </ | ||
+ | |||
+ | Some notes: | ||
+ | * You should adapt the parameter " | ||
+ | * | ||
+ | |||
Compile casacore | Compile casacore | ||
Line 231: | Line 239: | ||
<code bash> | <code bash> | ||
## pyrap | ## pyrap | ||
+ | |||
+ | # pyrap looks for libblas | ||
+ | cd / | ||
+ | ln -s libcblas.a libblas.a | ||
+ | |||
cd / | cd / | ||
cd pyrap-1.1.0 | cd pyrap-1.1.0 | ||
- | ## PATCH pyrap ******* | + | ## PATCH pyrap ******* |
python batchbuild.py --boost-root=/ | python batchbuild.py --boost-root=/ | ||
--casacore-root=/ | --casacore-root=/ | ||
Line 269: | Line 282: | ||
#cp -r ~/LOFAR . | #cp -r ~/LOFAR . | ||
cd LOFAR | cd LOFAR | ||
- | ### PATCH LOFAR ******** | + | ### PATCH LOFAR ******** |
mkdir -p build/ | mkdir -p build/ | ||
mkdir / | mkdir / | ||
Line 306: | Line 319: | ||
* Configure .casarc | * Configure .casarc | ||
- | ==== Patches needed ==== | + | ==== Patches |
+ | |||
+ | Pyrap and LOFAR need to be patched to allow them to compile in this old system. | ||
+ | |||
+ | **Pyrap** tries to find the libraries in lib64 in a Red Hat linux. This happens even if the libraries are manually compiled and are located in a '' | ||
+ | Edit: | ||
+ | * pyrap_fitting/ | ||
+ | * pyrap_functionals/ | ||
+ | * pyrap_images/ | ||
+ | * pyrap_measures/ | ||
+ | * pyrap_quanta/ | ||
+ | * pyrap_tables/ | ||
+ | * pyrap_util/ | ||
+ | * libpyrap/ | ||
+ | |||
+ | **Pyrap** cannot determine the location of some shared libraries in this old system. //Ugly hack// - The file '' | ||
+ | After | ||
+ | <code Python> | ||
+ | conf = Configure(env) | ||
+ | </ | ||
+ | insert: | ||
+ | <code Python> | ||
+ | conf.env.Append(LINKFLAGS = [" | ||
+ | </ | ||
+ | |||
+ | **Pyrap** looks for libblas instead of libcblas. A symbolic link can be made: | ||
+ | <code bash> | ||
+ | cd / | ||
+ | ln -s libcblas.a libblas.a | ||
+ | </ | ||
+ | |||
+ | **LOFAR** uses the flag '' | ||
+ | * CEP/ | ||
+ | * CEP/ | ||
+ | * LCS/ | ||
+ | |||
+ | The version of cmake bundled in the system contains buggy versions of the recipes to find BLAS and LAPACK (FindBLAS.cmake and FIindLAPACK.cmake). Ii is possible to see in the CMakeCache.txt files that these libraries are not detected by CMAKE in this system (for example in the case of **casacore**). The manual setting of the cache variables // | ||
+ | |||
+ | //The ugliest hack// is this line in the cmake options of **LOFAR**: | ||
+ | < | ||
+ | -DCASA_CASA_LIBRARY=/ | ||
+ | </ | ||
+ | The library librfiengine.so is linked with dependencies to LAPACK (and this can present dependencies with BLAS). These dependencies are not linked in some of the remaining packages because they are not a direct dependency but the linker will fail. We overrided the cache variable pointing to one of the casacore libraries. Wherever librfiengine.so is linked, the libcasa_casa.so is linked as well. This ugly thing worked. | ||
- | pyrap and LOFAR need to be patched to allow them to compile in this old system. | + | ==== Warnings |
- | ===== Problems ===== | + | * Compile the libraries with the '' |
+ | * The tools '' | ||
+ | * Have a look to CMakeCache.txt before running cmake to spot possible problems with the libraries. | ||
+ | * If you use the ifort FORTRAN compiler you might find problems with the linking of ifort shared libraries. | ||
+ | * Cmake could find some of the casapy libraries and link them as dependencies. If you want to avoid that you should specify the cache variables by hand (as it is done in this example). | ||
+ | * To link to precompiled external libraries (like the ones provided by casapy or Anaconda) might be a bad idea. | ||
+ | * The option " | ||
+ | * Final advice: Try to work on modern systems (e. g. Ubuntu 12.04 LTS) if you can :). | ||
+ |