From 399861454f4794abb9e52f63b4492868088f9e3b Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 00:49:43 +0100 Subject: [PATCH 01/23] CMake system: Generate a text file that lists all backends included in the "make backends" target. --- cmake/externals.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/externals.cmake b/cmake/externals.cmake index 22dc754061..720320d40f 100644 --- a/cmake/externals.cmake +++ b/cmake/externals.cmake @@ -243,9 +243,22 @@ macro(add_error_target name) COMMAND exit 1) endmacro() +# A variable needed for file writing in the function below +set(CREATE_BACKENDS_LIST_FILE TRUE) # Function to set up a new target with a generic name of a backend/scanner and associate it with the default version function(set_as_default_version type name default) + # Construct a text file with the names of all the default backends. + # (Needed by our CI jobs, and maybe useful for other things too.) + if (type STREQUAL "backend") + set(backends_list_file "${CMAKE_CURRENT_BINARY_DIR}/default_backends.txt") + if(CREATE_BACKENDS_LIST_FILE) + file(WRITE "${backends_list_file}" "") + set(CREATE_BACKENDS_LIST_FILE FALSE PARENT_SCOPE) + endif() + file(APPEND "${backends_list_file}" "${name}\n") + endif() + #Retrieve the model name if it is also passed if(${ARGC} GREATER 3) set(model ${ARGV3}) From 03979164cebba8468b38905b1405b74311ffd0e0 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 01:42:46 +0100 Subject: [PATCH 02/23] For CI system: Added bash script that attempts to build all backends listed in a text file and reports back result. new file: cmake/scripts/build_backends.sh --- cmake/scripts/build_backends.sh | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 cmake/scripts/build_backends.sh diff --git a/cmake/scripts/build_backends.sh b/cmake/scripts/build_backends.sh new file mode 100755 index 0000000000..d20741c385 --- /dev/null +++ b/cmake/scripts/build_backends.sh @@ -0,0 +1,34 @@ +backends_list_file=$1 + +# Check that the input file exists +if [ ! -f ${backends_list_file} ]; +then + printf "%s\n" "Cannot find the file ${backends_list_file}" >&2 + exit 1 +fi + +# For each backend listed in default_backends.txt: +# - Try to build it +# - If the build fails, add a line to failed_backends_file +did_fail=0 +failed_backends_list="" +while read backend || [[ -n $backend ]]; +do + make ${backend} + if [ $? -ne 0 ]; + then + did_fail=1 + failed_backends_list="${failed_backends_list}, ${backend}" + fi +done < ${backends_list_file} + +failed_backends_list="${failed_backends_list:2}" + +if [ ${did_fail} -eq 1 ]; +then + printf "%s\n" "The following backends failed to build: ${failed_backends_list}" >&2 +else + printf "%s\n" "All backends built successfully!" +fi + +exit ${did_fail} From b3664d373704a256135629e3cd0d47cb7a2850db Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 01:49:42 +0100 Subject: [PATCH 03/23] Temporary modification to Ubuntu CI job to test backend building script. --- .github/workflows/ci.yml | 80 +++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be2c2faaf4..ed56573f3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,53 @@ on: - cron: '0 5 * * *' jobs: + backends_build: + runs-on: [docker, self-hosted] + strategy: + fail-fast: false + matrix: + arch: [ubuntu] #, ubuntu-py2, fedora + #mpi: [ON, OFF] + container: gambitbsm/gambit-base:${{ matrix.arch }} + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + mkdir -p BUILD + cd BUILD + echo "Sourcing setup.sh" + cat /etc/profile.d/gambit-setup.sh + source /etc/profile.d/gambit-setup.sh + echo "Making buildenv.sh" + > buildenv.sh + echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh + echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh + echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh + echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh + echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh + PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') + PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') + echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh + echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh + echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh + echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh + cat buildenv.sh + pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 + - name: Configure with cmake + run: | + cd BUILD/ && . buildenv.sh + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + - name: Build backends + run: | + cd BUILD && . buildenv.sh + #make -j$(( ($(nproc)+1)/2 )) backends + #make backends + ../cmake/scripts/build_backends.sh default_backends.txt + gambit_build: runs-on: [docker, self-hosted] strategy: @@ -58,27 +105,32 @@ jobs: run: | cd BUILD && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) gambit - - name: Build backends - run: | - cd BUILD && . buildenv.sh - #make -j$(( ($(nproc)+1)/2 )) backends - make backends - name: CLI test run: | . BUILD/buildenv.sh ./gambit -h - - name: WC test - run: | - . BUILD/buildenv.sh - ./gambit -f yaml_files/WC_lite.yaml - - name: ColliderBit test - run: | - . BUILD/buildenv.sh - ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - name: Build standalones + # run spartan test + + standalones_build: run: | cd BUILD && . buildenv.sh make standalones + + # # Split as different runs + # test_runs: + # # Need to build from scratch? + # - name: WC test + # run: | + # . BUILD/buildenv.sh + # ./gambit -f yaml_files/WC_lite.yaml + # - name: ColliderBit test + # run: | + # . BUILD/buildenv.sh + # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + + + + # - name: Validation dependencies # run: | # . BUILD/buildenv.sh From e8599de1c7c34af5618726b0a1dbfad68f6120d8 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 01:56:27 +0100 Subject: [PATCH 04/23] Fixed standalones_build job in Ubuntu CI yaml --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed56573f3c..1d1cee76de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,8 +52,8 @@ jobs: - name: Build backends run: | cd BUILD && . buildenv.sh - #make -j$(( ($(nproc)+1)/2 )) backends - #make backends + # make -j$(( ($(nproc)+1)/2 )) backends + # make backends ../cmake/scripts/build_backends.sh default_backends.txt gambit_build: @@ -109,13 +109,55 @@ jobs: run: | . BUILD/buildenv.sh ./gambit -h - # run spartan test + # TODO: run spartan test + standalones_build: + runs-on: [docker, self-hosted] + strategy: + fail-fast: false + matrix: + arch: [ubuntu] #, ubuntu-py2, fedora + #mpi: [ON, OFF] + container: gambitbsm/gambit-base:${{ matrix.arch }} + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + mkdir -p BUILD + cd BUILD + echo "Sourcing setup.sh" + cat /etc/profile.d/gambit-setup.sh + source /etc/profile.d/gambit-setup.sh + echo "Making buildenv.sh" + > buildenv.sh + echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh + echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh + echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh + echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh + echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh + PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') + PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') + echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh + echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh + echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh + echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh + cat buildenv.sh + pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 + - name: Configure with cmake + run: | + cd BUILD/ && . buildenv.sh + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + - name: Build standalones run: | cd BUILD && . buildenv.sh make standalones + # # Split as different runs # test_runs: # # Need to build from scratch? @@ -127,7 +169,6 @@ jobs: # run: | # . BUILD/buildenv.sh # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - From c52d863e1efcd2669420cd17fc5dad00ccc08e93 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 15:16:10 +0100 Subject: [PATCH 05/23] Improved the build_backends.sh script. Can now take a list of backends to skip. --- cmake/scripts/build_backends.sh | 75 +++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/cmake/scripts/build_backends.sh b/cmake/scripts/build_backends.sh index d20741c385..47140d2ae7 100755 --- a/cmake/scripts/build_backends.sh +++ b/cmake/scripts/build_backends.sh @@ -1,34 +1,85 @@ -backends_list_file=$1 +# Usage: build_backends.sh -f -s -j + +prefix="build_backends.sh:" +make_j_option=1 + +# Parse arguments +while getopts "f:s:j:" opt; do + case $opt in + f) backends_list_file="${OPTARG}" + ;; + s) skip_backends="${OPTARG}" + ;; + j) make_j_option="${OPTARG}" + ;; + \?) printf "${prefix} Invalid option. Valid options: -f -s -j \n" >&2 + exit 1 + ;; + esac + + case $OPTARG in + -*) printf "${prefix} Option $opt needs a valid argument \n" >&2 + exit 1 + ;; + esac +done + +if [ -z ${backends_list_file} ]; +then + printf "${prefix} Need an input file. Example: build_backends.sh -f \n" >&2 + exit 1 +fi # Check that the input file exists if [ ! -f ${backends_list_file} ]; then - printf "%s\n" "Cannot find the file ${backends_list_file}" >&2 + printf "${prefix} Cannot find the file ${backends_list_file}\n" >&2 exit 1 fi -# For each backend listed in default_backends.txt: -# - Try to build it -# - If the build fails, add a line to failed_backends_file +# For each backend listed in the input file: +# - Check if the backend is in the $skip_backends list. +# - If not, try to build it. +# - If the build fails, add it to $failed_backends_list did_fail=0 failed_backends_list="" while read backend || [[ -n $backend ]]; do - make ${backend} - if [ $? -ne 0 ]; - then - did_fail=1 - failed_backends_list="${failed_backends_list}, ${backend}" + do_skip_backend=0 + for skip_backend_name in $(echo ${skip_backends}); + do + if [ ${skip_backend_name} = ${backend} ]; + then + do_skip_backend=1 + fi + done + + if [ ${do_skip_backend} -eq 1 ]; + then + printf "\n${prefix} Will skip backend ${backend}.\n" + else + printf "\n${prefix} Will now attempt to build backend ${backend}.\n" + + # Now run the build command + make -j${make_j_option} ${backend} + if [ $? -ne 0 ]; + then + did_fail=1 + failed_backends_list="${failed_backends_list}, ${backend}" + fi fi done < ${backends_list_file} failed_backends_list="${failed_backends_list:2}" +# Report result if [ ${did_fail} -eq 1 ]; then - printf "%s\n" "The following backends failed to build: ${failed_backends_list}" >&2 + printf "\n${prefix} The following backends failed to build: ${failed_backends_list}\n" >&2 else - printf "%s\n" "All backends built successfully!" + printf "\n${prefix} All backends built successfully!\n" fi +# Return correct exit code exit ${did_fail} + From 71324e48303765caa2acaf765bb614ade9a4e5cd Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 15:22:16 +0100 Subject: [PATCH 06/23] Updated Ubuntu CI script to use the new options for the build_backend.sh script. --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d1cee76de..abe7e26bcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,9 +52,9 @@ jobs: - name: Build backends run: | cd BUILD && . buildenv.sh - # make -j$(( ($(nproc)+1)/2 )) backends - # make backends - ../cmake/scripts/build_backends.sh default_backends.txt + # Build backends, except those that are tested via other jobs. + # This replaces the "make backends" command. + ../cmake/scripts/build_backends.sh -f default_backends.txt -j $(( ($(nproc)+1)/2 )) -s "pythia rivet susyhit superiso heplike heplikedata" gambit_build: runs-on: [docker, self-hosted] @@ -109,7 +109,10 @@ jobs: run: | . BUILD/buildenv.sh ./gambit -h - # TODO: run spartan test + - name: Run spartan.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/spartan.yaml standalones_build: From 29b7f6d75cbce6ac90cb193830798b0f505be3b6 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 16:33:11 +0100 Subject: [PATCH 07/23] Added ColliderBit_CMSSM.yaml test job to Ubuntu CI script --- .github/workflows/ci.yml | 61 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abe7e26bcc..1f43413c8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: cd BUILD && . buildenv.sh # Build backends, except those that are tested via other jobs. # This replaces the "make backends" command. - ../cmake/scripts/build_backends.sh -f default_backends.txt -j $(( ($(nproc)+1)/2 )) -s "pythia rivet susyhit superiso heplike heplikedata" + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "susyhit pythia rivet contur higgsbounds higgssignals ATLAS_FullLikes" gambit_build: runs-on: [docker, self-hosted] @@ -173,6 +173,65 @@ jobs: # . BUILD/buildenv.sh # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + test_run_ColliderBit_CMSSM: + runs-on: [docker, self-hosted] + strategy: + fail-fast: false + matrix: + arch: [ubuntu] #, ubuntu-py2, fedora + #mpi: [ON, OFF] + container: gambitbsm/gambit-base:${{ matrix.arch }} + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + mkdir -p BUILD + cd BUILD + echo "Sourcing setup.sh" + cat /etc/profile.d/gambit-setup.sh + source /etc/profile.d/gambit-setup.sh + echo "Making buildenv.sh" + > buildenv.sh + echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh + echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh + echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh + echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh + echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh + PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') + PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') + echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh + echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh + echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh + echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh + cat buildenv.sh + pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 + - name: Configure with cmake + run: | + cd BUILD/ && . buildenv.sh + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;FlavBit;NeutrinoBit;ObjectivesBit" + - name: Build required backends + run: | + cd BUILD/ && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) nulike + make -j$(( ($(nproc)+1)/2 )) susyhit + make -j$(( ($(nproc)+1)/2 )) rivet + make -j$(( ($(nproc)+1)/2 )) contur + make -j$(( ($(nproc)+1)/2 )) pythia + make -j$(( ($(nproc)+1)/2 )) higgsbounds + make -j$(( ($(nproc)+1)/2 )) higgssignals + make ATLAS_FullLikes + - name: Build required Gambit bits + run: | + cd BUILD && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) gambit + - name: Test run with ColliderBit_CMSSM.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml # - name: Validation dependencies From 4f4d0dd8157959448ab61daac44da47691c6b56e Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 16:38:13 +0100 Subject: [PATCH 08/23] Temp hack to run the ColliderBit_CMSSM.yaml test run first. --- .github/workflows/ci.yml | 116 ++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f43413c8d..fda6ed4fe1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,8 @@ on: - cron: '0 5 * * *' jobs: - backends_build: + + test_run_ColliderBit_CMSSM: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -48,15 +49,28 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build backends + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;FlavBit;NeutrinoBit;ObjectivesBit" + - name: Build required backends + run: | + cd BUILD/ && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) nulike + make -j$(( ($(nproc)+1)/2 )) susyhit + make -j$(( ($(nproc)+1)/2 )) rivet + make -j$(( ($(nproc)+1)/2 )) contur + make -j$(( ($(nproc)+1)/2 )) pythia + make -j$(( ($(nproc)+1)/2 )) higgsbounds + make -j$(( ($(nproc)+1)/2 )) higgssignals + make ATLAS_FullLikes + - name: Build required Gambit bits run: | cd BUILD && . buildenv.sh - # Build backends, except those that are tested via other jobs. - # This replaces the "make backends" command. - ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "susyhit pythia rivet contur higgsbounds higgssignals ATLAS_FullLikes" + make -j$(( ($(nproc)+1)/2 )) gambit + - name: Test run with ColliderBit_CMSSM.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml - gambit_build: + backends_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -96,26 +110,14 @@ jobs: run: | cd BUILD/ && . buildenv.sh cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build scanners - run: | - cd BUILD/ && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) scanners - cmake .. - - name: Build Gambit + - name: Build backends run: | cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) gambit - - name: CLI test - run: | - . BUILD/buildenv.sh - ./gambit -h - - name: Run spartan.yaml - run: | - . BUILD/buildenv.sh - ./gambit -rf yaml_files/spartan.yaml - + # Build backends, except those that are tested via other jobs. + # This replaces the "make backends" command. + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "susyhit pythia rivet contur higgsbounds higgssignals ATLAS_FullLikes" - standalones_build: + gambit_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -155,25 +157,26 @@ jobs: run: | cd BUILD/ && . buildenv.sh cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build standalones + - name: Build scanners + run: | + cd BUILD/ && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) scanners + cmake .. + - name: Build Gambit run: | cd BUILD && . buildenv.sh - make standalones + make -j$(( ($(nproc)+1)/2 )) gambit + - name: CLI test + run: | + . BUILD/buildenv.sh + ./gambit -h + - name: Run spartan.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/spartan.yaml - # # Split as different runs - # test_runs: - # # Need to build from scratch? - # - name: WC test - # run: | - # . BUILD/buildenv.sh - # ./gambit -f yaml_files/WC_lite.yaml - # - name: ColliderBit test - # run: | - # . BUILD/buildenv.sh - # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - test_run_ColliderBit_CMSSM: + standalones_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -212,26 +215,25 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;FlavBit;NeutrinoBit;ObjectivesBit" - - name: Build required backends - run: | - cd BUILD/ && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) nulike - make -j$(( ($(nproc)+1)/2 )) susyhit - make -j$(( ($(nproc)+1)/2 )) rivet - make -j$(( ($(nproc)+1)/2 )) contur - make -j$(( ($(nproc)+1)/2 )) pythia - make -j$(( ($(nproc)+1)/2 )) higgsbounds - make -j$(( ($(nproc)+1)/2 )) higgssignals - make ATLAS_FullLikes - - name: Build required Gambit bits + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + - name: Build standalones run: | cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) gambit - - name: Test run with ColliderBit_CMSSM.yaml - run: | - . BUILD/buildenv.sh - ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml + make standalones + + + # # Split as different runs + # test_runs: + # # Need to build from scratch? + # - name: WC test + # run: | + # . BUILD/buildenv.sh + # ./gambit -f yaml_files/WC_lite.yaml + # - name: ColliderBit test + # run: | + # . BUILD/buildenv.sh + # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + # - name: Validation dependencies From fcedd7f9c4c6e7aa2329a1d7dbe31c1afc6004bf Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 20:49:12 +0100 Subject: [PATCH 09/23] Added WC.yaml test back into the Ubuntu CI script. Other small tweaks. --- .github/workflows/ci.yml | 38 +++++++++++++++++---------------- cmake/scripts/build_backends.sh | 20 +++++++++-------- yaml_files/WC.yaml | 1 + 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fda6ed4fe1..602eff231c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: jobs: - test_run_ColliderBit_CMSSM: + test_runs: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -49,10 +49,16 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;FlavBit;NeutrinoBit;ObjectivesBit" + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit" + - name: Build required scanners + run: | + cd BUILD/ && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) diver + cmake .. - name: Build required backends run: | cd BUILD/ && . buildenv.sh + # Build bakends needed for ColliderBit_CMSSM.yaml make -j$(( ($(nproc)+1)/2 )) nulike make -j$(( ($(nproc)+1)/2 )) susyhit make -j$(( ($(nproc)+1)/2 )) rivet @@ -61,14 +67,23 @@ jobs: make -j$(( ($(nproc)+1)/2 )) higgsbounds make -j$(( ($(nproc)+1)/2 )) higgssignals make ATLAS_FullLikes + # Build bakends needed for WC.yaml + make -j$(( ($(nproc)+1)/2 )) superiso + make -j$(( ($(nproc)+1)/2 )) heplikedata + make -j$(( ($(nproc)+1)/2 )) heplike - name: Build required Gambit bits run: | cd BUILD && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) gambit - - name: Test run with ColliderBit_CMSSM.yaml + - name: Run ColliderBit_CMSSM.yaml run: | . BUILD/buildenv.sh ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml + - name: Run WC.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/WC.yaml + backends_build: runs-on: [docker, self-hosted] @@ -115,7 +130,8 @@ jobs: cd BUILD && . buildenv.sh # Build backends, except those that are tested via other jobs. # This replaces the "make backends" command. - ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "susyhit pythia rivet contur higgsbounds higgssignals ATLAS_FullLikes" + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + gambit_build: runs-on: [docker, self-hosted] @@ -222,20 +238,6 @@ jobs: make standalones - # # Split as different runs - # test_runs: - # # Need to build from scratch? - # - name: WC test - # run: | - # . BUILD/buildenv.sh - # ./gambit -f yaml_files/WC_lite.yaml - # - name: ColliderBit test - # run: | - # . BUILD/buildenv.sh - # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - - # - name: Validation dependencies # run: | # . BUILD/buildenv.sh diff --git a/cmake/scripts/build_backends.sh b/cmake/scripts/build_backends.sh index 47140d2ae7..a69d79d1db 100755 --- a/cmake/scripts/build_backends.sh +++ b/cmake/scripts/build_backends.sh @@ -8,7 +8,7 @@ while getopts "f:s:j:" opt; do case $opt in f) backends_list_file="${OPTARG}" ;; - s) skip_backends="${OPTARG}" + s) skip_backends_list="${OPTARG}" ;; j) make_j_option="${OPTARG}" ;; @@ -38,15 +38,16 @@ then fi # For each backend listed in the input file: -# - Check if the backend is in the $skip_backends list. +# - Check if the backend is in the $skip_backends_list. # - If not, try to build it. # - If the build fails, add it to $failed_backends_list did_fail=0 +succeeded_backends_list="" failed_backends_list="" while read backend || [[ -n $backend ]]; do do_skip_backend=0 - for skip_backend_name in $(echo ${skip_backends}); + for skip_backend_name in $(echo ${skip_backends_list}); do if [ ${skip_backend_name} = ${backend} ]; then @@ -66,19 +67,20 @@ do then did_fail=1 failed_backends_list="${failed_backends_list}, ${backend}" + else + succeeded_backends_list="${succeeded_backends_list}, ${backend}" fi fi done < ${backends_list_file} +succeeded_backends_list="${succeeded_backends_list:2}" failed_backends_list="${failed_backends_list:2}" # Report result -if [ ${did_fail} -eq 1 ]; -then - printf "\n${prefix} The following backends failed to build: ${failed_backends_list}\n" >&2 -else - printf "\n${prefix} All backends built successfully!\n" -fi +printf "\n${prefix} SUMMARY:\n" +printf "${prefix} Successful backend builds: ${succeeded_backends_list}\n" +printf "${prefix} Skipped backend builds: ${skip_backends_list}\n" +printf "${prefix} Failed backend builds: ${failed_backends_list}\n\n" # Return correct exit code exit ${did_fail} diff --git a/yaml_files/WC.yaml b/yaml_files/WC.yaml index b140c5d49a..cee6319b7a 100644 --- a/yaml_files/WC.yaml +++ b/yaml_files/WC.yaml @@ -67,6 +67,7 @@ Printer: options: output_file: "WC.hdf5" group: "/WC" + delete_file_on_restart: true Scanner: From 688381a3c6f5b78fda6cb3e0413684f41d410b62 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 29 Nov 2023 20:56:38 +0100 Subject: [PATCH 10/23] Fixed the order of jobs in the Ubuntu CI script. Added more descriptive comments. --- .github/workflows/ci.yml | 108 +++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 602eff231c..dfd110e562 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,9 @@ on: jobs: - test_runs: + # A job that builds GAMBIT + scanners, tests the command-line interface + # and runs a minimal test run with spartan.yaml + gambit_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -49,43 +51,28 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit" - - name: Build required scanners + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + - name: Build scanners run: | cd BUILD/ && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) diver + make -j$(( ($(nproc)+1)/2 )) scanners cmake .. - - name: Build required backends - run: | - cd BUILD/ && . buildenv.sh - # Build bakends needed for ColliderBit_CMSSM.yaml - make -j$(( ($(nproc)+1)/2 )) nulike - make -j$(( ($(nproc)+1)/2 )) susyhit - make -j$(( ($(nproc)+1)/2 )) rivet - make -j$(( ($(nproc)+1)/2 )) contur - make -j$(( ($(nproc)+1)/2 )) pythia - make -j$(( ($(nproc)+1)/2 )) higgsbounds - make -j$(( ($(nproc)+1)/2 )) higgssignals - make ATLAS_FullLikes - # Build bakends needed for WC.yaml - make -j$(( ($(nproc)+1)/2 )) superiso - make -j$(( ($(nproc)+1)/2 )) heplikedata - make -j$(( ($(nproc)+1)/2 )) heplike - - name: Build required Gambit bits + - name: Build Gambit run: | cd BUILD && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) gambit - - name: Run ColliderBit_CMSSM.yaml + - name: CLI test run: | . BUILD/buildenv.sh - ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml - - name: Run WC.yaml + ./gambit -h + - name: Run spartan.yaml run: | . BUILD/buildenv.sh - ./gambit -rf yaml_files/WC.yaml + ./gambit -rf yaml_files/spartan.yaml - backends_build: + # A job that builds all the standalones + standalones_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -125,15 +112,16 @@ jobs: run: | cd BUILD/ && . buildenv.sh cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build backends + - name: Build standalones run: | cd BUILD && . buildenv.sh - # Build backends, except those that are tested via other jobs. - # This replaces the "make backends" command. - ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + make standalones - gambit_build: + # A job that tests the builds for all backends in the "make backends" target. + # Backends that are anyway tested as part of the "test_runs" job can be skipped, + # see the build_backends.sh command below. + backends_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -173,26 +161,17 @@ jobs: run: | cd BUILD/ && . buildenv.sh cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build scanners - run: | - cd BUILD/ && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) scanners - cmake .. - - name: Build Gambit + - name: Build backends run: | cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) gambit - - name: CLI test - run: | - . BUILD/buildenv.sh - ./gambit -h - - name: Run spartan.yaml - run: | - . BUILD/buildenv.sh - ./gambit -rf yaml_files/spartan.yaml + # Build backends, except those that are tested via other jobs. + # This replaces the "make backends" command. + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" - standalones_build: + # A job for GAMBIT test runs. Only those GAMBIT modules, scanners and backends + # required by the test runs are built. + test_runs: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -231,11 +210,40 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build standalones + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit" + - name: Build required scanners + run: | + cd BUILD/ && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) diver + cmake .. + - name: Build required backends + run: | + cd BUILD/ && . buildenv.sh + # Build bakends needed for ColliderBit_CMSSM.yaml + make -j$(( ($(nproc)+1)/2 )) nulike + make -j$(( ($(nproc)+1)/2 )) susyhit + make -j$(( ($(nproc)+1)/2 )) rivet + make -j$(( ($(nproc)+1)/2 )) contur + make -j$(( ($(nproc)+1)/2 )) pythia + make -j$(( ($(nproc)+1)/2 )) higgsbounds + make -j$(( ($(nproc)+1)/2 )) higgssignals + make ATLAS_FullLikes + # Build bakends needed for WC.yaml + make -j$(( ($(nproc)+1)/2 )) superiso + make -j$(( ($(nproc)+1)/2 )) heplikedata + make -j$(( ($(nproc)+1)/2 )) heplike + - name: Build required Gambit bits run: | cd BUILD && . buildenv.sh - make standalones + make -j$(( ($(nproc)+1)/2 )) gambit + - name: Run ColliderBit_CMSSM.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml + - name: Run WC.yaml + run: | + . BUILD/buildenv.sh + ./gambit -rf yaml_files/WC.yaml # - name: Validation dependencies From ee445e58aa06d9ee1c91fb2fb50a8e8cb68eb5cb Mon Sep 17 00:00:00 2001 From: ChrisJChang <59903135+ChrisJChang@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:57:22 +0100 Subject: [PATCH 11/23] Split Max X64 CI into multiple parts --- .github/workflows/ci_Mac_x64.yml | 138 +++++++++++++++++++++++++------ 1 file changed, 111 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 54b771efdc..c2b63dfefe 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -1,4 +1,4 @@ -name: Gambit CI +name: Gambit Mac X64 CI on: push: @@ -38,11 +38,114 @@ jobs: cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) scanners cmake .. + - name: Build Gambit + run: | + echo "Build GAMBIT." + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + - name: Test spartan yaml + run: | + echo "Testing spartan.yaml (with cout printer)" + sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml + ./gambit -rf yaml_files/spartan.yaml + - name: CLI test + run: | + echo "Run the test of gambit help" + ./gambit -h + + standalones_build: + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build standalones + run: | + echo "Test the building of the standalones" + cd BUILD + make standalones + + backends_build: + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build Backends + run: | + echo "Building all Backends" + cd BUILD + # Build backends, except those that are tested via other jobs. + # This replaces the "make backends" command. + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + + test_runs: + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + - name: Build scanners + run: | + echo "Build diver" + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) diver + cmake .. - name: Build Backends for tests run: | - echo "Building Backends" + echo "Building Backends required for tests" cd BUILD - #make -j $(( $(sysctl -n hw.ncpu)/2 )) pythia higgssignals nulike ATLAS_FullLikes susyhit heplike superiso make pythia make higgssignals make nulike @@ -52,39 +155,20 @@ jobs: make superiso make rivet make contur - echo "Running cmake again, since this is required for ColliderBit/pythia" cmake .. - name: Build Gambit run: | echo "Build GAMBIT." cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: Test spartan yaml - run: | - echo "Testing spartan.yaml (with cout printer)" - sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml - ./gambit -rf yaml_files/spartan.yaml - - name: CLI test + - name: ColliderBit test run: | - echo "Run the test of gambit help" - ./gambit -h + echo "Test the ColliderBit CMSSM yaml file" + ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - name: WC test run: | echo "Test WC_lite yaml (no printing)" sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml ./gambit -f yaml_files/WC_lite.yaml - - name: ColliderBit test - run: | - echo "Test the ColliderBit CMSSM yaml file" - ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - name: Build Backends - run: | - echo "Building all Backends" - cd BUILD - #make -j $(( $(sysctl -n hw.ncpu)/2 )) backends - make backends - #- name: Build standalones - # run: | - # echo "Test the building of the standalones" - # cd BUILD - # make standalones + + From 047fade376b8722ad6ebd513878790a03cb6320a Mon Sep 17 00:00:00 2001 From: ChrisJChang <59903135+ChrisJChang@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:03:20 +0100 Subject: [PATCH 12/23] Mac Arm64 CI job split into multiple parts --- .github/workflows/ci_Mac_arm64.yml | 130 +++++++++++++++++++++++------ 1 file changed, 106 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci_Mac_arm64.yml b/.github/workflows/ci_Mac_arm64.yml index e10f02d9fc..8952ec518a 100644 --- a/.github/workflows/ci_Mac_arm64.yml +++ b/.github/workflows/ci_Mac_arm64.yml @@ -1,4 +1,4 @@ -name: Gambit CI +name: Gambit Mac Arm64 CI on: push: @@ -37,6 +37,108 @@ jobs: cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) scanners cmake .. + - name: Build Gambit + run: | + echo "Build GAMBIT." + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + - name: Test spartan yaml + run: | + echo "Testing spartan.yaml (with cout printer)" + sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml + ./gambit -rf yaml_files/spartan.yaml + - name: CLI test + run: | + echo "Run the test of gambit help" + ./gambit -h + + + standalones_build: + runs-on: [self-hosted, macOS, Arm64] + strategy: + fail-fast: false + matrix: + arch: [Arm64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build standalones + run: | + echo "Test the building of the standalones" + cd BUILD + make standalones + + backends_build: + runs-on: [self-hosted, macOS, Arm64] + strategy: + fail-fast: false + matrix: + arch: [Arm64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build Backends + run: | + echo "Building all Backends" + cd BUILD + # Build backends, except those that are tested via other jobs. + # This replaces the "make backends" command. + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + + test_runs: + runs-on: [self-hosted, macOS, Arm64] + strategy: + fail-fast: false + matrix: + arch: [Arm64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build scanners + run: | + echo "Build scanners" + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) diver + cmake .. - name: Build Backends for tests run: | echo "Building Backends required for tests" @@ -58,32 +160,12 @@ jobs: echo "Build GAMBIT." cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: Test spartan yaml - run: | - echo "Testing spartan.yaml (with cout printer)" - sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml - ./gambit -rf yaml_files/spartan.yaml - - name: CLI test + - name: ColliderBit test run: | - echo "Run the test of gambit help" - ./gambit -h + echo "Test the ColliderBit CMSSM yaml file" + ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - name: WC test run: | echo "Test WC_lite yaml (no printing)" sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml ./gambit -f yaml_files/WC_lite.yaml - - name: ColliderBit test - run: | - echo "Test the ColliderBit CMSSM yaml file" - ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - name: Build Backends - run: | - echo "Building all Backends" - cd BUILD - #make -j $(( $(sysctl -n hw.ncpu)/2 )) backends - make backends - #- name: Build standalones - # run: | - # echo "Test the building of the standalones" - # cd BUILD - # make standalones From 70b720b6e745f012ed94310cfa2dd622ea84f4a6 Mon Sep 17 00:00:00 2001 From: ChrisJChang <59903135+ChrisJChang@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:04:25 +0100 Subject: [PATCH 13/23] Rename CI job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfd110e562..d48ba127ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Gambit CI +name: Gambit Ubuntu CI on: push: From 1770a1194e6ecd30717a5131578148cfbf5acd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20St=C3=B6cker?= Date: Fri, 1 Dec 2023 01:10:26 +0100 Subject: [PATCH 14/23] Replace cpdef with cdef in classy files modified: Backends/patches/classy/2.6.3/classy_2.6.3.diff modified: Backends/patches/classy/2.9.3/classy_2.9.3.diff modified: Backends/patches/classy/2.9.4/classy_2.9.4.diff modified: Backends/patches/classy/3.1.0/classy_3.1.0.diff modified: Backends/patches/classy/exo_2.7.2/classy_exo_2.7.2.diff --- .../patches/classy/2.6.3/classy_2.6.3.diff | 18 +++++++++++++-- .../patches/classy/2.9.3/classy_2.9.3.diff | 20 +++++++++++++++-- .../patches/classy/2.9.4/classy_2.9.4.diff | 22 ++++++++++++++++--- .../patches/classy/3.1.0/classy_3.1.0.diff | 22 ++++++++++++++++--- .../classy/exo_2.7.2/classy_exo_2.7.2.diff | 20 +++++++++++++++-- 5 files changed, 90 insertions(+), 12 deletions(-) diff --git a/Backends/patches/classy/2.6.3/classy_2.6.3.diff b/Backends/patches/classy/2.6.3/classy_2.6.3.diff index 5a64405a5a..e5811c06c1 100644 --- a/Backends/patches/classy/2.6.3/classy_2.6.3.diff +++ b/Backends/patches/classy/2.6.3/classy_2.6.3.diff @@ -1,5 +1,18 @@ --- a/python/classy.pyx 2017-10-24 14:42:41.000000000 +0100 +++ b/python/classy.pyx 2019-07-03 12:45:27.100272668 +0100 +@@ -85,9 +85,9 @@ + cdef lensing le + cdef file_content fc + +- cpdef int ready # Flag +- cpdef object _pars # Dictionary of the parameters +- cpdef object ncp # Keeps track of the structures initialized, in view of cleaning. ++ cdef int ready # Flag ++ cdef object _pars # Dictionary of the parameters ++ cdef object ncp # Keeps track of the structures initialized, in view of cleaning. + + # Defining two new properties to recover, respectively, the parameters used + # or the age (set after computation). Follow this syntax if you want to @@ -111,8 +111,21 @@ "output":"tCl mPk",} self.set(**_pars) @@ -7,7 +20,7 @@ + # (JR) added to get information from cosmo object + # whether class re-computed or not + #recomputed = True -+ cpdef int recomputed ++ cdef int recomputed + property recomputed: + def __get__(self): + return self.recomputed @@ -17,7 +30,8 @@ + # ------------------ + def __cinit__(self, default=False): - cpdef char* dumc +- cpdef char* dumc ++ cdef char* dumc + self.recomputed = True self.ready = False self._pars = {} diff --git a/Backends/patches/classy/2.9.3/classy_2.9.3.diff b/Backends/patches/classy/2.9.3/classy_2.9.3.diff index 04c247d410..a6b470b4cc 100644 --- a/Backends/patches/classy/2.9.3/classy_2.9.3.diff +++ b/Backends/patches/classy/2.9.3/classy_2.9.3.diff @@ -1,5 +1,20 @@ --- a/python/classy.pyx 2017-10-24 14:42:41.000000000 +0100 +++ b/python/classy.pyx 2019-07-03 12:45:27.100272668 +0100 +@@ -96,10 +96,10 @@ + cdef lensing le + cdef file_content fc + +- cpdef int computed # Flag to see if classy has already computed with the given pars +- cpdef int allocated # Flag to see if classy structs are allocated already +- cpdef object _pars # Dictionary of the parameters +- cpdef object ncp # Keeps track of the structures initialized, in view of cleaning. ++ cdef int computed # Flag to see if classy has already computed with the given pars ++ cdef int allocated # Flag to see if classy structs are allocated already ++ cdef object _pars # Dictionary of the parameters ++ cdef object ncp # Keeps track of the structures initialized, in view of cleaning. + + # Defining two new properties to recover, respectively, the parameters used + # or the age (set after computation). Follow this syntax if you want to @@ -118,13 +118,28 @@ def __get__(self): return self.nl.method @@ -14,7 +29,7 @@ + # (JR) added to get information from cosmo object + # whether class re-computed or not + #recomputed = True -+ cpdef int recomputed ++ cdef int recomputed + property recomputed: + def __get__(self): + return self.recomputed @@ -24,7 +39,8 @@ + # ------------------ + def __cinit__(self, default=False): - cpdef char* dumc +- cpdef char* dumc ++ cdef char* dumc + self.recomputed = True self.allocated = False self.computed = False diff --git a/Backends/patches/classy/2.9.4/classy_2.9.4.diff b/Backends/patches/classy/2.9.4/classy_2.9.4.diff index c9903fdaa3..98d6894240 100644 --- a/Backends/patches/classy/2.9.4/classy_2.9.4.diff +++ b/Backends/patches/classy/2.9.4/classy_2.9.4.diff @@ -1,6 +1,21 @@ --- a/python/classy.pyx 2017-10-24 14:42:41.000000000 +0100 +++ b/python/classy.pyx 2019-07-03 12:45:27.100272668 +0100 -@@ -118,13 +118,28 @@ +@@ -96,10 +96,10 @@ + cdef lensing le + cdef file_content fc + +- cpdef int computed # Flag to see if classy has already computed with the given pars +- cpdef int allocated # Flag to see if classy structs are allocated already +- cpdef object _pars # Dictionary of the parameters +- cpdef object ncp # Keeps track of the structures initialized, in view of cleaning. ++ cdef int computed # Flag to see if classy has already computed with the given pars ++ cdef int allocated # Flag to see if classy structs are allocated already ++ cdef object _pars # Dictionary of the parameters ++ cdef object ncp # Keeps track of the structures initialized, in view of cleaning. + + # Defining two new properties to recover, respectively, the parameters used + # or the age (set after computation). Follow this syntax if you want to +@@ -118,13 +118,28 @@ cdef class Class: def __get__(self): return self.nl.method @@ -14,7 +29,7 @@ + # (JR) added to get information from cosmo object + # whether class re-computed or not + #recomputed = True -+ cpdef int recomputed ++ cdef int recomputed + property recomputed: + def __get__(self): + return self.recomputed @@ -24,7 +39,8 @@ + # ------------------ + def __cinit__(self, default=False): - cpdef char* dumc +- cpdef char* dumc ++ cdef char* dumc + self.recomputed = True self.allocated = False self.computed = False diff --git a/Backends/patches/classy/3.1.0/classy_3.1.0.diff b/Backends/patches/classy/3.1.0/classy_3.1.0.diff index deed35bd06..cb6210d838 100644 --- a/Backends/patches/classy/3.1.0/classy_3.1.0.diff +++ b/Backends/patches/classy/3.1.0/classy_3.1.0.diff @@ -318,6 +318,21 @@ diff --git a/python/classy.pyx b/python/classy.pyx index b61a20e9..748ad4bb 100644 --- a/python/classy.pyx +++ b/python/classy.pyx +@@ -99,10 +99,10 @@ cdef class Class: + cdef distortions sd + cdef file_content fc + +- cpdef int computed # Flag to see if classy has already computed with the given pars +- cpdef int allocated # Flag to see if classy structs are allocated already +- cpdef object _pars # Dictionary of the parameters +- cpdef object ncp # Keeps track of the structures initialized, in view of cleaning. ++ cdef int computed # Flag to see if classy has already computed with the given pars ++ cdef int allocated # Flag to see if classy structs are allocated already ++ cdef object _pars # Dictionary of the parameters ++ cdef object ncp # Keeps track of the structures initialized, in view of cleaning. + + # Defining two new properties to recover, respectively, the parameters used + # or the age (set after computation). Follow this syntax if you want to @@ -126,8 +126,21 @@ cdef class Class: "output":"tCl mPk",} self.set(**_pars) @@ -325,7 +340,7 @@ index b61a20e9..748ad4bb 100644 + # (JR) added to get information from cosmo object + # whether class re-computed or not + #recomputed = True -+ cpdef int recomputed ++ cdef int recomputed + property recomputed: + def __get__(self): + return self.recomputed @@ -335,7 +350,8 @@ index b61a20e9..748ad4bb 100644 + # ------------------ + def __cinit__(self, default=False): - cpdef char* dumc +- cpdef char* dumc ++ cdef char* dumc + self.recomputed = True self.allocated = False self.computed = False @@ -363,7 +379,7 @@ index b61a20e9..748ad4bb 100644 + cdef double tau + cdef int last_index #junk + cdef double * pvecback -+ cpdef double t ++ cdef double t + + self.compute(["background"]) + diff --git a/Backends/patches/classy/exo_2.7.2/classy_exo_2.7.2.diff b/Backends/patches/classy/exo_2.7.2/classy_exo_2.7.2.diff index 703849b132..ec5d5d4e3f 100644 --- a/Backends/patches/classy/exo_2.7.2/classy_exo_2.7.2.diff +++ b/Backends/patches/classy/exo_2.7.2/classy_exo_2.7.2.diff @@ -69,6 +69,21 @@ diff --git a/python/classy.pyx b/python/classy.pyx index fae0dd04..a8020991 100644 --- a/python/classy.pyx +++ b/python/classy.pyx +@@ -86,10 +86,10 @@ cdef class Class: + cdef lensing le + cdef file_content fc + +- cpdef int ready # Flag to see if classy can currently compute +- cpdef int allocated # Flag to see if classy structs are allocated already +- cpdef object _pars # Dictionary of the parameters +- cpdef object ncp # Keeps track of the structures initialized, in view of cleaning. ++ cdef int ready # Flag to see if classy can currently compute ++ cdef int allocated # Flag to see if classy structs are allocated already ++ cdef object _pars # Dictionary of the parameters ++ cdef object ncp # Keeps track of the structures initialized, in view of cleaning. + + # Defining two new properties to recover, respectively, the parameters used + # or the age (set after computation). Follow this syntax if you want to @@ -113,8 +113,21 @@ cdef class Class: "output":"tCl mPk",} self.set(**_pars) @@ -76,7 +91,7 @@ index fae0dd04..a8020991 100644 + # (JR) added to get information from cosmo object + # whether class re-computed or not + #recomputed = True -+ cpdef int recomputed ++ cdef int recomputed + property recomputed: + def __get__(self): + return self.recomputed @@ -86,7 +101,8 @@ index fae0dd04..a8020991 100644 + # ------------------ + def __cinit__(self, default=False): - cpdef char* dumc +- cpdef char* dumc ++ cdef char* dumc + self.recomputed = True self.ready = False self.allocated = False From df3ee6dbfbf8193f1041c6e57dc21d4d59d6fa88 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Fri, 1 Dec 2023 12:15:24 +0100 Subject: [PATCH 15/23] Added temporary Mac x64 CI job for debugging issue with Rivet build --- .github/workflows/ci_Mac_x64.yml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index c2b63dfefe..4c85b425f4 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -9,6 +9,46 @@ on: - cron: '0 5 * * *' jobs: + rivet_debug_test: + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + - name: Build Rivet + run: | + echo "Building Rivet" + cd BUILD + VERBOSE=1 make rivet + cmake .. + - name: Build Gambit + run: | + echo "Build GAMBIT." + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + - name: ColliderBit test + run: | + echo "Test the ColliderBit CMSSM yaml file" + ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + + gambit_build: runs-on: [self-hosted, macOS,x64] strategy: From 8e0ed11ad7c53a3215259db90226047f6d8b2910 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Fri, 1 Dec 2023 12:26:01 +0100 Subject: [PATCH 16/23] Temporary disabling the working Mac x64 CI jobs. Now only running standalones_build and rivet_debug_test. --- .github/workflows/ci_Mac_x64.yml | 260 +++++++++++++++---------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 4c85b425f4..7cc06cc30a 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -49,49 +49,49 @@ jobs: ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - gambit_build: - runs-on: [self-hosted, macOS,x64] - strategy: - fail-fast: false - matrix: - arch: [x64] - defaults: - run: - shell: bash -eo pipefail {0} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up build environment - run: | - echo "Set up the build environment" - mkdir -p BUILD - cd BUILD - - name: Configure with cmake - run: | - echo "Configure with cmake" - cd BUILD - # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - - name: Build scanners - run: | - echo "Build scanners" - cd BUILD - make -j $(( $(sysctl -n hw.ncpu)/2 )) scanners - cmake .. - - name: Build Gambit - run: | - echo "Build GAMBIT." - cd BUILD - make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: Test spartan yaml - run: | - echo "Testing spartan.yaml (with cout printer)" - sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml - ./gambit -rf yaml_files/spartan.yaml - - name: CLI test - run: | - echo "Run the test of gambit help" - ./gambit -h + # gambit_build: + # runs-on: [self-hosted, macOS,x64] + # strategy: + # fail-fast: false + # matrix: + # arch: [x64] + # defaults: + # run: + # shell: bash -eo pipefail {0} + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Set up build environment + # run: | + # echo "Set up the build environment" + # mkdir -p BUILD + # cd BUILD + # - name: Configure with cmake + # run: | + # echo "Configure with cmake" + # cd BUILD + # # Ditching a few backends that don't currently work on Mac + # cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + # - name: Build scanners + # run: | + # echo "Build scanners" + # cd BUILD + # make -j $(( $(sysctl -n hw.ncpu)/2 )) scanners + # cmake .. + # - name: Build Gambit + # run: | + # echo "Build GAMBIT." + # cd BUILD + # make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + # - name: Test spartan yaml + # run: | + # echo "Testing spartan.yaml (with cout printer)" + # sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml + # ./gambit -rf yaml_files/spartan.yaml + # - name: CLI test + # run: | + # echo "Run the test of gambit help" + # ./gambit -h standalones_build: runs-on: [self-hosted, macOS,x64] @@ -122,93 +122,93 @@ jobs: cd BUILD make standalones - backends_build: - runs-on: [self-hosted, macOS,x64] - strategy: - fail-fast: false - matrix: - arch: [x64] - defaults: - run: - shell: bash -eo pipefail {0} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up build environment - run: | - echo "Set up the build environment" - mkdir -p BUILD - cd BUILD - - name: Configure with cmake - run: | - echo "Configure with cmake" - cd BUILD - # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - - name: Build Backends - run: | - echo "Building all Backends" - cd BUILD - # Build backends, except those that are tested via other jobs. - # This replaces the "make backends" command. - ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + # backends_build: + # runs-on: [self-hosted, macOS,x64] + # strategy: + # fail-fast: false + # matrix: + # arch: [x64] + # defaults: + # run: + # shell: bash -eo pipefail {0} + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Set up build environment + # run: | + # echo "Set up the build environment" + # mkdir -p BUILD + # cd BUILD + # - name: Configure with cmake + # run: | + # echo "Configure with cmake" + # cd BUILD + # # Ditching a few backends that don't currently work on Mac + # cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + # - name: Build Backends + # run: | + # echo "Building all Backends" + # cd BUILD + # # Build backends, except those that are tested via other jobs. + # # This replaces the "make backends" command. + # ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" - test_runs: - runs-on: [self-hosted, macOS,x64] - strategy: - fail-fast: false - matrix: - arch: [x64] - defaults: - run: - shell: bash -eo pipefail {0} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up build environment - run: | - echo "Set up the build environment" - mkdir -p BUILD - cd BUILD - - name: Configure with cmake - run: | - echo "Configure with cmake" - cd BUILD - # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. - - name: Build scanners - run: | - echo "Build diver" - cd BUILD - make -j $(( $(sysctl -n hw.ncpu)/2 )) diver - cmake .. - - name: Build Backends for tests - run: | - echo "Building Backends required for tests" - cd BUILD - make pythia - make higgssignals - make nulike - make ATLAS_FullLikes - make susyhit - make heplike - make superiso - make rivet - make contur - cmake .. - - name: Build Gambit - run: | - echo "Build GAMBIT." - cd BUILD - make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: ColliderBit test - run: | - echo "Test the ColliderBit CMSSM yaml file" - ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - name: WC test - run: | - echo "Test WC_lite yaml (no printing)" - sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml - ./gambit -f yaml_files/WC_lite.yaml + # test_runs: + # runs-on: [self-hosted, macOS,x64] + # strategy: + # fail-fast: false + # matrix: + # arch: [x64] + # defaults: + # run: + # shell: bash -eo pipefail {0} + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Set up build environment + # run: | + # echo "Set up the build environment" + # mkdir -p BUILD + # cd BUILD + # - name: Configure with cmake + # run: | + # echo "Configure with cmake" + # cd BUILD + # # Ditching a few backends that don't currently work on Mac + # cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + # - name: Build scanners + # run: | + # echo "Build diver" + # cd BUILD + # make -j $(( $(sysctl -n hw.ncpu)/2 )) diver + # cmake .. + # - name: Build Backends for tests + # run: | + # echo "Building Backends required for tests" + # cd BUILD + # make pythia + # make higgssignals + # make nulike + # make ATLAS_FullLikes + # make susyhit + # make heplike + # make superiso + # make rivet + # make contur + # cmake .. + # - name: Build Gambit + # run: | + # echo "Build GAMBIT." + # cd BUILD + # make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + # - name: ColliderBit test + # run: | + # echo "Test the ColliderBit CMSSM yaml file" + # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + # - name: WC test + # run: | + # echo "Test WC_lite yaml (no printing)" + # sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml + # ./gambit -f yaml_files/WC_lite.yaml From 6ab72c5712ff49809c995df49ef398d18cb2a42e Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Fri, 1 Dec 2023 13:36:52 +0100 Subject: [PATCH 17/23] Added more temporary debug code in ci_Mac_x64.yml --- .github/workflows/ci_Mac_x64.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 7cc06cc30a..2327e3b49b 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -36,18 +36,12 @@ jobs: run: | echo "Building Rivet" cd BUILD - VERBOSE=1 make rivet - cmake .. - - name: Build Gambit - run: | - echo "Build GAMBIT." - cd BUILD - make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: ColliderBit test - run: | - echo "Test the ColliderBit CMSSM yaml file" - ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - + VERBOSE=1 make rivet ; printf "\n\nDEBUG: Will now dump some files to screen:\n" + printf "\n DEBUG: setup.py.in: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py.in + printf "\n DEBUG: setup.py: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py + printf "\n DEBUG: Makefile.in: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile.in + printf "\n DEBUG: Makefile: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile + printf "\n DEBUG: Done. \n" # gambit_build: # runs-on: [self-hosted, macOS,x64] From 6ad687df671a8f700b9ae559591b41ace05665df Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Fri, 1 Dec 2023 14:03:42 +0100 Subject: [PATCH 18/23] New Mac x64 CI debug attempt --- .github/workflows/ci_Mac_x64.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 2327e3b49b..74a374502b 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -36,12 +36,26 @@ jobs: run: | echo "Building Rivet" cd BUILD - VERBOSE=1 make rivet ; printf "\n\nDEBUG: Will now dump some files to screen:\n" - printf "\n DEBUG: setup.py.in: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py.in - printf "\n DEBUG: setup.py: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py - printf "\n DEBUG: Makefile.in: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile.in - printf "\n DEBUG: Makefile: \n\n" ; cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile - printf "\n DEBUG: Done. \n" + VERBOSE=1 make rivet ; echo ; echo "DEBUG: Will now dump some files to screen:" ; echo + echo + echo "DEBUG: setup.py.in:" + echo + cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py.in + echo + echo + echo "DEBUG: setup.py:" + cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py + echo + echo + echo "DEBUG: Makefile.in:" + cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile.in + echo + echo + echo "DEBUG: Makefile:" + cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile + echo + echo + echo "DEBUG: Done. \n" # gambit_build: # runs-on: [self-hosted, macOS,x64] From ad6ccabddfe3400c24118ab1187f6dc74f0449e7 Mon Sep 17 00:00:00 2001 From: ChrisJChang <59903135+ChrisJChang@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:53:30 +0100 Subject: [PATCH 19/23] Mac x64 CI updates I changed the pip installed version of setuptools to 58.2.0. I also added explicit python paths to protect against future updates changing the default python path. --- .github/workflows/ci_Mac_x64.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 74a374502b..3a41cf8caf 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -31,7 +31,7 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. - name: Build Rivet run: | echo "Building Rivet" @@ -79,7 +79,7 @@ jobs: # echo "Configure with cmake" # cd BUILD # # Ditching a few backends that don't currently work on Mac - # cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + # cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. # - name: Build scanners # run: | # echo "Build scanners" @@ -123,7 +123,7 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build standalones run: | echo "Test the building of the standalones" @@ -152,7 +152,7 @@ jobs: # echo "Configure with cmake" # cd BUILD # # Ditching a few backends that don't currently work on Mac - # cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + # cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. # - name: Build Backends # run: | # echo "Building all Backends" @@ -183,7 +183,7 @@ jobs: # echo "Configure with cmake" # cd BUILD # # Ditching a few backends that don't currently work on Mac - # cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + # cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. # - name: Build scanners # run: | # echo "Build diver" From 869ecc9ebd2d1921bbfaa972da43d6db6cabe8f3 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Thu, 14 Dec 2023 01:07:31 +0100 Subject: [PATCH 20/23] Removed temporary debug code from ci_Mac_x64.yml. Small consistency tweaks to all CI yaml files. --- .github/workflows/ci.yml | 5 +- .github/workflows/ci_Mac_arm64.yml | 29 ++-- .github/workflows/ci_Mac_x64.yml | 264 ++++++++++++----------------- 3 files changed, 127 insertions(+), 171 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d48ba127ea..569044620c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ on: - cron: '0 5 * * *' jobs: - # A job that builds GAMBIT + scanners, tests the command-line interface # and runs a minimal test run with spartan.yaml gambit_build: @@ -229,10 +228,10 @@ jobs: make -j$(( ($(nproc)+1)/2 )) higgssignals make ATLAS_FullLikes # Build bakends needed for WC.yaml - make -j$(( ($(nproc)+1)/2 )) superiso + make superiso make -j$(( ($(nproc)+1)/2 )) heplikedata make -j$(( ($(nproc)+1)/2 )) heplike - - name: Build required Gambit bits + - name: Build Gambit run: | cd BUILD && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) gambit diff --git a/.github/workflows/ci_Mac_arm64.yml b/.github/workflows/ci_Mac_arm64.yml index 8952ec518a..622272b951 100644 --- a/.github/workflows/ci_Mac_arm64.yml +++ b/.github/workflows/ci_Mac_arm64.yml @@ -42,15 +42,15 @@ jobs: echo "Build GAMBIT." cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: Test spartan yaml - run: | - echo "Testing spartan.yaml (with cout printer)" - sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml - ./gambit -rf yaml_files/spartan.yaml - name: CLI test run: | echo "Run the test of gambit help" ./gambit -h + - name: Run spartan.yaml + run: | + echo "Testing spartan.yaml (with cout printer)" + sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml + ./gambit -rf yaml_files/spartan.yaml standalones_build: @@ -81,6 +81,7 @@ jobs: cd BUILD make standalones + backends_build: runs-on: [self-hosted, macOS, Arm64] strategy: @@ -111,6 +112,7 @@ jobs: # This replaces the "make backends" command. ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + test_runs: runs-on: [self-hosted, macOS, Arm64] strategy: @@ -133,17 +135,16 @@ jobs: echo "Configure with cmake" cd BUILD cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - - name: Build scanners + - name: Build required scanners run: | - echo "Build scanners" + echo "Build scanners required for test runs" cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) diver cmake .. - - name: Build Backends for tests + - name: Build required backends run: | - echo "Building Backends required for tests" + echo "Building backends required for test runs" cd BUILD - #make -j $(( $(sysctl -n hw.ncpu)/2 )) pythia higgssignals nulike ATLAS_FullLikes susyhit heplike superiso make pythia make higgssignals make nulike @@ -160,12 +161,12 @@ jobs: echo "Build GAMBIT." cd BUILD make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - - name: ColliderBit test + - name: Run ColliderBit_CMSSM.yaml run: | - echo "Test the ColliderBit CMSSM yaml file" + echo "Test run with ColliderBit_CMSSM.yaml" ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - name: WC test + - name: Run WC_lite.yaml run: | - echo "Test WC_lite yaml (no printing)" + echo "Test run with WC_lite.yaml (no printing)" sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml ./gambit -f yaml_files/WC_lite.yaml diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 3a41cf8caf..0a15624a5b 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -9,7 +9,7 @@ on: - cron: '0 5 * * *' jobs: - rivet_debug_test: + gambit_build: runs-on: [self-hosted, macOS,x64] strategy: fail-fast: false @@ -31,75 +31,28 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. - - name: Build Rivet + cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build scanners + run: | + echo "Build scanners" + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) scanners + cmake .. + - name: Build Gambit run: | - echo "Building Rivet" + echo "Build GAMBIT." cd BUILD - VERBOSE=1 make rivet ; echo ; echo "DEBUG: Will now dump some files to screen:" ; echo - echo - echo "DEBUG: setup.py.in:" - echo - cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py.in - echo - echo - echo "DEBUG: setup.py:" - cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/setup.py - echo - echo - echo "DEBUG: Makefile.in:" - cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile.in - echo - echo - echo "DEBUG: Makefile:" - cat /Users/gambitremotecontrol/GAMBIT/Runners/Organisation_level/actions-runner/_work/gambit/gambit/Backends/installed/rivet/3.1.5/pyext/Makefile - echo - echo - echo "DEBUG: Done. \n" + make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + - name: CLI test + run: | + echo "Run the test of gambit help" + ./gambit -h + - name: Run spartan.yaml + run: | + echo "Testing spartan.yaml (with cout printer)" + sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml + ./gambit -rf yaml_files/spartan.yaml - # gambit_build: - # runs-on: [self-hosted, macOS,x64] - # strategy: - # fail-fast: false - # matrix: - # arch: [x64] - # defaults: - # run: - # shell: bash -eo pipefail {0} - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Set up build environment - # run: | - # echo "Set up the build environment" - # mkdir -p BUILD - # cd BUILD - # - name: Configure with cmake - # run: | - # echo "Configure with cmake" - # cd BUILD - # # Ditching a few backends that don't currently work on Mac - # cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - # - name: Build scanners - # run: | - # echo "Build scanners" - # cd BUILD - # make -j $(( $(sysctl -n hw.ncpu)/2 )) scanners - # cmake .. - # - name: Build Gambit - # run: | - # echo "Build GAMBIT." - # cd BUILD - # make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - # - name: Test spartan yaml - # run: | - # echo "Testing spartan.yaml (with cout printer)" - # sed -i "" 's/ hdf5/ cout/g' yaml_files/spartan.yaml - # ./gambit -rf yaml_files/spartan.yaml - # - name: CLI test - # run: | - # echo "Run the test of gambit help" - # ./gambit -h standalones_build: runs-on: [self-hosted, macOS,x64] @@ -130,93 +83,96 @@ jobs: cd BUILD make standalones - # backends_build: - # runs-on: [self-hosted, macOS,x64] - # strategy: - # fail-fast: false - # matrix: - # arch: [x64] - # defaults: - # run: - # shell: bash -eo pipefail {0} - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Set up build environment - # run: | - # echo "Set up the build environment" - # mkdir -p BUILD - # cd BUILD - # - name: Configure with cmake - # run: | - # echo "Configure with cmake" - # cd BUILD - # # Ditching a few backends that don't currently work on Mac - # cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - # - name: Build Backends - # run: | - # echo "Building all Backends" - # cd BUILD - # # Build backends, except those that are tested via other jobs. - # # This replaces the "make backends" command. - # ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" - # test_runs: - # runs-on: [self-hosted, macOS,x64] - # strategy: - # fail-fast: false - # matrix: - # arch: [x64] - # defaults: - # run: - # shell: bash -eo pipefail {0} - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Set up build environment - # run: | - # echo "Set up the build environment" - # mkdir -p BUILD - # cd BUILD - # - name: Configure with cmake - # run: | - # echo "Configure with cmake" - # cd BUILD - # # Ditching a few backends that don't currently work on Mac - # cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. - # - name: Build scanners - # run: | - # echo "Build diver" - # cd BUILD - # make -j $(( $(sysctl -n hw.ncpu)/2 )) diver - # cmake .. - # - name: Build Backends for tests - # run: | - # echo "Building Backends required for tests" - # cd BUILD - # make pythia - # make higgssignals - # make nulike - # make ATLAS_FullLikes - # make susyhit - # make heplike - # make superiso - # make rivet - # make contur - # cmake .. - # - name: Build Gambit - # run: | - # echo "Build GAMBIT." - # cd BUILD - # make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - # - name: ColliderBit test - # run: | - # echo "Test the ColliderBit CMSSM yaml file" - # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - # - name: WC test - # run: | - # echo "Test WC_lite yaml (no printing)" - # sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml - # ./gambit -f yaml_files/WC_lite.yaml + backends_build: + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build Backends + run: | + echo "Building all Backends" + cd BUILD + # Build backends, except those that are tested via other jobs. + # This replaces the "make backends" command. + ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike" + + + test_runs: + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + - name: Build required scanners + run: | + echo "Build scanners required for test runs" + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) diver + cmake .. + - name: Build required backends + run: | + echo "Building backends required for test runs" + cd BUILD + make pythia + make higgssignals + make nulike + make ATLAS_FullLikes + make susyhit + make heplike + make superiso + make rivet + make contur + echo "Running cmake again, since this is required for ColliderBit/pythia" + cmake .. + - name: Build Gambit + run: | + echo "Build GAMBIT." + cd BUILD + make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit + - name: Run ColliderBit_CMSSM.yaml + run: | + echo "Test run with ColliderBit_CMSSM.yaml" + ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + - name: Run WC_lite.yaml + run: | + echo "Test run with WC_lite.yaml (no printing)" + sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml + ./gambit -f yaml_files/WC_lite.yaml From 2614df3eb53924a269e1a7661a7d7115ee2a2cf2 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Thu, 14 Dec 2023 10:01:01 +0100 Subject: [PATCH 21/23] Now building yoda and contur before Gambit, until we have fixed issue #467. --- .github/workflows/ci.yml | 10 ++++++++++ .github/workflows/ci_Mac_arm64.yml | 10 ++++++++++ .github/workflows/ci_Mac_x64.yml | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 569044620c..acd2939fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,11 @@ jobs: - name: Build Gambit run: | cd BUILD && . buildenv.sh + # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467 + # Can remove this once issue #467 is fixed. + make -j$(( ($(nproc)+1)/2 )) yoda + make -j$(( ($(nproc)+1)/2 )) hepmc + # Now build Gambit make -j$(( ($(nproc)+1)/2 )) gambit - name: CLI test run: | @@ -234,6 +239,11 @@ jobs: - name: Build Gambit run: | cd BUILD && . buildenv.sh + # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467 + # Can remove this once issue #467 is fixed. + make -j$(( ($(nproc)+1)/2 )) yoda + make -j$(( ($(nproc)+1)/2 )) hepmc + # Now build Gambit make -j$(( ($(nproc)+1)/2 )) gambit - name: Run ColliderBit_CMSSM.yaml run: | diff --git a/.github/workflows/ci_Mac_arm64.yml b/.github/workflows/ci_Mac_arm64.yml index 622272b951..e635cab03f 100644 --- a/.github/workflows/ci_Mac_arm64.yml +++ b/.github/workflows/ci_Mac_arm64.yml @@ -41,6 +41,11 @@ jobs: run: | echo "Build GAMBIT." cd BUILD + # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467 + # Can remove this once issue #467 is fixed. + make -j $(( $(sysctl -n hw.ncpu)/2 )) yoda + make -j $(( $(sysctl -n hw.ncpu)/2 )) hepmc + # Now build Gambit make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - name: CLI test run: | @@ -160,6 +165,11 @@ jobs: run: | echo "Build GAMBIT." cd BUILD + # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467 + # Can remove this once issue #467 is fixed. + make -j $(( $(sysctl -n hw.ncpu)/2 )) yoda + make -j $(( $(sysctl -n hw.ncpu)/2 )) hepmc + # Now build Gambit make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - name: Run ColliderBit_CMSSM.yaml run: | diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 0a15624a5b..03f0e9f0b8 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -42,6 +42,11 @@ jobs: run: | echo "Build GAMBIT." cd BUILD + # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467 + # Can remove this once issue #467 is fixed. + make -j $(( $(sysctl -n hw.ncpu)/2 )) yoda + make -j $(( $(sysctl -n hw.ncpu)/2 )) hepmc + # Now build Gambit make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - name: CLI test run: | @@ -164,6 +169,11 @@ jobs: run: | echo "Build GAMBIT." cd BUILD + # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467 + # Can remove this once issue #467 is fixed. + make -j $(( $(sysctl -n hw.ncpu)/2 )) yoda + make -j $(( $(sysctl -n hw.ncpu)/2 )) hepmc + # Now build Gambit make -j $(( $(sysctl -n hw.ncpu)/2 )) gambit - name: Run ColliderBit_CMSSM.yaml run: | From 903156587f5af2d64d8794a507a25b461e31519b Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Thu, 14 Dec 2023 10:42:05 +0100 Subject: [PATCH 22/23] Added rdynamic compiler flag to deal with symbol visibility issue. --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/ci_Mac_arm64.yml | 8 ++++---- .github/workflows/ci_Mac_x64.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acd2939fe7..1d70146681 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - name: Build scanners run: | cd BUILD/ && . buildenv.sh @@ -115,7 +115,7 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - name: Build standalones run: | cd BUILD && . buildenv.sh @@ -164,7 +164,7 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - name: Build backends run: | cd BUILD && . buildenv.sh @@ -214,7 +214,7 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit" + cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit" - name: Build required scanners run: | cd BUILD/ && . buildenv.sh diff --git a/.github/workflows/ci_Mac_arm64.yml b/.github/workflows/ci_Mac_arm64.yml index e635cab03f..0b0fd76527 100644 --- a/.github/workflows/ci_Mac_arm64.yml +++ b/.github/workflows/ci_Mac_arm64.yml @@ -30,7 +30,7 @@ jobs: run: | echo "Configure with cmake" cd BUILD - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build scanners run: | echo "Build scanners" @@ -79,7 +79,7 @@ jobs: run: | echo "Configure with cmake" cd BUILD - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build standalones run: | echo "Test the building of the standalones" @@ -108,7 +108,7 @@ jobs: run: | echo "Configure with cmake" cd BUILD - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build Backends run: | echo "Building all Backends" @@ -139,7 +139,7 @@ jobs: run: | echo "Configure with cmake" cd BUILD - cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build required scanners run: | echo "Build scanners required for test runs" diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 03f0e9f0b8..90e8d05812 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -31,7 +31,7 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build scanners run: | echo "Build scanners" @@ -81,7 +81,7 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build standalones run: | echo "Test the building of the standalones" @@ -111,7 +111,7 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build Backends run: | echo "Building all Backends" @@ -143,7 +143,7 @@ jobs: echo "Configure with cmake" cd BUILD # Ditching a few backends that don't currently work on Mac - cmake -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit;micromegas_DMsimpVectorMedVectorDM" .. - name: Build required scanners run: | echo "Build scanners required for test runs" From 33eb1c100ab37ab053e73fa4b915537e088a171c Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Thu, 14 Dec 2023 13:36:29 +0100 Subject: [PATCH 23/23] Set order of CI jobs: gambit_build, backends_build, test_runs, standalones_build. --- .github/workflows/ci.yml | 100 +++++++++++++++-------------- .github/workflows/ci_Mac_arm64.yml | 64 +++++++++--------- .github/workflows/ci_Mac_x64.yml | 64 +++++++++--------- 3 files changed, 122 insertions(+), 106 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d70146681..7a2144e64f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,57 +75,12 @@ jobs: ./gambit -rf yaml_files/spartan.yaml - # A job that builds all the standalones - standalones_build: - runs-on: [docker, self-hosted] - strategy: - fail-fast: false - matrix: - arch: [ubuntu] #, ubuntu-py2, fedora - #mpi: [ON, OFF] - container: gambitbsm/gambit-base:${{ matrix.arch }} - defaults: - run: - shell: bash -eo pipefail {0} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up build environment - run: | - mkdir -p BUILD - cd BUILD - echo "Sourcing setup.sh" - cat /etc/profile.d/gambit-setup.sh - source /etc/profile.d/gambit-setup.sh - echo "Making buildenv.sh" - > buildenv.sh - echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh - echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh - echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh - echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh - echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh - PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') - PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') - echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh - echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh - echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh - echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh - cat buildenv.sh - pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 - - name: Configure with cmake - run: | - cd BUILD/ && . buildenv.sh - cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - - name: Build standalones - run: | - cd BUILD && . buildenv.sh - make standalones - - # A job that tests the builds for all backends in the "make backends" target. # Backends that are anyway tested as part of the "test_runs" job can be skipped, # see the build_backends.sh command below. backends_build: + if: ${{ always() }} + needs: [gambit_build] # Sets run order runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -176,6 +131,8 @@ jobs: # A job for GAMBIT test runs. Only those GAMBIT modules, scanners and backends # required by the test runs are built. test_runs: + if: ${{ always() }} + needs: [gambit_build, backends_build] # Sets run order runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -255,6 +212,55 @@ jobs: ./gambit -rf yaml_files/WC.yaml + # A job that builds all the standalones + standalones_build: + if: ${{ always() }} + needs: [gambit_build, backends_build, test_runs] # Sets run order + runs-on: [docker, self-hosted] + strategy: + fail-fast: false + matrix: + arch: [ubuntu] #, ubuntu-py2, fedora + #mpi: [ON, OFF] + container: gambitbsm/gambit-base:${{ matrix.arch }} + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + mkdir -p BUILD + cd BUILD + echo "Sourcing setup.sh" + cat /etc/profile.d/gambit-setup.sh + source /etc/profile.d/gambit-setup.sh + echo "Making buildenv.sh" + > buildenv.sh + echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh + echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh + echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh + echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh + echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh + PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') + PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') + echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh + echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh + echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh + echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh + cat buildenv.sh + pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 + - name: Configure with cmake + run: | + cd BUILD/ && . buildenv.sh + cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + - name: Build standalones + run: | + cd BUILD && . buildenv.sh + make standalones + + # - name: Validation dependencies # run: | # . BUILD/buildenv.sh diff --git a/.github/workflows/ci_Mac_arm64.yml b/.github/workflows/ci_Mac_arm64.yml index 0b0fd76527..391e2c0dc5 100644 --- a/.github/workflows/ci_Mac_arm64.yml +++ b/.github/workflows/ci_Mac_arm64.yml @@ -58,36 +58,9 @@ jobs: ./gambit -rf yaml_files/spartan.yaml - standalones_build: - runs-on: [self-hosted, macOS, Arm64] - strategy: - fail-fast: false - matrix: - arch: [Arm64] - defaults: - run: - shell: bash -eo pipefail {0} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up build environment - run: | - echo "Set up the build environment" - mkdir -p BUILD - cd BUILD - - name: Configure with cmake - run: | - echo "Configure with cmake" - cd BUILD - cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - - name: Build standalones - run: | - echo "Test the building of the standalones" - cd BUILD - make standalones - - backends_build: + if: ${{ always() }} + needs: [gambit_build] # Sets run order runs-on: [self-hosted, macOS, Arm64] strategy: fail-fast: false @@ -119,6 +92,8 @@ jobs: test_runs: + if: ${{ always() }} + needs: [gambit_build, backends_build] # Sets run order runs-on: [self-hosted, macOS, Arm64] strategy: fail-fast: false @@ -180,3 +155,34 @@ jobs: echo "Test run with WC_lite.yaml (no printing)" sed -i "" 's/ hdf5/ none/g' yaml_files/WC_lite.yaml ./gambit -f yaml_files/WC_lite.yaml + + + standalones_build: + if: ${{ always() }} + needs: [gambit_build, backends_build, test_runs] # Sets run order + runs-on: [self-hosted, macOS, Arm64] + strategy: + fail-fast: false + matrix: + arch: [Arm64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build standalones + run: | + echo "Test the building of the standalones" + cd BUILD + make standalones diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 90e8d05812..0a16fe27ac 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -59,37 +59,9 @@ jobs: ./gambit -rf yaml_files/spartan.yaml - standalones_build: - runs-on: [self-hosted, macOS,x64] - strategy: - fail-fast: false - matrix: - arch: [x64] - defaults: - run: - shell: bash -eo pipefail {0} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up build environment - run: | - echo "Set up the build environment" - mkdir -p BUILD - cd BUILD - - name: Configure with cmake - run: | - echo "Configure with cmake" - cd BUILD - # Ditching a few backends that don't currently work on Mac - cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - - name: Build standalones - run: | - echo "Test the building of the standalones" - cd BUILD - make standalones - - backends_build: + if: ${{ always() }} + needs: [gambit_build] # Sets run order runs-on: [self-hosted, macOS,x64] strategy: fail-fast: false @@ -122,6 +94,8 @@ jobs: test_runs: + if: ${{ always() }} + needs: [gambit_build, backends_build] # Sets run order runs-on: [self-hosted, macOS,x64] strategy: fail-fast: false @@ -186,3 +160,33 @@ jobs: ./gambit -f yaml_files/WC_lite.yaml + standalones_build: + if: ${{ always() }} + needs: [gambit_build, backends_build, test_runs] # Sets run order + runs-on: [self-hosted, macOS,x64] + strategy: + fail-fast: false + matrix: + arch: [x64] + defaults: + run: + shell: bash -eo pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up build environment + run: | + echo "Set up the build environment" + mkdir -p BUILD + cd BUILD + - name: Configure with cmake + run: | + echo "Configure with cmake" + cd BUILD + # Ditching a few backends that don't currently work on Mac + cmake -DCMAKE_CXX_FLAGS="-rdynamic" -DWITH_MPI=ON -DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: Build standalones + run: | + echo "Test the building of the standalones" + cd BUILD + make standalones