diff --git a/.gitattributes b/.gitattributes index 591870375b5927b2dd126585c2061c1d870106f6..7973ad9095c57a32f4c1f589857da324320154cf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4626,6 +4626,9 @@ SubSystems/Online_Cobalt/install/install_qpid.sh eol=lf SubSystems/Online_Cobalt/install/lofarsys/bash_profile -text SubSystems/Online_Cobalt/install/lofarsys/bashrc -text SubSystems/Online_Cobalt/install/postinstall.sh eol=lf +SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh eol=lf +SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh eol=lf +SubSystems/Online_Cobalt/install/postinstall_root.sh eol=lf SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokes_3sec_2st_3sb.output/Beam_0.float.raw -text SubSystems/Online_Cobalt/test/Beamformer/tComplexVoltages_3sec_2st_3sb.output/Beam_0.float.raw -text SubSystems/Online_Cobalt/test/Beamformer/tComplexVoltages_3sec_2st_3sb.output/Beam_1.float.raw -text diff --git a/CMake/FindLibXML++.cmake b/CMake/FindLibXML++.cmake deleted file mode 100644 index 716ff2da006148bca1ce76f47300b354ca28d428..0000000000000000000000000000000000000000 --- a/CMake/FindLibXML++.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# - Try to find libxml++-2.6: A library to parse XML DOM trees -# Variables used by this module: -# LIBXML_CPP_ROOT_DIR - QPID root directory -# Variables defined by this module: -# LIBXML_CPP_FOUND - system has LIBXML_CPP -# LIBXML_CPP_INCLUDE_DIR - the LIBXML_CPP include directory (cached) -# LIBXML_CPP_INCLUDE_DIRS - the LIBXML_CPP include directories -# (identical to LIBXML_CPP_INCLUDE_DIR) -# LIBXML_CPP_LIBRARY - the LIBXML_CPP library (cached) -# LIBXML_CPP_LIBRARIES - the LIBXML_CPP libraries -# (identical to LIBXML_CPP_LIBRARY) - -# Copyright (C) 2015 -# ASTRON (Netherlands Institute for Radio Astronomy) -# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands -# -# This file is part of the LOFAR software suite. -# The LOFAR software suite is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# The LOFAR software suite is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -# -# $Id$ - -if(NOT LIBXML_CPP_FOUND) - - find_path(LIBXML_CPP_INCLUDE_DIR libxml++/parsers/parser.h - HINTS ${LIBXML_CPP_ROOT_DIR} PATH_SUFFIXES include include/libxml++-2.6) - find_library(LIBXML_CPP_LIBRARY xml++-2.6 - HINTS ${LIBXML_CPP_ROOT_DIR} PATH_SUFFIXES lib) - - mark_as_advanced(LIBXML_CPP_INCLUDE_DIR LIBXML_CPP_LIBRARY) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBXML_CPP DEFAULT_MSG - LIBXML_CPP_LIBRARY LIBXML_CPP_INCLUDE_DIR) - - set(LIBXML_CPP_INCLUDE_DIRS ${LIBXML_CPP_INCLUDE_DIR}) - set(LIBXML_CPP_LIBRARIES ${LIBXML_CPP_LIBRARY}) - -endif(NOT LIBXML_CPP_FOUND) diff --git a/CMake/FindLibXMLxx.cmake b/CMake/FindLibXMLxx.cmake new file mode 100644 index 0000000000000000000000000000000000000000..ca3888b7f1077d3ea4ae2257ebb3a97b474e738f --- /dev/null +++ b/CMake/FindLibXMLxx.cmake @@ -0,0 +1,33 @@ +# - Try to find libxml++: A library to parse XML DOM trees +# Variables used by this module: +# ENV{PKG_CONFIG_PATH} - a colon-separated list of directories to search for .pc files +# Variables defined by this module: +# LIBXMLXX_FOUND - system has LIBXMLXX +# LIBXMLXX_INCLUDE_DIRS - the LIBXMLXX include directories +# LIBXMLXX_LIBRARIES - the LIBXMLXX libraries + +# Copyright (C) 2015 +# ASTRON (Netherlands Institute for Radio Astronomy) +# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +# +# This file is part of the LOFAR software suite. +# The LOFAR software suite is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The LOFAR software suite is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. +# +# $Id$ + +if(NOT LIBXMLXX_FOUND) + include(FindPkgConfig) + pkg_search_module(LIBXMLXX REQUIRED libxml++-2.8 libxml++-2.7 libxml++-2.6 libxml++-2.5) + mark_as_advanced(LIBXMLXX_INCLUDE_DIRS LIBXMLXX_LIBRARIES) +endif(NOT LIBXMLXX_FOUND) diff --git a/CMake/variants/variants.cbt001 b/CMake/variants/variants.cbt001 index f79a4cd2a4a46f82fc50a0dfb8ada617fe50aab8..dc5e782f112befdf4fda799bc4bfcf484e4fd6c3 100644 --- a/CMake/variants/variants.cbt001 +++ b/CMake/variants/variants.cbt001 @@ -10,11 +10,10 @@ option(USE_OPENMP "Use OpenMP" ON) option(USE_MPI "Use MPI" ON) option(USE_CUDA "Use CUDA" ON) -# Note: use of /opt/casacore is depricated -set(CASACORE_ROOT_DIR /localhome/lofar/casacore-1.7.0) +set(CASACORE_ROOT_DIR /opt/casacore) set(MPI_ROOT_DIR /opt/openmpi) -set(DAL_ROOT_DIR /localhome/lofar/DAL) -set(QPID_ROOT_DIR /localhome/lofar/qpid) +set(DAL_ROOT_DIR /opt/DAL) +set(QPID_ROOT_DIR /opt/qpid) #set(VALGRIND_ROOT_DIR /globalhome/lofarsystem/cobalt-root) #set(GNU_C /globalhome/amesfoort/cbtroot/bin/gcc-4.8) diff --git a/SubSystems/Online_Cobalt/install/install_DAL.sh b/SubSystems/Online_Cobalt/install/install_DAL.sh index 689f1df2782046eea821fdf65bf1cf8d085739d7..05d50d840a685ff658a14437f559ac15d4c857da 100755 --- a/SubSystems/Online_Cobalt/install/install_DAL.sh +++ b/SubSystems/Online_Cobalt/install/install_DAL.sh @@ -22,7 +22,7 @@ cd DAL echo " Configuring..." mkdir build cd build -cmake -DCMAKE_INSTALL_PREFIX=/localhome/lofar/DAL .. > cmake.log +cmake -DCMAKE_INSTALL_PREFIX=/opt/DAL .. > cmake.log echo " Building..." make -j 8 > make.log diff --git a/SubSystems/Online_Cobalt/install/install_casacore.sh b/SubSystems/Online_Cobalt/install/install_casacore.sh index a99f854b102b3bfd7aa7572b5116e7208a09e4a3..cda0f9c3e4592c6a3387441112b14ed474f64e1c 100755 --- a/SubSystems/Online_Cobalt/install/install_casacore.sh +++ b/SubSystems/Online_Cobalt/install/install_casacore.sh @@ -38,7 +38,7 @@ mkdir build cd build # Note that the -DDATA_DIR option does not fully override the measures tables search paths. # In fact, some of ., ./data, $HOME/aips++/data, $HOME/data, $HOME/casacore/data are still searched first. -cmake .. -DCMAKE_INSTALL_PREFIX=/localhome/lofar/$CASACOREVERSION \ +cmake .. -DCMAKE_INSTALL_PREFIX=/opt/$CASACOREVERSION \ -DUSE_HDF5=ON -DUSE_FFTW3=ON -DFFTW3_DISABLE_THREADS=OFF \ -DUSE_THREADS=ON -DUSE_OPENMP=ON \ -DDATA_DIR=/localhome/lofar/IERS/current/data > cmake.log @@ -52,6 +52,9 @@ make -j 8 install > make_install.log echo " Validating measures tables..." /localhome/lofar/$CASACOREVERSION/bin/findmeastable >/dev/null +echo " Creating softlink /opt/casacore..." +ln -sfT /opt/$CASACOREVERSION /opt/casacore + echo " Cleaning up..." popd >/dev/null rm -rf "$CASACOREDIR" diff --git a/SubSystems/Online_Cobalt/install/install_qpid.sh b/SubSystems/Online_Cobalt/install/install_qpid.sh index f77144ac0c639abd23fcaaf38c4c71e35fbf9084..cb26d03ce44d353ec08c7595333ce10be68d08b3 100755 --- a/SubSystems/Online_Cobalt/install/install_qpid.sh +++ b/SubSystems/Online_Cobalt/install/install_qpid.sh @@ -10,7 +10,8 @@ PROTON_SOURCE="http://svn.apache.org/repos/asf/qpid/proton/branches/0.8" QPID_SOURCE="http://svn.apache.org/repos/asf/qpid/branches/0.30/qpid/" -QPID_INSTALLDIR=/localhome/lofar/qpid +QPID_INSTALLDIR=/opt/qpid-0.30 +QPID_SYMLINK=/opt/qpid # ******************************************** # Install latest PROTON & QPID @@ -84,6 +85,9 @@ export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$QPID_INSTALLDIR/lib:$QPID_INSTALLDIR/l export PYTHONPATH=\$PYTHONPATH:$QPID_INSTALLDIR/lib/python/:$QPID_INSTALLDIR/lib/python$PYTHONVERSION/site-packages/ EOF +echo " Creating symlink $QPID_SYMLINK..." +ln -sfT $QPID_INSTALLDIR $QPID_SYMLINK + echo " Cleaning up..." popd >/dev/null rm -rf "$QPID_BUILDDIR" diff --git a/SubSystems/Online_Cobalt/install/postinstall.sh b/SubSystems/Online_Cobalt/install/postinstall.sh index f84f819ca187c5192751a64c6c35ce8c7999b052..8d8b46ebbfda4a92e052768ced09889e5ea79880 100755 --- a/SubSystems/Online_Cobalt/install/postinstall.sh +++ b/SubSystems/Online_Cobalt/install/postinstall.sh @@ -1,54 +1,14 @@ #!/bin/bash -eu -function postinstall_lofarsys { - # ******************************************** - # Populate ~/.ssh directory - # - # We draw a copy from /globalhome/lofarsystem - # to stay in sync with the rest of LOFAR. - # ******************************************** - echo "Configuring ssh..." - cp -a /globalhome/lofarsystem/.ssh ~ +sudo -n true >&/dev/null || error "Need to be root or have sudo rights active (run 'sudo true' first)." - echo " Testing..." - ssh localhost true >/dev/null +echo "[Postinstall as root]" +sudo -u root ./postinstall_root - # ******************************************** - # Install bash initialisation scripts - # ******************************************** - echo "Configuring bash..." - cp lofarsys/bashrc ~/.bashrc - cp lofarsys/bash_profile ~/.bash_profile +echo "[Postinstall as lofarbuild]" +sudo -u lofarbuild ./postinstall_lofarbuild - echo " Validating login..." - ssh localhost true - - # ******************************************** - # Create directories for LOFAR's - # temporary files - # ******************************************** - echo "Configuring /opt/lofar/var..." - mkdir -p ~/lofar/var/{log,run} -} - -function postinstall_lofarbuild { - ./install_IERS.sh - ./install_DAL.sh - ./install_casacore.sh - ./install_qpid.sh -} - -case "`whoami`" in - lofarsys) - postinstall_lofarsys - ;; - lofarbuild) - postinstall_lofarbuild - ;; - *) - error "Need to be either lofarsys or lofarbuild!" - ;; -esac - -echo "Done!" +echo "[Postinstall as lofarsys]" +sudo -u lofarsys ./postinstall_lofarsys +echo "[Done]" diff --git a/SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh b/SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh new file mode 100755 index 0000000000000000000000000000000000000000..68fbd30c8a199228284111b8e9ec58422ceee88a --- /dev/null +++ b/SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh @@ -0,0 +1,7 @@ +#!/bin/bash -eu + +./install_IERS.sh +./install_DAL.sh +./install_casacore.sh +./install_qpid.sh + diff --git a/SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh b/SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh new file mode 100755 index 0000000000000000000000000000000000000000..6231324df9ef1b2fdc7c6c4bb0487b957577aeaa --- /dev/null +++ b/SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh @@ -0,0 +1,30 @@ +#!/bin/bash -eu + +# ******************************************** +# Populate ~/.ssh directory +# +# We draw a copy from /globalhome/lofarsystem +# to stay in sync with the rest of LOFAR. +# ******************************************** +echo "Configuring ssh..." +cp -a /globalhome/lofarsystem/.ssh ~ + +echo " Testing..." +ssh localhost true >/dev/null + +# ******************************************** +# Install bash initialisation scripts +# ******************************************** +echo "Configuring bash..." +cp lofarsys/bashrc ~/.bashrc +cp lofarsys/bash_profile ~/.bash_profile + +echo " Validating login..." +ssh localhost true + +# ******************************************** +# Create directories for LOFAR's +# temporary files +# ******************************************** +echo "Configuring /opt/lofar/var..." +mkdir -p ~/lofar/var/{log,run} diff --git a/SubSystems/Online_Cobalt/install/postinstall_root.sh b/SubSystems/Online_Cobalt/install/postinstall_root.sh new file mode 100755 index 0000000000000000000000000000000000000000..cfa026bbe7e0368f73c08f36784ec5e881b9988c --- /dev/null +++ b/SubSystems/Online_Cobalt/install/postinstall_root.sh @@ -0,0 +1,7 @@ +#!/bin/bash -eu + +echo "Removing system-supplied /opt/casacore..." +rm -rf /opt/casacore + +echo "Giving /opt to lofarbuild..." +chown lofarbuild.lofarbuild /opt