diff --git a/WL_list.md b/WL_list.md index bb8de385c963d4f8192a776b00add43a1fa5a866..22f849b96862abac4f7a8fe5f4ab5e7b6ad6c7e2 100644 --- a/WL_list.md +++ b/WL_list.md @@ -21,23 +21,24 @@ where: | Experiment | WL repo | SIF image registry | Docker image registry| Latest Built Version | Latest Pipeline status | Unpacked container size | | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -| alice | [digi-reco-core-run3-ma][alice_digi-reco-core-run3-ma_code] | [click for link][alice_digi-reco-core-run3-ma_sif] | [click for link][alice_digi-reco-core-run3-ma_img] | [v3.0][alice_digi-reco-core-run3-ma_pipelink] | ![ci][alice_digi-reco-core-run3-ma_pipeline]| 16G | -| atlas | [gen_sherpa-ma][atlas_gen_sherpa-ma_code] | [click for link][atlas_gen_sherpa-ma_sif] | [click for link][atlas_gen_sherpa-ma_img] | [v2.2][atlas_gen_sherpa-ma_pipelink] | ![ci][atlas_gen_sherpa-ma_pipeline]| 22G | -| atlas | [reco_mt-ma][atlas_reco_mt-ma_code] | [click for link][atlas_reco_mt-ma_sif] | [click for link][atlas_reco_mt-ma_img] | [v2.3][atlas_reco_mt-ma_pipelink] | ![ci][atlas_reco_mt-ma_pipeline]| 22G | -| atlas | [sim_mt-ma][atlas_sim_mt-ma_code] | [click for link][atlas_sim_mt-ma_sif] | [click for link][atlas_sim_mt-ma_img] | [v2.1][atlas_sim_mt-ma_pipelink] | ![ci][atlas_sim_mt-ma_pipeline]| 20G | -| belle2 | [gen-sim-reco-ma][belle2_gen-sim-reco-ma_code] | [click for link][belle2_gen-sim-reco-ma_sif] | [click for link][belle2_gen-sim-reco-ma_img] | [v2.2][belle2_gen-sim-reco-ma_pipelink] | ![ci][belle2_gen-sim-reco-ma_pipeline]| 3.4G | -| cms | [digi-run3-ma][cms_digi-run3-ma_code] | [click for link][cms_digi-run3-ma_sif] | [click for link][cms_digi-run3-ma_img] | [v1.1][cms_digi-run3-ma_pipelink] | ![ci][cms_digi-run3-ma_pipeline]| 5.8G | -| cms | [flowsim][cms_flowsim_code] | [click for link][cms_flowsim_sif] | [click for link][cms_flowsim_img] | [ci-v0.1][cms_flowsim_pipelink] | ![ci][cms_flowsim_pipeline]| 8.4G | -| cms | [gen-sim-run3-ma][cms_gen-sim-run3-ma_code] | [click for link][cms_gen-sim-run3-ma_sif] | [click for link][cms_gen-sim-run3-ma_img] | [v1.1][cms_gen-sim-run3-ma_pipelink] | ![ci][cms_gen-sim-run3-ma_pipeline]| 6.2G | -| cms | [hlt-ma][cms_hlt-ma_code] | [click for link][cms_hlt-ma_sif] | [click for link][cms_hlt-ma_img] | [v0.2][cms_hlt-ma_pipelink] | ![ci][cms_hlt-ma_pipeline]| 19G | -| cms | [mlpf][cms_mlpf_code] | [click for link][cms_mlpf_sif] | [click for link][cms_mlpf_img] | [ci-v0.4][cms_mlpf_pipelink] | ![ci][cms_mlpf_pipeline]| 7.6G | -| cms | [reco-run3-ma][cms_reco-run3-ma_code] | [click for link][cms_reco-run3-ma_sif] | [click for link][cms_reco-run3-ma_img] | [v1.2][cms_reco-run3-ma_pipelink] | ![ci][cms_reco-run3-ma_pipeline]| 6.5G | -| hello | [world-c7-ma][hello_world-c7-ma_code] | [click for link][hello_world-c7-ma_sif] | [click for link][hello_world-c7-ma_img] | [v1.0][hello_world-c7-ma_pipelink] | ![ci][hello_world-c7-ma_pipeline]| 759M | -| hello | [world-cs8-ma][hello_world-cs8-ma_code] | [click for link][hello_world-cs8-ma_sif] | [click for link][hello_world-cs8-ma_img] | [ci-v1.0][hello_world-cs8-ma_pipelink] | ![ci][hello_world-cs8-ma_pipeline]| 518M | -| igwn | [pe][igwn_pe_code] | [click for link][igwn_pe_sif] | [click for link][igwn_pe_img] | [v0.5][igwn_pe_pipelink] | ![ci][igwn_pe_pipeline]| 2.9G | -| juno | [gen-sim-reco][juno_gen-sim-reco_code] | [click for link][juno_gen-sim-reco_sif] | [click for link][juno_gen-sim-reco_img] | [v3.1][juno_gen-sim-reco_pipelink] | ![ci][juno_gen-sim-reco_pipeline]| 3.3G | -| lhcb | [sim-run3-ma][lhcb_sim-run3-ma_code] | [click for link][lhcb_sim-run3-ma_sif] | [click for link][lhcb_sim-run3-ma_img] | [v1.1][lhcb_sim-run3-ma_pipelink] | ![ci][lhcb_sim-run3-ma_pipeline]| 5.4G | -| mg5amc | [madgraph4gpu-2022][mg5amc_madgraph4gpu-2022_code] | [click for link][mg5amc_madgraph4gpu-2022_sif] | [click for link][mg5amc_madgraph4gpu-2022_img] | [ci-v0.10][mg5amc_madgraph4gpu-2022_pipelink] | ![ci][mg5amc_madgraph4gpu-2022_pipeline]| 11G | +| alice | [digi-reco-core-run3-ma][alice_digi-reco-core-run3-ma_code] | [click for link][alice_digi-reco-core-run3-ma_sif] | [click for link][alice_digi-reco-core-run3-ma_img] | [v3.0][alice_digi-reco-core-run3-ma_pipelink] | ![ci][alice_digi-reco-core-run3-ma_pipeline]| 16G | +| atlas | [gen_sherpa-ma][atlas_gen_sherpa-ma_code] | [click for link][atlas_gen_sherpa-ma_sif] | [click for link][atlas_gen_sherpa-ma_img] | [v2.2][atlas_gen_sherpa-ma_pipelink] | ![ci][atlas_gen_sherpa-ma_pipeline]| 22G | +| atlas | [reco_mt-ma][atlas_reco_mt-ma_code] | [click for link][atlas_reco_mt-ma_sif] | [click for link][atlas_reco_mt-ma_img] | [v2.3][atlas_reco_mt-ma_pipelink] | ![ci][atlas_reco_mt-ma_pipeline]| 22G | +| atlas | [sim_mt-ma][atlas_sim_mt-ma_code] | [click for link][atlas_sim_mt-ma_sif] | [click for link][atlas_sim_mt-ma_img] | [v2.1][atlas_sim_mt-ma_pipelink] | ![ci][atlas_sim_mt-ma_pipeline]| 20G | +| belle2 | [gen-sim-reco-ma][belle2_gen-sim-reco-ma_code] | [click for link][belle2_gen-sim-reco-ma_sif] | [click for link][belle2_gen-sim-reco-ma_img] | [v2.2][belle2_gen-sim-reco-ma_pipelink] | ![ci][belle2_gen-sim-reco-ma_pipeline]| 3.4G | +| cms | [digi-run3-ma][cms_digi-run3-ma_code] | [click for link][cms_digi-run3-ma_sif] | [click for link][cms_digi-run3-ma_img] | [v1.1][cms_digi-run3-ma_pipelink] | ![ci][cms_digi-run3-ma_pipeline]| 5.8G | +| cms | [flowsim][cms_flowsim_code] | [click for link][cms_flowsim_sif] | [click for link][cms_flowsim_img] | [ci-v0.1][cms_flowsim_pipelink] | ![ci][cms_flowsim_pipeline]| 8.4G | +| cms | [gen-sim-run3-ma][cms_gen-sim-run3-ma_code] | [click for link][cms_gen-sim-run3-ma_sif] | [click for link][cms_gen-sim-run3-ma_img] | [v1.1][cms_gen-sim-run3-ma_pipelink] | ![ci][cms_gen-sim-run3-ma_pipeline]| 6.2G | +| cms | [hlt-ma][cms_hlt-ma_code] | [click for link][cms_hlt-ma_sif] | [click for link][cms_hlt-ma_img] | [v0.2][cms_hlt-ma_pipelink] | ![ci][cms_hlt-ma_pipeline]| 19G | +| cms | [mlpf][cms_mlpf_code] | [click for link][cms_mlpf_sif] | [click for link][cms_mlpf_img] | [ci-v0.4][cms_mlpf_pipelink] | ![ci][cms_mlpf_pipeline]| 7.6G | +| cms | [reco-run3-ma][cms_reco-run3-ma_code] | [click for link][cms_reco-run3-ma_sif] | [click for link][cms_reco-run3-ma_img] | [v1.2][cms_reco-run3-ma_pipelink] | ![ci][cms_reco-run3-ma_pipeline]| 6.5G | +| gen | [pepper-ma][gen_pepper-ma_code] | [click for link][gen_pepper-ma_sif] | [click for link][gen_pepper-ma_img] | [ci-v1.0][gen_pepper-ma_pipelink] | ![ci][gen_pepper-ma_pipeline]| 1.1G | +| hello | [world-c7-ma][hello_world-c7-ma_code] | [click for link][hello_world-c7-ma_sif] | [click for link][hello_world-c7-ma_img] | [v1.0][hello_world-c7-ma_pipelink] | ![ci][hello_world-c7-ma_pipeline]| 759M | +| hello | [world-cs8-ma][hello_world-cs8-ma_code] | [click for link][hello_world-cs8-ma_sif] | [click for link][hello_world-cs8-ma_img] | [ci-v1.0][hello_world-cs8-ma_pipelink] | ![ci][hello_world-cs8-ma_pipeline]| 518M | +| igwn | [pe][igwn_pe_code] | [click for link][igwn_pe_sif] | [click for link][igwn_pe_img] | [v0.5][igwn_pe_pipelink] | ![ci][igwn_pe_pipeline]| 2.9G | +| juno | [gen-sim-reco][juno_gen-sim-reco_code] | [click for link][juno_gen-sim-reco_sif] | [click for link][juno_gen-sim-reco_img] | [v3.1][juno_gen-sim-reco_pipelink] | ![ci][juno_gen-sim-reco_pipeline]| 3.3G | +| lhcb | [sim-run3-ma][lhcb_sim-run3-ma_code] | [click for link][lhcb_sim-run3-ma_sif] | [click for link][lhcb_sim-run3-ma_img] | [v1.1][lhcb_sim-run3-ma_pipelink] | ![ci][lhcb_sim-run3-ma_pipeline]| 5.4G | +| mg5amc | [madgraph4gpu-2022][mg5amc_madgraph4gpu-2022_code] | [click for link][mg5amc_madgraph4gpu-2022_sif] | [click for link][mg5amc_madgraph4gpu-2022_img] | [ci-v0.10][mg5amc_madgraph4gpu-2022_pipelink] | ![ci][mg5amc_madgraph4gpu-2022_pipeline]| 11G | [alice_digi-reco-core-run3-ma_code]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/-/blob/master/alice/digi-reco-core-run3-ma/alice-digi-reco-core-run3-ma [alice_digi-reco-core-run3-ma_sif]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads-sif/container_registry/?search%5B%5D=alice-digi-reco-core-run3-ma-bmk @@ -105,6 +106,12 @@ where: [cms_reco-run3-ma_pipelink]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/-/pipelines/6452700 [cms_reco-run3-ma_pipeline]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/badges/qa-build-cms-reco-run3-ma/pipeline.svg +[gen_pepper-ma_code]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/-/blob/master/gen/pepper-ma/gen-pepper-ma +[gen_pepper-ma_sif]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads-sif/container_registry/?search%5B%5D=gen-pepper-ma-bmk +[gen_pepper-ma_img]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/container_registry/?search%5B%5D=gen-pepper-ma-bmk +[gen_pepper-ma_pipelink]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/-/pipelines/10405484 +[gen_pepper-ma_pipeline]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/badges/qa-build-gen-pepper-ma/pipeline.svg + [hello_world-c7-ma_code]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/-/blob/master/hello/world-c7-ma/hello-world-c7-ma [hello_world-c7-ma_sif]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads-sif/container_registry/?search%5B%5D=hello-world-c7-ma-bmk [hello_world-c7-ma_img]: https://gitlab.cern.ch/hep-benchmarks/hep-workloads/container_registry/?search%5B%5D=hello-world-c7-ma-bmk diff --git a/build-executor/utility.sh b/build-executor/utility.sh index 4bf5508aa2baf0b44595d58bb85dbc1d491bb244..c0cdbea425aaffae95bb00f636c544e85cd8fed4 100644 --- a/build-executor/utility.sh +++ b/build-executor/utility.sh @@ -483,14 +483,14 @@ function test_singularity_from_registry(){ theimage=oras://${CIENV_SINGULARITYREGISTRY}/${HEPWL_DOCKERIMAGENAME}:${thetag} echo -e "\n[test_singularity_from_registry] Run WL in singularity to test the image ${theimage}" [ ! -e ${CIENV_JOBDIR}/results ] && mkdir -p ${CIENV_JOBDIR}/results && chmod a+rw ${CIENV_JOBDIR}/results - execute_command_retry singularity run -e -C $USEGPU -B ${CIENV_JOBDIR}/results:/results ${theimage} $HEPWL_BMKOPTS -d + execute_command_retry singularity run --no-privs -e -C $USEGPU -B ${CIENV_JOBDIR}/results:/results ${theimage} $HEPWL_BMKOPTS -d status=$? echo -e "\n[test_singularity_from_registry] Run WL in singularity (to test the image) via execute_command_retry - completed (status=$status)" if [ $status -ne 0 ]; then rm -f ${theimage}.sif; fail "[test_singularity_from_registry] Run WL in singularity"; fi - execute_command_retry singularity run -e -C $USEGPU -B ${CIENV_JOBDIR}/results:/results ${theimage} $HEPWL_BMKOPTS -h > x86_image_folder_dump.txt + execute_command_retry singularity run --no-privs -e -C $USEGPU -B ${CIENV_JOBDIR}/results:/results ${theimage} $HEPWL_BMKOPTS -h > x86_image_folder_dump.txt echo "[test_singularity_from_registry] finished at $(date)" echo -e "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" echo -e "\n[utility.sh] ${FUNCNAME[0]} finished at $(date)\n" diff --git a/common/install.sh b/common/install.sh index 79d2c3fb301d38481480ce6feef533b93e7b2989..dafc6f57587ec1fb6d7b625e01b09c3df8a9f18d 100755 --- a/common/install.sh +++ b/common/install.sh @@ -26,10 +26,16 @@ function install_prmon(){ # do not for slc6 because of BMK-671 +yum makecache --refresh + yum repolist if [ `grep -c "Scientific Linux CERN" /etc/redhat-release` -ne 1 ]; then yum install -y centos-release epel-release ; - yum install -y unzip bzip2 which man file util-linux gcc wget tar freetype perl jq python-pip && + the_python_pip=python3-pip + if [ `grep -c "CentOS Linux" /etc/redhat-release` -eq 1 ]; then + the_python_pip=python-pip + fi + yum install -y unzip bzip2 which man file util-linux gcc wget tar freetype perl jq ${the_python_pip} && yum clean all; fi diff --git a/gen/pepper-ma/CHANGELOG.md b/gen/pepper-ma/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..2ae90db1610909ad29178b0eaf8257bc36139f36 --- /dev/null +++ b/gen/pepper-ma/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog for Monte Carlo Generator Pepper + +## [Unreleased] + + diff --git a/gen/pepper-ma/Dockerfile.append b/gen/pepper-ma/Dockerfile.append new file mode 100644 index 0000000000000000000000000000000000000000..c0c3ed2cb38f5d539024e6f4f75812b2871e70f3 --- /dev/null +++ b/gen/pepper-ma/Dockerfile.append @@ -0,0 +1,23 @@ +# Add here any workload-specific Dockerfile instructions. +# They will be appended to the Dockerfile generated from a common template. + +# Pepper dependencies +RUN dnf install -y gcc-c++ git cmake openmpi openmpi-devel \ + lhapdf-devel python3-lhapdf hdf5 hdf5-openmpi hdf5-openmpi-devel python3-h5py + +RUN dnf clean all + +RUN lhapdf install NNPDF30_nlo_as_0118 + +RUN git clone --branch native --depth 2 https://gitlab.com/spice-mc/pepper.git pepper-native +RUN <<EOF +export PATH=/usr/lib64/openmpi/bin:$PATH +export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH + +cd pepper-native +cmake -S . -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="/usr/local" \ + -DPEPPER_VCL_DISABLED=1 +cmake --build build -j --target install +EOF \ No newline at end of file diff --git a/gen/pepper-ma/gen-pepper-ma.spec b/gen/pepper-ma/gen-pepper-ma.spec new file mode 100644 index 0000000000000000000000000000000000000000..cb67c61265cff1b73c18a47401dda8616a9d6d1d --- /dev/null +++ b/gen/pepper-ma/gen-pepper-ma.spec @@ -0,0 +1,10 @@ +HEPWL_BMKEXE=gen-pepper-ma-bmk.sh +HEPWL_BMKOPTS="-c 2 -t 2 -m none --extra-args '--process=g_g__g_g --taskset -b 4'" +HEPWL_BMKDIR=gen-pepper-ma +HEPWL_BMKDESCRIPTION="Monte Carlo Generator Pepper" +HEPWL_DOCKERIMAGENAME=gen-pepper-ma-bmk +HEPWL_DOCKERIMAGETAG=ci-v1.0 +HEPWL_CVMFSREPOS=NONE +HEPWL_EXTEND_SFT_SPEC="" +HEPWL_BMKOS="gitlab-registry.cern.ch/linuxsupport/alma9-base:20250108-1" +HEPWL_BUILDARCH="x86_64,aarch64" diff --git a/gen/pepper-ma/gen-pepper-ma/DESCRIPTION b/gen/pepper-ma/gen-pepper-ma/DESCRIPTION new file mode 100644 index 0000000000000000000000000000000000000000..2119a41a21189abce4fd2f8e8f410fd61b66041e --- /dev/null +++ b/gen/pepper-ma/gen-pepper-ma/DESCRIPTION @@ -0,0 +1,30 @@ +Runs the Pepper program with MPI (mpiexec) and optional CPU core binding (taskset). +Pepper: https://gitlab.com/spice-mc/pepper + +**PEPPER (Portable Engine for the Production of Parton-level Event Records)** +is a highly efficient parton-level event generator used to simulate high-energy physics processes at colliders such as the LHC. + +### Configuration via EXTRA_ARGS +In addition to standard commands, Pepper can be customized using the `EXTRA_ARGS` environment variable. + +#### Available Options (via EXTRA_ARGS): + --taskset Enable CPU core binding using 'taskset' to restrict execution to specific cores. + --process <name> (-p) Define the process type for Pepper. Default: "g_g__g_g". + --gpus <N> (-g) Specify the number of GPUs (currently unused). + --batches <N> (-b) Specify the number of batches for the simulation. + +#### Examples: + `EXTRA_ARGS="--taskset"` + Enables CPU core binding. + + `EXTRA_ARGS="--process 'special_case'"` + Runs Pepper with a custom process type. + + `EXTRA_ARGS="--taskset --process 'custom_proc'"` + Uses `taskset` and a custom process. + + `EXTRA_ARGS="--gpus 2"` + Specifies 2 GPUs (not yet implemented). + + `EXTRA_ARGS="--batches 100"` + Sets the number of batches for the simulation to 100. \ No newline at end of file diff --git a/gen/pepper-ma/gen-pepper-ma/gen-pepper-ma-bmk.sh b/gen/pepper-ma/gen-pepper-ma/gen-pepper-ma-bmk.sh new file mode 100755 index 0000000000000000000000000000000000000000..a32ca25909d15ac8e401aa4c537f177596d07aa7 --- /dev/null +++ b/gen/pepper-ma/gen-pepper-ma/gen-pepper-ma-bmk.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +# Copyright 2019-2020 CERN. See the COPYRIGHT file at the top-level +# directory of this distribution. For licensing information, see the +# COPYING file at the top-level directory of this distribution. + +#set -x # enable debug printouts + +#set -e # immediate exit on error + +# Function doOne must be defined in each benchmark +# Input argument $1: process index (between 1 and $NCOPIES) +# Return value: please return 0 if this workload copy was successful, 1 otherwise +# The following variables are guaranteed to be defined and exported: NCOPIES, NTHREADS, NEVENTS_THREAD, BMKDIR, DEBUG +# The function is started in process-specific working directory <basewdir>/proc_$1: +# please store here the individual log files for each of the NCOPIES processes +function doOne(){ + if [ "$1" == "" ] || [ "$2" != "" ]; then echo "[doOne] ERROR! Invalid arguments '$@' to doOne"; return 1; fi + VAR_DOONE_1=$1 + VAR_DOONE_2=$2 + + echo "[doOne (${VAR_DOONE_1})] $(date) starting in $(pwd)" + + NGPUS=0 + USE_TASKSET=0 + PEPPER_PROCESS="g_g__g_g" + NUMBER_OF_BATCHES=4 + + if [[ "EXTRA_ARGS" != "" ]]; then + echo "[doOne (${VAR_DOONE_1})] EXTRA_ARGS=$EXTRA_ARGS" + # parse extra args if any + options=$(getopt -a -n gen-pepper-ma-bmk -o g:p:b: --long taskset,process:,gpus:,batches: -- $EXTRA_ARGS) + echo "options $options" + eval set -- "$options" + while [[ $# -gt 0 ]]; do + case "$1" in + --taskset ) USE_TASKSET=1; shift;; + --process | -p ) PEPPER_PROCESS="$2"; shift 2;; + --gpus | -g ) NGPUS="$2"; shift 2;; + --batches | -b ) NUMBER_OF_BATCHES="$2"; shift 2;; # New batches parameter + -- ) shift; break;; + * ) break ;; # Handle unexpected arguments safely + esac + done + + echo "[doOne (${VAR_DOONE_1})] USE_TASKSET=${USE_TASKSET}" + echo "[doOne (${VAR_DOONE_1})] PEPPER_PROCESS=${PEPPER_PROCESS}" + echo "[doOne (${VAR_DOONE_1})] NGPUS=${NGPUS}" + echo "[doOne (${VAR_DOONE_1})] number_of_batches=${NUMBER_OF_BATCHES}" + + fi + + # Here start the process of grouping the cores from 0 to nproc-1 + # in groups of NTHREADS cores, in case the TASKSET option is used + COPY=${VAR_DOONE_1} + RANK=$((COPY - 1)) + LOWERCPU=$((RANK * NTHREADS)) + UPPERCPU=$((COPY * NTHREADS - 1)) + + PEPPER_COMMAND="/usr/local/bin/pepper -p ${PEPPER_PROCESS} -b $(( $NEVENTS_THREAD * $NTHREADS)) -n ${NUMBER_OF_BATCHES} > out_${VAR_DOONE_1}.log 2>&1" + + # NB + # --allow-run-as-root is needed because in singularity the user seen inside the container + # is not the container's user (bmkuser) but the host user, that could be root + COMMAND="mpiexec --allow-run-as-root -n $NTHREADS ${PEPPER_COMMAND}" + + # optionally use taskset to constrain to physical CPU cores (only relevant when not using the full machine) + if [[ "${USE_TASKSET}" == "1" ]]; then + COMMAND="mpiexec --allow-run-as-root -n $NTHREADS taskset -c ${LOWERCPU}-${UPPERCPU} ${PEPPER_COMMAND}" + fi + + echo "[doOne (${VAR_DOONE_1})] $(date) going to execute command: ${COMMAND}" + eval ${COMMAND} + status=${?} + echo "[doOne (${VAR_DOONE_1})] $(date) completed (status=$status)" + # Return 0 if this workload copy was successful, 1 otherwise + return $status +} + + +export PATH=/usr/lib64/openmpi/bin:$PATH +export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH + +# Default values for NCOPIES, NTHREADS, NEVENTS_THREAD must be set in each benchmark +NEVENTS_THREAD=10000 +NTHREADS=4 +NCOPIES=$(( `nproc` / $NTHREADS )) + +# Source the common benchmark driver +if [ -f $(dirname $0)/bmk-driver.sh ]; then + . $(dirname $0)/bmk-driver.sh +else + . $(dirname $0)/../../../common/bmk-driver.sh +fi diff --git a/gen/pepper-ma/gen-pepper-ma/parseResults.sh b/gen/pepper-ma/gen-pepper-ma/parseResults.sh new file mode 100644 index 0000000000000000000000000000000000000000..4d3877b02d8ad248d33bb101799f7155e3c2edc3 --- /dev/null +++ b/gen/pepper-ma/gen-pepper-ma/parseResults.sh @@ -0,0 +1,43 @@ +# Copyright 2019-2020 CERN. See the COPYRIGHT file at the top-level +# directory of this distribution. For licensing information, see the +# COPYING file at the top-level directory of this distribution. + +parseResultsDir=$(cd $(dirname ${BASH_SOURCE}); pwd) # needed to locate parseResults.py + +# Function parseResults must be defined in each benchmark (or in a separate file parseResults.sh) +# The following variables are guaranteed to be defined and exported: NCOPIES, NTHREADS, NEVENTS_THREAD, BMKDIR, DEBUG, APP +# Logfiles have been stored in process-specific working directories <basewdir>/proc_<1...NCOPIES> +# The function is started in the base working directory <basewdir>: +# please store here the overall json summary file for all NCOPIES processes combined +function parseResults(){ + echo "[parseResults] current directory: $(pwd)" + # #----------------------- + # Parse results (bash) + #----------------------- + echo "[parseResults] bash parser starting" + # Parsing Event Throughput: xxxx ev/s + + grep_string="Time per event:" + sed_string="s@[^:]*: -> Time per event: [0-9\.]*e[0-9\-]*s (\([0-9\.]*e[0-9\-\+]*\) events per hour.*@\1@" + + res_score=`grep -H "${grep_string}" proc_*/out_*.log | sed -e "${sed_string}" | awk 'BEGIN{sum=0;} { val=$1/3600.; sum+=val; } END{printf "{\"gen\": %.4f}", sum}' || (echo "{}"; return 1)` + STATUS_1=$? + + res_stat=`grep -H "${grep_string}" proc_*/out_*.log | sed -e "${sed_string}" | awk 'BEGIN{amin=1000000;amax=0;count=0;sum=0;} { val=$1/3600.; a[count]=val; count+=1; sum+=val; if(amax<val) amax=val; if(amin>val) amin=val} END{n = asort(a); if (n % 2) { median=a[(n + 1) / 2]; } else {median=(a[(n / 2)] + a[(n / 2) + 1]) / 2.0;}; printf "{\"avg\": %.4f, \"median\": %.4f, \"min\": %.4f, \"max\": %.4f, \"count\": %d}", sum/count, median, amin, amax, count}' || (echo "{}"; return 1)` + STATUS_2=$? + + [[ "$STATUS_1" == "0" ]] && [[ "$STATUS_2" == "0" ]] + STATUS=$? + echo "[parseResults] parsing completed (status=$STATUS)" + [[ "$STATUS" != "0" ]] && return $STATUS + #----------------------- + # Generate summary + #----------------------- + echo "[parseResults] generate report" + resJSON="{\"wl-scores\": $res_score, \"wl-stats\": $res_stat }" + echo "$resJSON" > $baseWDir/parser_output.json + #----------------------- + # Return status + #----------------------- + return $shstatus +}