Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • le.koch/cbmroot
  • patrick.pfistner_AT_kit.edu/cbmroot
  • lena.rossel_AT_stud.uni-frankfurt.de/cbmroot
  • i.deppner/cbmroot
  • fweig/cbmroot
  • karpushkin_AT_inr.ru/cbmroot
  • v.akishina/cbmroot
  • rishat.sultanov_AT_cern.ch/cbmroot
  • l_fabe01_AT_uni-muenster.de/cbmroot
  • pwg-c2f/cbmroot
  • j.decuveland/cbmroot
  • a.toia/cbmroot
  • i.vassiliev/cbmroot
  • n.herrmann/cbmroot
  • o.lubynets/cbmroot
  • se.gorbunov/cbmroot
  • cornelius.riesen_AT_physik.uni-giessen.de/cbmroot
  • zhangqn17_AT_mails.tsinghua.edu.cn/cbmroot
  • bartosz.sobol/cbmroot
  • ajit.kumar/cbmroot
  • computing/cbmroot
  • a.agarwal_AT_vecc.gov.in/cbmroot
  • osingh/cbmroot
  • wielanek_AT_if.pw.edu.pl/cbmroot
  • malgorzata.karabowicz.stud_AT_pw.edu.pl/cbmroot
  • m.shiroya/cbmroot
  • s.roy/cbmroot
  • p.-a.loizeau/cbmroot
  • a.weber/cbmroot
  • ma.beyer/cbmroot
  • d.klein/cbmroot
  • d.smith/cbmroot
  • mvdsoft/cbmroot
  • d.spicker/cbmroot
  • y.h.leung/cbmroot
  • m.deveaux/cbmroot
  • mkunold/cbmroot
  • h.darwish/cbmroot
  • f_fido01_AT_uni-muenster.de/cbmroot
  • g.kozlov/cbmroot
  • d.emschermann/cbmroot
  • evgeny.lavrik/cbmroot
  • v.friese/cbmroot
  • f.uhlig/cbmroot
  • ebechtel_AT_ikf.uni-frankfurt.de/cbmroot
  • a.senger/cbmroot
  • praisig/cbmroot
  • s.lebedev/cbmroot
  • redelbach_AT_compeng.uni-frankfurt.de/cbmroot
  • p.subramani/cbmroot
  • a_meye37_AT_uni-muenster.de/cbmroot
  • om/cbmroot
  • o.golosov/cbmroot
  • l.chlad/cbmroot
  • a.bercuci/cbmroot
  • d.ramirez/cbmroot
  • v.singhal/cbmroot
  • h.schiller/cbmroot
  • apuntke/cbmroot
  • f.zorn/cbmroot
  • rubio_AT_physi.uni-heidelberg.de/cbmroot
  • p.chudoba/cbmroot
  • apuntke/mcbmroot
  • r.karabowicz/cbmroot
64 results
Show changes
Commits on Source (3267)
Showing with 1986 additions and 734 deletions
ARG TAG=12-fair202211.4-rocm5.4
ARG REGISTRY=hub.cbm.gsi.de/computing/images/online
FROM ${REGISTRY}/dev:${TAG} as build
ARG SOURCE_DIR=/opt/cbm/src
WORKDIR ${SOURCE_DIR}
# Kaniko doesn't support RUN --mount, so we have to copy the source code instead
COPY . .
RUN .ci/online/scripts/install.sh
FROM ${REGISTRY}/runtime:${TAG}
ARG CBMROOT_PATH=/opt/cbm/cbmroot
ARG FAIRSOFT_PATH=/opt/cbm/fairsoft
COPY --from=build ${CBMROOT_PATH}/bin ${CBMROOT_PATH}/bin
COPY --from=build ${CBMROOT_PATH}/lib/*.so ${CBMROOT_PATH}/lib/
# FIXME HACK FOR DC OCT 23
COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so.6.26 ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so.6.26.10 ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so.6.26 ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so.6.26.10 ${FAIRSOFT_PATH}/lib/.
ENV LD_LIBRARY_PATH=${CBMROOT_PATH}/lib:${FAIRSOFT_PATH}/lib:/opt/rocm/lib:${LD_LIBRARY_PATH}
ENV PATH=${CBMROOT_PATH}/bin:${PATH}
CMD ["cbmreco"]
FROM gcr.io/kaniko-project/executor:v1.16.0-debug
ARG USERNAME="username"
ARG PASSWORD="your_password"
ARG REGISTRY="hub.cbm.gsi.de"
ARG IMAGE="${REGISTRY}/computing/cbmroot/cbm_online"
ARG TAG="${USER}-debug"
RUN mkdir -p /kaniko/.docker
RUN echo "{\"auths\":{\"${REGISTRY}\":{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}}}" > /kaniko/.docker/config.json
# TODO: Mount CbmRoot source instead of copying it into the container (-> same with authentification...)
COPY . /workspace
ENV IMAGE=${IMAGE}
ENV TAG=${TAG}
ENTRYPOINT ["/bin/sh" , "-xc", "/kaniko/executor --context dir:///workspace --dockerfile /workspace/algo/containers/cbm_online/Dockerfile --destination $IMAGE:$TAG"]
#!/bin/bash
set -e
user="$1"
password="$2"
script=$(readlink -f "$0")
function check_arg() {
if [ -z "$1" ]; then
echo "Error: No $2 specified."
echo "Usage: $script <user> <password>"
exit 1
fi
}
check_arg "$user" "user"
check_arg "$password" "password"
# Set tag as optional third argument
if [ -z "$3" ]; then
tag="$user-debug"
else
tag="$3"
fi
# This script must be run from the CbmRoot top level directory.
# Check for .git, .clang-format, and .gitlab-ci.yml
if [ ! -d .git ] || [ ! -f .clang-format ] || [ ! -f .gitlab-ci.yml ]; then
echo "Error: This script must be run from the CbmRoot top level directory."
exit 1
fi
registry="hub.cbm.gsi.de/computing/cbmroot"
image="cbm_online"
build_args=" \
--build-arg="USERNAME=$user" \
--build-arg="PASSWORD=$password" \
--build-arg="TAG=$tag" \
"
dockerfile="algo/containers/cbm_online/DockerfileBuild"
docker build --progress plain $build_args -f $dockerfile -t cbm_online_builder .
#!/bin/bash
set -e
srcdir=cbmroot
build_type=RelWithDebInfo
install_prefix=/opt/cbm/cbmroot
fairsoft_path=/opt/cbm/fairsoft
enable_hip=ON
rocm_root=/opt/rocm
hip_archs="gfx906;gfx908" # MI50;MI100
n_jobs=16
cmake_args="-DCMAKE_INSTALL_PREFIX=$install_prefix \
-DCMAKE_BUILD_TYPE=$build_type \
-DSIMPATH=$fairsoft_path \
-DXPU_ENABLE_HIP=$enable_hip \
-DXPU_ROCM_ROOT=$rocm_root \
-DXPU_HIP_ARCH=$hip_archs \
"
ln -s ../cmake algo/cmake
cmake -S algo -B build $cmake_args
cmake --build build -j$n_jobs --target install
#! /bin/bash
set -e
IMAGE=hub.cbm.gsi.de/fweig/containers/cbm_online:online-container
DOCKER_FLAGS=" \
--rm \
-it \
--mount type=bind,source=$HOME/cbm/params,target=/opt/cbm/params \
--mount type=bind,source=/home/cbmdata/mcbm22/2391,target=/opt/cbm/data \
"
CMD="cbmreco"
CMD_FLAGS=" \
-p /opt/cbm/params \
-i /opt/cbm/data/2391_node8_1_0000.tsa \
-n 1 \
--omp 1 \
"
docker run $DOCKER_FLAGS $IMAGE $CMD $CMD_FLAGS
# docker run $DOCKER_FLAGS $IMAGE ls -l /opt/cbm/data
#! /bin/bash
set -e
IMAGE=hub.cbm.gsi.de/fweig/containers/cbm_online:online-container
DOCKER_FLAGS=" \
--rm \
-it \
--mount type=bind,source=$HOME/cbm/params,target=/opt/cbm/params \
--mount type=bind,source=/home/cbmdata/mcbm22/2391,target=/opt/cbm/data \
--device=/dev/kfd \
--device=/dev/dri \
--security-opt seccomp=unconfined \
--group-add video
"
CMD="cbmreco"
CMD_FLAGS=" \
-p /opt/cbm/params \
-i /opt/cbm/data/2391_node8_1_0000.tsa \
-n 1 \
--omp 1\
-l info \
-d hip1 \
"
# CMD=xpuinfo
# CMD_FLAGS=
docker run $DOCKER_FLAGS $IMAGE $CMD $CMD_FLAGS
# docker run $DOCKER_FLAGS $IMAGE ls -l /opt/cbm/data
---
AccessModifierOffset: -2
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
......@@ -14,11 +14,11 @@ AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
......@@ -78,18 +78,28 @@ IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^("|<)Cbm'
Priority: 1
- Regex: '^("|<).*/Cbm'
Priority: 1
- Regex: '".*"'
Priority: 1
- Regex: '^("|<).*slice'
Priority: 2
- Regex: '^("|<)Monitor.hpp'
Priority: 2
- Regex: '^("|<)System.hpp'
Priority: 2
- Regex: '^("|<)Fair'
Priority: 3
- Regex: '^("|<)Logger.h'
Priority: 3
- Regex: '^("|<)T'
- Regex: '^("|<)T.*\.h'
Priority: 4
- Regex: '^("|<)Rt'
- Regex: '^("|<)Rt.*\.h'
Priority: 4
- Regex: '^("|<)boost'
Priority: 5
- Regex: '^<.*[^\.]h>'
Priority: 6
- Regex: '^<.*[^\.h]>'
Priority: 6
- Regex: '^<.*>'
......@@ -124,7 +134,7 @@ SpaceAfterCStyleCast: true
#SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
......@@ -140,6 +150,9 @@ SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
WhitespaceSensitiveMacros: ['CBM_ENUM_DICT', 'CBM_YAML_PROPERTIES']
StatementMacros: ['CBM_PARALLEL_FOR']
Standard: c++11
TabWidth: 8
......
Checks: '-*,modernize-deprecated-headers'
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: modernize-deprecated-headers.CheckHeaderFile
value: 'true'
...
.git
.vscode
/geometry
/input
/parameters
/build
/algo/external
# exclude top level directories
# which are taken from other git repositories
# The / at the beginning is important, otherwise all directories
# containing the string are ignored
# containing the string are ignored
/geometry
/input
/parameters
/qa_data
/build
/algo/external
# Comment some single files
Dart*.cfg
# gdb Crash dumps
**/core_dump_*
# Git rebase backoup files
**/*.orig
# IDEs
.vscode
This diff is collapsed.
This diff is collapsed.
# Ending a path in a `/` will specify the code owners for every file
# nested in that directory, on any level
/ @f.uhlig @v.friese @p.-a.loizeau
/cmake/ @f.uhlig
/external/ @f.uhlig
/scripts/ @f.uhlig @p.-a.loizeau
# Cleanup and proper separation needed
/MQ/ @f.uhlig @p.-a.loizeau
/fles/ @f.uhlig @p.-a.loizeau
/macro/ @f.uhlig @p.-a.loizeau
/macro/C2F/ @a.andronic @k.piasecki
/macro/analysis/ @a.andronic @k.piasecki
/macro/KF/ @se.gorbunov
# Core
/core/ @f.uhlig @v.friese @p.-a.loizeau
/core/qa/ @se.gorbunov @s.zharko
/core/data/test/ @f.uhlig
/core/data/raw/ @p.-a.loizeau
/core/base/utils/ @f.uhlig
/core/base/report/ @f.uhlig
/core/base/draw/ @f.uhlig
# Algo
/algo/ @d.smith @fweig
# Simulation
/sim/ @f.uhlig @v.friese @p.-a.loizeau
#/sim/transport/geosetup/ @e.lavrik
# Reco
/reco/ @f.uhlig @v.friese @p.-a.loizeau
/reco/littrack/ @se.gorbunov
/reco/L1/ @se.gorbunov @s.zharko
/reco/eventbuilder/ @d.smith
/reco/KF/ @se.gorbunov @s.zharko
# Analysis
/analysis/ @a.andronic @k.piasecki
/analysis/PWGC2F/femtoscopy/ @wielanek_AT_if.pw.edu.pl
/analysis/common/ @a.andronic @k.piasecki
/analysis/PWGHAD/ @a.andronic @k.piasecki
/analysis/PWGCHA/ @a.andronic @k.piasecki
/analysis/PWGDIL/ @a.andronic @k.piasecki
/analysis/PWGDIL/dielectron/pi0eta/ @c.pauly
/analysis/PWGDIL/dielectron/papaframework/ @a_meye37_AT_uni-muenster.de
/analysis/PWGDIL/dielectron/lmvm/ @a.andronic @k.piasecki
/analysis/PWGDIL/dielectron/conversion/ @c.pauly
/analysis/PWGDIL/dimuon/ @a.andronic @k.piasecki
## Detectors
# TRD
/core/data/trd/ @a.bercuci @p.kaehler
/core/data/test/trd/ @a.bercuci @p.kaehler
/core/detectors/trd/ @a.bercuci @p.kaehler
/macro/trd/ @a.bercuci @p.kaehler
/sim/detectors/trd/ @a.bercuci @p.kaehler
/reco/detectors/trd/ @a.bercuci @p.kaehler
/algo/detectors/trd/ @a.bercuci @p.kaehler
# PSD
/analysis/detectors/psd/ @v.friese
/core/data/psd/ @v.friese
/core/data/test/psd/ @v.friese
/core/detectors/psd/ @v.friese
/macro/psd/ @v.friese
/sim/detectors/psd/ @v.friese
/reco/detectors/psd/ @v.friese
# FSD
/analysis/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/core/data/fsd/ @dvorar10_AT_fjfi.cvut.cz
/core/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/sim/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/reco/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
# MUCH
/core/data/much/ @v.singhal
/core/data/test/much/ @v.singhal
/core/detectors/much/ @v.singhal
/macro/much/ @v.singhal
/sim/detectors/much/ @v.singhal
/reco/detectors/much/ @v.singhal
/algo/detectors/much/ @v.singhal
/macro/analysis/much/ @v.singhal
# TOF
/analysis/detectors/tof/ @n.herrmann @i.deppner
/core/data/tof/ @n.herrmann @i.deppner
/core/data/test/tof/ @n.herrmann @i.deppner
/core/detectors/tof/ @n.herrmann @i.deppner
/fles/star2019/ @n.herrmann @i.deppner
/macro/tof/ @n.herrmann @i.deppner
/sim/detectors/tof/ @n.herrmann @i.deppner
/reco/detectors/tof/ @n.herrmann @i.deppner
/MQ/eTOF/ @n.herrmann @i.deppner
/MQ/hitbuilder/ @n.herrmann @i.deppner
/algo/detectors/tof/ @n.herrmann @i.deppner
# RICH
/core/data/rich/ @ma.beyer
/core/data/test/rich/ @ma.beyer
/core/detectors/rich/ @ma.beyer
/macro/rich/ @ma.beyer
/sim/detectors/rich/ @ma.beyer
/reco/detectors/rich/ @ma.beyer
/algo/detectors/rich/ @ma.beyer
# STS
/analysis/detectors/sts/ @v.friese
/core/data/sts/ @v.friese
/core/data/test/sts/ @v.friese
/core/detectors/sts/ @v.friese
/macro/sts/ @v.friese
/sim/detectors/sts/ @v.friese
/reco/detectors/sts/ @v.friese
/MQ/sts/ @v.friese
/algo/detectors/sts/ @v.friese
/algo/data/sts/ @v.friese
# MVD
/reco/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/core/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/core/data/mvd/ @c.muentz @m.deveaux @j.stroth
/analysis/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/macro/mvd/ @c.muentz @m.deveaux @j.stroth
/sim/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
......@@ -3,8 +3,13 @@
message(" -- Read CTestCustom.cmake --")
# Maximum size of uploaded test output of failed tests is 100kB
# or 10MB in case of weekly tests
# Larger output is cutted
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "102400")
if(${CBM_TEST_MODEL} MATCHES Weekly)
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "10240000")
else()
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "102400")
endif()
# Maximum size of uploaded test output of passed tests is 1kB
# Larger output is cutted
......@@ -42,8 +47,8 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
# -- warnings from our external packages
"external/flib_dpb"
# "external/flib_dpb_20"
"external/ipc"
"maybe_unused"
"include/AnalysisTree"
# -- remove intended fall through warnings
......@@ -54,6 +59,15 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
"CbmDeviceUnpackTofMcbm2018.cxx.*warning: attributes at the beginning of statement are ignored"
"CbmDeviceUnpackTofMcbm2018.cxx.*warning: this statement may fall through"
"CbmDeviceUnpackTofMcbm2018.cxx.*note: here"
"CbmMcbm2018TofPar.cxx.*warning: attributes at the beginning of statement are ignored"
"CbmMcbm2018TofPar.cxx.*warning: this statement may fall through"
"CbmMcbm2018TofPar.cxx.*note: here"
# -- warnings from a feature we want and which is okay
"CbmCheckEvents.cxx:86:52"
# -- warnings about to long function for debugging
"variable tracking size limit exceeded"
# -- warnings from structures for HADAQ memory casting
"struct hadaq::HadTu"
......@@ -64,8 +78,10 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
# -- warnings from structures for MBS/LMD memory casting
"struct mbs::Header"
# -- warnings from my test machine demac006
"warning: text-based stub file"
# -- warnings from macosx test machines
"ld: warning: dylib.*was built for newer macOS version.*than being linked"
".*\\^.*"
"warning.*generated."
# -- don't show pragma message warnings
"Compiling CBM Configuration"
......
# Check if cmake has the required version
# Since flesnet requires 3.14.0 we should be consistent while we
# build it in the CbmRoot context
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
cmake_policy(VERSION 3.14...3.23)
Set(CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR})
Set(CTEST_BINARY_DIRECTORY $ENV{BUILDDIR})
Set(CTEST_SITE $ENV{SITE})
......@@ -5,6 +11,11 @@ Set(CTEST_BUILD_NAME $ENV{LABEL})
Set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
Set(CTEST_PROJECT_NAME "CBMROOT")
Set(EXTRA_FLAGS $ENV{EXTRA_FLAGS})
Set(INSTALL_PROJECT $ENV{INSTALL_PROJECT})
if(NOT CBM_TEST_MODEL)
set(CBM_TEST_MODEL NIGHTLY)
endif()
include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
Ctest_Read_Custom_Files("${CTEST_SOURCE_DIRECTORY}")
......@@ -17,31 +28,37 @@ Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -i -k -j$ENV{number_of_processors}")
# Extract the FairRoot version from fairroot-config
# The version info is of the form Major.Minor.Patch e.g. 15.11.1 and
# is stored in the variable FairRoot_VERSION
Set(CMAKE_MODULE_PATH "${CTEST_SOURCE_DIRECTORY}/cmake/modules" ${CMAKE_MODULE_PATH})
Include(CbmMacros)
FairRootVersion()
If(${FairRoot_VERSION} VERSION_LESS 16.0.0)
Set(CTEST_USE_LAUNCHERS 0)
Else()
Set(CTEST_USE_LAUNCHERS 1)
EndIf()
If($ENV{ctest_model} MATCHES Weekly)
Set(_Model PROFILE)
ElseIf($ENV{ctest_model} MATCHES MergeRequest)
Set(_Model CONTINUOUS)
#Set(CMAKE_MODULE_PATH "${CTEST_SOURCE_DIRECTORY}/cmake/modules" ${CMAKE_MODULE_PATH})
#set(FAIRROOTPATH $ENV{FAIRROOTPATH})
#Include(CbmMacros)
#FairRootVersion()
message("Compiling with $ENV{number_of_processors} jobs in parallel.")
message("Testing with $ENV{number_of_processors_for_test} jobs in parallel.")
Set(CTEST_USE_LAUNCHERS 1)
If(${CBM_TEST_MODEL} MATCHES MergeRequest OR ${CBM_TEST_MODEL} MATCHES Continuous)
Set(_BuildType NIGHTLY)
Set(_CMakeModel Continuous)
elseIf(${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
Set(_BuildType PROFILE)
Set(_CMakeModel Nightly)
Else()
String(TOUPPER $ENV{ctest_model} _Model)
String(TOUPPER ${CBM_TEST_MODEL} _BuildType)
set(_CMakeModel ${CBM_TEST_MODEL})
EndIf()
If(EXTRA_FLAGS)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCMAKE_BUILD_TYPE=${_Model}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
If(EXTRA_FLAGS AND INSTALL_PROJECT)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"-DCMAKE_INSTALL_PREFIX=${CTEST_SOURCE_DIRECTORY}/install\" \"${CTEST_SOURCE_DIRECTORY}\" ")
ElseIf(EXTRA_FLAGS)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
Else()
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCMAKE_BUILD_TYPE=${_Model}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
EndIf()
If($ENV{ctest_model} MATCHES Nightly OR $ENV{ctest_model} MATCHES Weekly OR $ENV{ctest_model} MATCHES Profile)
#If(${CBM_TEST_MODEL} MATCHES Nightly OR ${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
If(NOT ${_BuildType} MATCHES EXPERIMENTAL)
Find_Program(GCOV_COMMAND gcov)
If(GCOV_COMMAND)
......@@ -49,139 +66,157 @@ If($ENV{ctest_model} MATCHES Nightly OR $ENV{ctest_model} MATCHES Weekly OR $ENV
Set(CTEST_COVERAGE_COMMAND ${GCOV_COMMAND})
EndIf(GCOV_COMMAND)
If(NOT $ENV{ctest_model} MATCHES Weekly)
Set(ENV{ctest_model} Nightly)
EndIf()
# get the information about conflicting or localy modified files
# from svn, extract the relavant information about the file name
# and put the result in the output variable
If(EXISTS ${CTEST_SOURCE_DIRECTORY}/.svn)
Execute_Process(COMMAND svn stat -u
COMMAND grep ^[CM]
COMMAND cut -c21-
OUTPUT_VARIABLE FILELIST
)
# create out of the output a cmake list. This step is done to convert the
# stream into seperated filenames.
# The trick is to exchange an "\n" by an ";" which is the separartor in
# a list created by cmake
String(REGEX REPLACE "\n" ";" _result "${FILELIST}")
ForEach(_file ${_result})
String(STRIP "${_file}" _file1)
Set(CTEST_NOTES_FILES ${CTEST_NOTES_FILES} "${CTEST_SOURCE_DIRECTORY}/${_file1}")
EndForEach(_file ${_result})
EndIf()
CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
EndIf()
If($ENV{ctest_model} MATCHES MergeRequest)
set(ENV{ctest_model} Continuous)
EndIf()
Ctest_Start($ENV{ctest_model})
Ctest_Start(${_CMakeModel})
If($ENV{ctest_model} MATCHES Continuous)
set(ENV{ctest_model} Nightly)
unset(repeat)
if(${_CMakeModel} MATCHES Continuous)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
set(repeat REPEAT UNTIL_PASS:2)
endif()
EndIf()
# The stop time should be a date compatible string without day nor timezone
# Examples:
# => CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%H:%M:%S"`
# => CTEST_END_TIME_LIMIT=`date -d "now +25minutes" +"%H:%M:%S"`
unset(stop_time)
If(DEFINED ENV{CTEST_END_TIME_LIMIT})
set(stop_time STOP_TIME "$ENV{CTEST_END_TIME_LIMIT}")
message(STATUS " End time for the ctest test runs set to ${stop_time}")
EndIf()
If(NOT $ENV{ctest_model} MATCHES Experimental)
If(NOT ${_BuildType} MATCHES EXPERIMENTAL)
Ctest_Update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
EndIf()
Ctest_Configure(BUILD "${CTEST_BINARY_DIRECTORY}"
RETURN_VALUE _RETVAL
)
If(NOT _RETVAL)
Ctest_Build(BUILD "${CTEST_BINARY_DIRECTORY}")
If($ENV{ctest_model} MATCHES Continuous)
If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
CTest_Submit(PARTS Update Configure Build)
Ctest_Build(BUILD "${CTEST_BINARY_DIRECTORY}"
NUMBER_ERRORS _NUM_ERROR
)
If(${_CMakeModel} MATCHES Continuous)
CTest_Submit(PARTS Update Configure Build
BUILD_ID cdash_build_id
)
if(${_NUM_ERROR} GREATER 0)
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
Message(STATUS "Build finished with ${_NUM_ERROR} errors")
message(FATAL_ERROR "Compilation failure")
endif()
EndIf()
If(DEFINED ENV{CI_TEST_STAGE_TOTAL_TIME_LIMIT})
# Compute test stage timeout based on current time + limit from environment variable
If(DEFINED ENV{CTEST_END_TIME_LIMIT})
# If also full DASH run timeout defined, also compare the two and keep the earliest one
execute_process (
COMMAND scripts/find_citests_ctest_stop_time.sh $ENV{CTEST_END_TIME_LIMIT}
OUTPUT_VARIABLE CI_TESTS_TOTAL_END_TIME_DATE
)
Else()
CTest_Submit(PARTS Update Configure Build
BUILD_ID cdash_build_id
)
# Else just get the CI jpb timeout
execute_process (
COMMAND scripts/find_citests_ctest_stop_time.sh
OUTPUT_VARIABLE CI_TESTS_TOTAL_END_TIME_DATE
)
EndIf()
set(stop_time STOP_TIME "${CI_TESTS_TOTAL_END_TIME_DATE}")
message(STATUS "Due to CI mode, Set end time for the ctest test runs to ${stop_time}")
EndIf()
Ctest_Test(BUILD "${CTEST_BINARY_DIRECTORY}"
PARALLEL_LEVEL $ENV{number_of_processors}
PARALLEL_LEVEL $ENV{number_of_processors_for_test}
${repeat}
${stop_time}
RETURN_VALUE _ctest_test_ret_val
)
If($ENV{ctest_model} MATCHES Continuous)
If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
CTest_Submit(PARTS Test)
Else()
CTest_Submit(PARTS Test
BUILD_ID cdash_build_id
)
EndIf()
If(${_CMakeModel} MATCHES Continuous)
CTest_Submit(PARTS Test
BUILD_ID cdash_build_id
)
EndIf()
If(GCOV_COMMAND)
Ctest_Coverage(BUILD "${CTEST_BINARY_DIRECTORY}")
If($ENV{ctest_model} MATCHES Continuous)
If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
CTest_Submit(PARTS Coverage)
Else()
CTest_Submit(PARTS Coverage
BUILD_ID cdash_build_id
)
EndIf()
If(${_CMakeModel} MATCHES Continuous)
CTest_Submit(PARTS Coverage
BUILD_ID cdash_build_id
)
EndIf()
EndIf()
Ctest_Upload(FILES ${CTEST_NOTES_FILES})
If(NOT $ENV{ctest_model} MATCHES Continuous)
If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
Ctest_Submit()
Else()
Ctest_Submit(BUILD_ID cdash_build_id)
EndIf()
If(NOT ${_CMakeModel} MATCHES Continuous)
Ctest_Submit(BUILD_ID cdash_build_id)
EndIf()
If(EXTRA_FLAGS MATCHES "CBM_TEST_INSTALL" AND NOT _ctest_test_ret_val)
# If(EXTRA_FLAGS MATCHES "INSTALL_PREFIX" AND EXTRA_FLAGS MATCHES "CBM_TEST_INSTALL" AND NOT _ctest_test_ret_val)
Message("Testing Installation")
execute_process(COMMAND ${BUILD_COMMAND} install -j$ENV{number_of_processors} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULTS_VARIABLE _install_ret_value
)
if (NOT _install_ret_value)
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E rm -R build MQ algo analysis core external fles mvd reco sim
WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
)
message("executing test suite in ${CTEST_BINARY_DIRECTORY}/install")
execute_process(COMMAND ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/execute_installation_test.sh ${CTEST_SOURCE_DIRECTORY}/install
RESULTS_VARIABLE _install_ret_value
)
endif()
Else()
# if installation isn't tested the return value should be 0
set(_install_ret_value false)
EndIf()
Message("_ctest_test_ret_val: ${_ctest_test_ret_val}")
Message("_install_ret_value: ${_install_ret_value}")
# Pipeline should fail also in case of failed tests
if (_ctest_test_ret_val)
If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
Else()
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
EndIf()
if (_ctest_test_ret_val OR _install_ret_value)
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
Message(FATAL_ERROR "Some tests failed.")
endif()
Else()
If(${CMAKE_VERSION} VERSION_LESS "3.14.0")
Ctest_Submit()
Else()
CTest_Submit(BUILD_ID cdash_build_id)
EndIf()
CTest_Submit(BUILD_ID cdash_build_id)
EndIf()
If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
Else()
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
EndIf()
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
#!/bin/bash
# Copyright (C) 2007 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
# SPDX-License-Identifier: GPL-3.0-only
# First commited by Florian Uhlig
function print_example(){
echo "##################################################################"
......@@ -61,7 +65,8 @@ else
fi
# set the ctest model to command line parameter
export ctest_model=$1
#export ctest_model=$1
ctest_model=$1
# test for architecture
arch=$(uname -s | tr '[A-Z]' '[a-z]')
......@@ -114,14 +119,22 @@ then
fi
fi
if [ -z $NCPU4TEST ]; then
export number_of_processors_for_test=$number_of_processors
else
export number_of_processors_for_test=$NCPU4TEST
fi
echo "************************"
date
echo "LABEL: " $LABEL
echo "SITE: " $SITE
echo "Model: " ${ctest_model}
echo "Nr. of processes: " $number_of_processors
echo "Nr. of processes for build: " $number_of_processors
echo "Nr. of processes for test: " $number_of_processors_for_test
echo "************************"
cd $SOURCEDIR
ctest -S $SOURCEDIR/CbmRoot_test.cmake -V --VV
ctest -S $SOURCEDIR/CbmRoot_test.cmake -V -DCBM_TEST_MODEL=${ctest_model}
#ctest -S $SOURCEDIR/CbmRoot_test.cmake -V --VV
This diff is collapsed.
If(FairSoft_VERSION VERSION_LESS 18.6.0)
Add_Definitions(-DHAVE_FAIRMQSTATEMACHINE)
EndIf()
Set(FAIRMQ_LIBS FairMQStateMachine FairMQ)
# RPATH information should be present for executables in the build as well
# as in the installation directory
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if(FairMQ_HAS_StateMachine)
Set(FAIRMQ_LIBS FairMQStateMachine FairMQ)
else()
Set(FAIRMQ_LIBS FairMQ)
EndIf()
add_subdirectory(base)
add_subdirectory(source)
......@@ -22,9 +31,5 @@ add_subdirectory(mcbm)
#add_subdirectory(sts)
#add_subdirectory(test)
# The following subdirectories contain files which do not compile with
# FairRoot v18
# Don't compile it for the time being
# TODO: Fix the compilation problems
add_subdirectory(parmq)
add_subdirectory(hitbuilder)
add_subdirectory(parmq)
add_subdirectory(hitbuilder)
set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/MQ/base
)
Set(SYSTEM_INCLUDE_DIRECTORIES
${SYSTEM_INCLUDE_DIRECTORIES}
${FAIRMQ_INCLUDE_DIR}
)
include_directories(${INCLUDE_DIRECTORIES})
include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})
set(LINK_DIRECTORIES
${FAIRMQ_LIBRARY_DIR}
)
link_directories(${LINK_DIRECTORIES})
set(FAIR_LIBS
FairMQ
)
If(FAIRLOGGER_FOUND)
set(FAIR_LIBS
${FAIR_LIBS}
FairLogger
)
EndIf()
${CMAKE_CURRENT_SOURCE_DIR}
)
set(SRCS
CbmMQChannels.cxx
)
)
set(LIBRARY_NAME CbmMQBase)
set(PUBLIC_DEPENDENCIES
FairMQ::FairMQ
)
Set(LIBRARY_NAME CbmMQBase)
Set(DEPENDENCIES
${FAIR_LIBS}
)
set(INTERFACE_DEPENDENCIES
ROOT::Net
)
GENERATE_LIBRARY()
generate_cbm_library()
/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Florian Uhlig [committer] */
#include "CbmMQChannels.h"
#include "FairMQDevice.h"
CbmMQChannels::CbmMQChannels(std::vector<std::string> allowedChannels)
: fAllowedChannels {allowedChannels} {
CbmMQChannels::CbmMQChannels(std::vector<std::string> allowedChannels) : fAllowedChannels {allowedChannels}
{
fChannelsToSend.resize(fAllowedChannels.size());
for (auto& entry : fChannelsToSend) {
entry.push_back("");
......@@ -10,32 +15,29 @@ CbmMQChannels::CbmMQChannels(std::vector<std::string> allowedChannels)
fComponentsToSend.resize(fAllowedChannels.size());
}
bool CbmMQChannels::IsChannelNameAllowed(std::string channelName) {
bool CbmMQChannels::IsChannelNameAllowed(std::string channelName)
{
for (auto const& entry : fAllowedChannels) {
std::size_t pos1 = channelName.find(entry);
if (pos1 != std::string::npos) {
const std::vector<std::string>::const_iterator pos =
std::find(fAllowedChannels.begin(), fAllowedChannels.end(), entry);
const std::vector<std::string>::size_type idx =
pos - fAllowedChannels.begin();
const std::vector<std::string>::size_type idx = pos - fAllowedChannels.begin();
LOG(info) << "Found " << entry << " in " << channelName;
LOG(info) << "Channel name " << channelName
<< " found in list of allowed channel names at position "
<< idx;
LOG(info) << "Channel name " << channelName << " found in list of allowed channel names at position " << idx;
fComponentsToSend[idx]++;
// The array is initialized with one empty string. If the string has still teh value from initialization
// exchnge the value by the new channel name. In any other case add one more entry to the vector
if (fChannelsToSend[idx].size() == 1
&& fChannelsToSend[idx].at(0).empty()) {
if (fChannelsToSend[idx].size() == 1 && fChannelsToSend[idx].at(0).empty()) {
fChannelsToSend[idx].at(0) = channelName;
} else {
}
else {
fChannelsToSend[idx].push_back(channelName);
}
return true;
}
}
LOG(info) << "Channel name " << channelName
<< " not found in list of allowed channel names.";
LOG(info) << "Channel name " << channelName << " not found in list of allowed channel names.";
LOG(info) << "The allowed channels are: ";
for (auto const& entry : fAllowedChannels) {
LOG(info) << entry;
......@@ -44,7 +46,8 @@ bool CbmMQChannels::IsChannelNameAllowed(std::string channelName) {
return false;
}
bool CbmMQChannels::CheckChannels(FairMQDevice* device) {
bool CbmMQChannels::CheckChannels(FairMQDevice* device)
{
// Get the information about created channels from the device
// Check if the defined channels from the topology (by name)
// are in the list of channels which are possible/allowed
......