Skip to content
Snippets Groups Projects
Commit e088464b authored by Bram Veenboer's avatar Bram Veenboer
Browse files

Merge branch 'update' into cobalt2.1-ci-cd-spackv2

parents 69aec471 594da695
Branches
No related tags found
1 merge request!5Combine new spack files + CI/CD branches
Pipeline #121234 failed
Pipeline: cobalt-installation

#121235

    ...@@ -46,19 +46,17 @@ module use /opt/spack/0.23.1/share/spack/modules/linux-debian12-zen2/gcc/12.2.0 ...@@ -46,19 +46,17 @@ module use /opt/spack/0.23.1/share/spack/modules/linux-debian12-zen2/gcc/12.2.0
    ## Building COBALT from source ## Building COBALT from source
    Now that all the prerequisites are met, the COBALT software can be installed as follows: Now that all the prerequisites are met, the COBALT software can be installed as follows:
    ```bash ```bash
    git clone https://git.astron.nl/lofar2.0/cobalt.git git clone https://git.astron.nl/cobalt/cobalt
    cd cobalt # optional: cd cobalt && git checkout <branch> && cd ..
    source ../configure.sh source infra/activate_cobalt.sh
    make -C gnucxx11_opt/ -j cmake -S cobalt -B build
    make -C cobalt -j
    ``` ```
    The `configure.sh` file loads all the environment modules that are required to build the COBALT software. It also applies the following workarounds: This will checkout the COBALT repository in the `cobalt` subdirectory, set up your environment and build the COBALT software in the `build` directory.
    1) The libraries of the host compiler (GCC 12) need to be added to the `LIBRARY_PATH`.
    ## Notes: futher patches needed to run tests ## Notes: futher patches needed to run tests
    The following patches are needed to get the COBALT tests and code to run on the COBALT cluster: To get the COBALT tests and code to run on the COBALT cluster, the casacore measures need to be installed:
    1) The path to libnvrtc-builtins.so (provided by Spack) needs to be added to LD_LIBRARY_PATH. Not doing so raises the error NVRTC_ERROR_BUILTIN_OPERATION_FAILURE.
    2) The casacore measures need to be installed:
    ```bash ```bash
    wget ftp://ftp.astron.nl:21/outgoing/Measures/WSRT_Measures.ztar wget ftp://ftp.astron.nl:21/outgoing/Measures/WSRT_Measures.ztar
    tar xfz WSRT_Measures.ztar tar xfz WSRT_Measures.ztar
    ...@@ -66,4 +64,10 @@ mkdir ~/measures ...@@ -66,4 +64,10 @@ mkdir ~/measures
    mv geodetic ephemerides ~/measures mv geodetic ephemerides ~/measures
    echo 'measures.directory: $HOME/measures' > ~/.casarc echo 'measures.directory: $HOME/measures' > ~/.casarc
    ``` ```
    3) make sure `ssh localhost` works without password
    Alternatively, use the system-wide casacore data:
    ```bash
    echo 'measures.directory: /data/cobalt/IERS' > ~/.casarc
    ```
    Also make sure that `ssh localhost` works without password.
    # Some of GCCs libraries are not found, add them to the library path
    export LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/
    # Load Spack environment modules
    module use /data/cobalt/spack/latest/share/spack/modules/linux-*/gcc/12.2.0
    module load binutils boost casacore cmake curl dal2 diffutils fftw hdf5 log4cplus numactl openblas openmpi py-lxml python unittest-cpp
    # tParset is broken, disable it
    #sed -i '/lofar_add_test(tParset/s/^/#/' CoInterface/test/CMakeLists.txt
    # Run CMake
    cmake -S. -B gnucxx11_opt
    ...@@ -9,14 +9,14 @@ spack: ...@@ -9,14 +9,14 @@ spack:
    - cuda@12.6 - cuda@12.6
    - curl - curl
    - dal2@master - dal2@master
    - fftw - fftw~mpi
    - gdb - gdb
    - hdf5@1.14.4-3 +cxx+hl+threadsafe~mpi - hdf5@1.14.4-3 +cxx+hl+threadsafe~mpi
    - log4cplus - log4cplus
    - ncurses - ncurses
    - numactl - numactl
    - openblas threads=pthreads - openblas threads=pthreads
    - openmpi fabrics=ofi,ucx - openmpi@5.0.5 fabrics=ofi,ucx ^ucx+dc+rc+rdmacm+verbs
    - py-kombu - py-kombu
    - py-lxml - py-lxml
    - python - python
    ......
    ...@@ -2,29 +2,34 @@ ...@@ -2,29 +2,34 @@
    # the modules needed by COBALT # the modules needed by COBALT
    ROOT_DIR=/data/cobalt ROOT_DIR=/data/cobalt
    SPACK_VERSION=latest SPACK_VERSION=0.23.1
    GCC_VERSION=12.2.0
    SPACK_DIR=${ROOT_DIR}/spack/spack/${SPACK_VERSION} SPACK_DIR=${ROOT_DIR}/spack/spack-${SPACK_VERSION}
    SPACK_REPO_DIR=${ROOT_DIR}/spack/repos
    MODULES=( MODULES=(
    binutils boost casacore cuda curl dal2 diffutils fftw hdf5 binutils boost casacore cuda curl dal2 diffutils fftw hdf5
    log4cplus numactl openblas openmpi postgresql pqxx py-lxml log4cplus numactl openblas openmpi py-lxml
    python unittest-cpp python unittest-cpp
    ) )
    # Load Spack environment # Load Spack environment
    source ${SPACK_DIR}/share/spack/setup-env.sh #source ${SPACK_DIR}/share/spack/setup-env.sh
    eval `${SPACK_DIR}/bin/spack env activate --sh lofar` #eval `${SPACK_DIR}/bin/spack env activate --sh lofar`
    # Enable repos & modules # Enable repos & modules
    source /etc/profile.d/modules.sh # load this explicitly for non-interactive shells source /etc/profile.d/modules.sh # load this explicitly for non-interactive shells
    module use ${SPACK_DIR}/opt/spack/linux-*/gcc/12.2.0
    # Load Spack environment modules
    module use ${SPACK_DIR}/opt/spack/linux-*/gcc/${GCC_VERSION}
    module load "${MODULES[@]}" module load "${MODULES[@]}"
    # Keep system libraries findable # Keep system libraries findable
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/targets/x86_64-linux/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/targets/x86_64-linux/lib
    # Some of GCCs libraries are not found, add them to the library path
    GCC_VERSION_MAJOR=$(gcc -dumpversion)
    export LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/gcc/x86_64-linux-gnu/$GCC_VERSION_MAJOR
    # Make OpenMPI config findable # Make OpenMPI config findable
    export OMPI_MCA_mca_base_param_files=${ROOT_DIR}/mca-params.conf export OMPI_MCA_mca_base_param_files=${ROOT_DIR}/mca-params.conf
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment