Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci test3 #11

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ locmap --enable cvmfs
locmap --configure all
```

## Docker
## Singularity/Apptainer

```
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin

usermod -aG docker runner
Run `cmssw-xxx` commands from `/cvmfs/cms.cern.ch/common`.

systemctl enable --now docker.service
```
dnf install apptainer
```

## Gitlab runner
Expand Down
25 changes: 17 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,23 @@ jobs:
strategy:
matrix:
proc: [hvq]
cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1]
cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1, CMSSW_13_0_13, CMSSW_13_3_0]
include:
- cmssw_release: CMSSW_10_6_30
scram_arch: slc7_amd64_gcc700
os: cc7
- cmssw_release: CMSSW_11_0_1
scram_arch: slc7_amd64_gcc820
os: cc7
- cmssw_release: CMSSW_12_3_1
scram_arch: slc7_amd64_gcc10
os: cc7
- cmssw_release: CMSSW_13_0_13
scram_arch: el8_amd64_gcc11
os: el8
- cmssw_release: CMSSW_13_3_0
scram_arch: el8_amd64_gcc12
os: el8
fail-fast: false
# The type of runner that the job will run on
runs-on: [self-hosted, linux, x64]
Expand All @@ -51,8 +60,8 @@ jobs:
rm -rf ./.??* || true
ls -la ./
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand All @@ -62,19 +71,19 @@ jobs:
- '.github/workflows/**'
- name: Build gridpack
if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true'
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 5
timeout_minutes: 60
retry_on_exit_code: 111 # failed CMSSW setup, likely due to cvmfs connectivity
command: docker run --rm -v /cvmfs:/cvmfs -v $PWD:$PWD -w $PWD gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.scram_arch }} -p ${{ matrix.proc }}
command: /cvmfs/cms.cern.ch/common/cmssw-${{ matrix.os }} -- bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.scram_arch }} -p ${{ matrix.proc }}

- name: Check pwg-stat.dat
if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true'
run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
commit-message: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
branch: create-pull-request/${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
Expand All @@ -98,8 +107,8 @@ jobs:
rm -rf ./.??* || true
ls -la ./
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand Down
6 changes: 3 additions & 3 deletions bin/Powheg/Templates/createTarBall_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@ fi
if [ $$keepTop == '1' ]; then
echo 'Keeping validation plots.'
echo 'Packing...' $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tgz'
tar zcf $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tgz' * --exclude=POWHEG-BOX --exclude=powhegbox*.tar.gz --exclude=*.lhe --exclude=run_*.sh --exclude=*temp --exclude=pwgbtlupb-*.dat --exclude=pwgrmupb-*.dat --exclude=run_*.out --exclude=run_*.err --exclude=run_*.log --exclude=minlo-run --exclude=dynnlo* $$exclude_extra
tar --exclude=POWHEG-BOX --exclude=powhegbox*.tar.gz --exclude=*.lhe --exclude=run_*.sh --exclude=*temp --exclude=pwgbtlupb-*.dat --exclude=pwgrmupb-*.dat --exclude=run_*.out --exclude=run_*.err --exclude=run_*.log --exclude=minlo-run --exclude=dynnlo* $$exclude_extra -zcf $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tgz' *
else
if [ $$process == 'WWJ' ]; then
echo 'Preparing WWJ gridpack'
echo 'Packing...' $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tar.xz'
tar -cJpsf $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tar.xz' * --exclude=POWHEG-BOX --exclude=powhegbox*.tar.gz --exclude=*.top --exclude=*.lhe --exclude=run_*.sh --exclude=*temp --exclude=pwgbtlupb-*.dat --exclude=pwgrmupb-*.dat --exclude=run_*.out --exclude=run_*.err --exclude=run_*.log --exclude=minlo-run --exclude=dynnlo*
tar --exclude=POWHEG-BOX --exclude=powhegbox*.tar.gz --exclude=*.top --exclude=*.lhe --exclude=run_*.sh --exclude=*temp --exclude=pwgbtlupb-*.dat --exclude=pwgrmupb-*.dat --exclude=run_*.out --exclude=run_*.err --exclude=run_*.log --exclude=minlo-run --exclude=dynnlo* -cJpsf $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tar.xz' *
else
echo 'Packing...' $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tgz'
tar zcf $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tgz' * --exclude=POWHEG-BOX --exclude=powhegbox*.tar.gz --exclude=*.top --exclude=*.lhe --exclude=run_*.sh --exclude=*temp --exclude=pwgbtlupb-*.dat --exclude=pwgrmupb-*.dat --exclude=run_*.out --exclude=run_*.err --exclude=run_*.log --exclude=minlo-run --exclude=dynnlo* $$exclude_extra
tar --exclude=POWHEG-BOX --exclude=powhegbox*.tar.gz --exclude=*.top --exclude=*.lhe --exclude=run_*.sh --exclude=*temp --exclude=pwgbtlupb-*.dat --exclude=pwgrmupb-*.dat --exclude=run_*.out --exclude=run_*.err --exclude=run_*.log --exclude=minlo-run --exclude=dynnlo* $$exclude_extra -zcf $${WORKDIR}'/'$${process}'_'$${SCRAM_ARCH}'_'$${CMSSW_VERSION}'_'$${folderName}'.tgz' *
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion bin/Powheg/Templates/runGetSource_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ grep -q "MGcosa" powheg.input; test $$? -eq 1 || forX0jj=1

cd $$WORKDIR
cd $${name}
python ../make_rwl.py $${is5FlavorScheme} $${defaultPDF} $${forMiNNLO} $${forX0jj} $${period}
python3 ../make_rwl.py $${is5FlavorScheme} $${defaultPDF} $${forMiNNLO} $${forX0jj} $${period}

if [ -s ../JHUGen.input ]; then
cp -p ../JHUGen.input JHUGen.input
Expand Down
5 changes: 5 additions & 0 deletions bin/Powheg/dag_wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# cannot submit condor DAG from within CMSSW environment
eval `scram unsetenv -sh`
condor_submit_dag $1
6 changes: 3 additions & 3 deletions bin/Powheg/make_rwl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

'''
Script for POWHEG weighting calculation
Expand All @@ -11,8 +11,8 @@
if len(sys.argv) < 3:
print("""
ERROR: Please specify if the Flavor scheme for which you want to define the weights is 5F (1) or 4F (0), and the central PDF
Example of usage for 5F: python make_rwl.py 1 325300
Example of usage for 4F: python make_rwl.py 0 325500
Example of usage for 5F: python3 make_rwl.py 1 325300
Example of usage for 4F: python3 make_rwl.py 0 325500
""")
sys.exit(1)

Expand Down
Loading