Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4b1ea0e
use CUDAToolKit package in cmake, and use cmake targets
dingp Apr 1, 2024
cafbc39
adding build scripts
dingp Apr 1, 2024
ba1cadb
fix cmake target, remove double quotes
dingp Apr 3, 2024
b922859
typo fix (testing in official cuda image
dingp Apr 3, 2024
a40f585
add dockerfile for building cuda based FCS
dingp Apr 3, 2024
4514b5c
Update CMakeLists.txt
dingp Apr 3, 2024
171536b
update build scripts and dockerfiles
dingp Apr 3, 2024
a49fc65
Merge branch 'dingpf/packaging' of https://github.com/cgleggett/FCS-G…
dingp Apr 3, 2024
c6fffc6
parameterize image registry and project
dingp Apr 3, 2024
4981718
update image registry
dingp Apr 10, 2024
913ef34
add build script for stdpar
dingp Apr 17, 2024
7e0cc33
add localrc for gcc 11.4 (default in Ubuntu 22.04
dingp Apr 18, 2024
162633c
adding dockerfile for stdpar build of FCS
dingp Apr 18, 2024
5b024d4
added missing Dockerfile and readme
dingp Jul 1, 2024
b7c178b
Unify naming of build Dockerfiles
lorenz369 Jul 29, 2024
c6aa9dc
Update build directory with Marco's changes
lorenz369 Jul 29, 2024
a481fee
Add scripts/run_scripts to run FCS inside containers
lorenz369 Jul 29, 2024
bcaf5f8
Add scripts/postprocessing to postprocess FCS log files into json format
lorenz369 Jul 29, 2024
783360b
Add scripts/plotting to plot FCS json data
lorenz369 Jul 29, 2024
46439c0
Add benchmarking.yaml workflow file
lorenz369 Jul 29, 2024
a482be4
Update branch with latest changes from self_hosted runner, note: work…
lorenz369 Aug 16, 2024
8805119
Update draft pr with fixes and documentation
lorenz369 Aug 20, 2024
7a6de06
Integrate latest changes: plot permutations
lorenz369 Aug 20, 2024
1ef5a84
update repo URL, fix installation path for std::par
dingp Aug 20, 2024
c1d5636
Update PR
lorenz369 Aug 23, 2024
5f22917
Merge pull request #18 from hep-cce/main
dingp Aug 29, 2024
45afd01
remove misplaced duplicated files
Aug 29, 2024
5f2778e
fix merge conflicts
Aug 29, 2024
ce8560f
Merge pull request #17 from hep-cce/lorenzm/CI
dingp Aug 29, 2024
27fe20d
set CUDART_LIB and CUDA_DRIVER_LIB, guarding the case when cmake targ…
dingp Aug 29, 2024
35b6574
change runner label
dingp Aug 30, 2024
76ac437
fix path to gh_runner workspace
dingp Aug 30, 2024
5870660
refactor workflow to separate image building jobs from benchmarking jobs
dingp Aug 30, 2024
e727aed
add a separate workflow for building images
dingp Aug 30, 2024
a14d205
change workflow name
dingp Aug 30, 2024
01e9f09
dummy change to trigger workflow
Sep 20, 2024
10c1a34
Merge branch 'main' into dingpf/packaging
dingp Oct 3, 2024
f325168
change path to the default hiprand and rocrand header files
Nov 29, 2024
4131c56
adding docker image for hip+rocm
Nov 29, 2024
3201b47
update hip rocm image
Nov 29, 2024
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
56 changes: 56 additions & 0 deletions .github/workflows/CI_python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Python Code Checks

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd ./hmatools
python -m pip install --use-pep517 -e .
python -m pip install black flake8 pylint mypy pytest
python -m pip install types-seaborn pandas-stubs matplotlib-stubs

- name: Format code with Black
run: |
cd ./hmatools/python
black --check .

- name: Lint with Flake8
run: |
cd ./hmatools/python
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics

- name: Lint with Pylint
run: |
cd ./hmatools/python
pylint .

- name: Type check with Mypy
run: |
cd ./hmatools/python
mypy . --explicit-package-bases

- name: Run tests
run: |
pytest
51 changes: 51 additions & 0 deletions .github/workflows/OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# GitHub Actions Workflows Overview

## 1. Run FastCaloSim Benchmarking (`benchmarking.yaml`)

The `benchmarking.yaml` workflow is designed to automate the benchmarking of FastCaloSim on different environments, including Perlmutter and Exalearn. Steps:

- **Build and Push Images**:
- This step is optional and controlled via workflow dispatch (`run_build` input).
- If triggered, the job builds and pushes Docker images using a self-hosted runner, and logs are uploaded for review.

- **Run FastCaloSim**:
- This job runs FastCaloSim on different platforms using a matrix strategy to handle multiple configurations (Perlmutter and Exalearn).
- It sets up environment variables specific to each runner and executes the simulation scripts.
- Log files from each run are compressed into tarballs and uploaded for later use.

- **Postprocess Log Files**:
- This job depends on the completion of the `run` job.
- It downloads log files from the previous runs, decompresses them, and runs a postprocessing script using HMATools.
- The processed logs and resulting JSON files are uploaded as artifacts.

- **Plot Results**:
- This job depends on the completion of the `postprocess` job.
- It downloads the processed JSON files and runs a plotting script using HMATools.
- The generated plots and associated logs are uploaded for analysis.

For postprocessing, and plotting, a docker container with HMATools is built and run to execute the steps.

## 2. Python Code Checks (`Python_CI.yaml`)

The `Python_CI.yaml` workflow is a Continuous Integration (CI) pipeline focused on ensuring code quality and correctness in the HMATools project. It includes the following steps:

- **Checkout Code**:
- The repository is checked out to the runner for subsequent operations.

- **Set Up Python**:
- Python 3.11 is installed and configured for the environment.

- **Install Dependencies**:
- All necessary Python packages, including project dependencies and development tools like `black`, `flake8`, `pylint`, `mypy`, and `pytest`, are installed.

- **Code Formatting with Black**:
- The codebase is checked for compliance with `black` formatting standards.

- **Linting with Flake8 and Pylint**:
- Code is linted to catch syntax errors, enforce coding standards, and assess code complexity.

- **Type Checking with Mypy**:
- Static type checking is performed to catch type-related errors before runtime.

- **Run Tests**:
- Unit tests are executed using `pytest` to ensure the functionality is working as expected.
167 changes: 167 additions & 0 deletions .github/workflows/benchmarking.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: Run FastCaloSim Benchmarking

on:
workflow_dispatch:

push:
branches:
- main
pull_request:
branches:
- main

jobs:
run:
runs-on: ${{ matrix.runner-label }}
name: Run FastCaloSim
strategy:
matrix:
runner-label: [pm-login, exalearn5]
env:
LOG_DIR: ${{ github.workspace }}/logs/run
NERSC_CONTAINER_REGISTRY_USER: ${{ secrets.NERSC_CONTAINER_REGISTRY_USER }}
NERSC_CONTAINER_REGISTRY_PASSWORD: ${{ secrets.NERSC_CONTAINER_REGISTRY_PASSWORD }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run FastCaloSim on Perlmutter
if: contains(runner.name, 'pm-login')
env:
RUNNER_LABEL: pm-login
FCS_DATAPATH: /global/cfs/cdirs/atlas/leggett/data/FastCaloSimInputs
run: |
cd ./scripts/run_scripts
./run_images.sh

- name: Run FastCaloSim on exalearn5
if: contains(runner.name, 'exalearn5')
env:
RUNNER_LABEL: exalearn5
FCS_DATAPATH: /local/scratch/cgleggett/data/FastCaloSimInputs
run: |
cd ./scripts/run_scripts
./run_images.sh

- name: Create tarball of log files
run: |
cd ${{ env.LOG_DIR }}
tar -czf ${{ github.workspace }}/log_files_${{ matrix.runner-label }}.tar.gz ./*.txt

- name: Upload log files
uses: actions/upload-artifact@v4
with:
name: Log Files - ${{ matrix.runner-label }}
path: log_files_${{ matrix.runner-label }}.tar.gz

postprocess:
runs-on: ubuntu-latest
name: Postprocess log files
needs: run
env:
LOG_DIR: ${{ github.workspace }}/logs/postprocess
INPUT_DIR: ${{ github.workspace }}/logs/run
OUTPUT_DIR: ${{ github.workspace }}/logs/postprocess
SCRIPT: ./postprocess.sh

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download pm-login log files
uses: actions/download-artifact@v4
with:
name: Log Files - pm-login
path: ${{ env.INPUT_DIR }}

- name: Download exalearn5 log files
uses: actions/download-artifact@v4
with:
name: Log Files - exalearn5
path: ${{ env.INPUT_DIR }}

- name: Untar and uncompress logs
run: |
for runner in pm-login exalearn5; do
tar -xzf ${{ github.workspace }}/logs/run/log_files_${runner}.tar.gz -C ${{ github.workspace }}/logs/run
done

- name: Debug input directory
run: |
ls -l ${{ env.INPUT_DIR }}

- name: Build hmatools image
run: |
cd ./hmatools/scripts
./build_image.sh

- name: Run hmatools postprocessing
run: |
cd ./hmatools/scripts
./run_image.sh

- name: Upload logfiles
if: always()
uses: actions/upload-artifact@v4
with:
name: Postprocess log file
path: ${{ env.LOG_DIR }}/*.txt

- name: Upload json files
if: always()
uses: actions/upload-artifact@v4
with:
name: FastCaloSim Results (JSON)
path: ${{ env.OUTPUT_DIR }}/*.json

- name: Cleanup workspace
run: rm -rf ${{ github.workspace }}/*

plot:
runs-on: ubuntu-latest
name: Plot results
needs: postprocess
env:
LOG_DIR: ${{ github.workspace }}/logs/plot
INPUT_DIR: ${{ github.workspace }}/logs/postprocess
OUTPUT_DIR: ${{ github.workspace }}/logs/plot
SCRIPT: ./plot.sh

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download json files
uses: actions/download-artifact@v4
with:
name: FastCaloSim Results (JSON)
path: ${{ env.INPUT_DIR }}

- name: Debug input directory
run: |
ls -l ${{ env.INPUT_DIR }}

- name: Build hmatools image
run: |
cd ./hmatools/scripts
./build_image.sh

- name: Run hmatools plotting
run: |
cd ./hmatools/scripts
./run_image.sh

- name: Upload logfiles
if: always()
uses: actions/upload-artifact@v4
with:
name: Plot log file
path: ${{ env.LOG_DIR }}/*.txt

- name: Upload plot files
if: always()
uses: actions/upload-artifact@v4
with:
name: Result plots
path: ${{ env.OUTPUT_DIR }}/*.png
41 changes: 41 additions & 0 deletions .github/workflows/build_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Container images with FastCaloSim

on:
workflow_dispatch:
inputs:
run_build:
description: "Run the build job?"
required: false
default: "false"
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: [self-hosted, pm-login]
name: Build and push images
if: ${{ github.event.inputs.run_build == 'true' }}
env:
LOG_DIR: ${{ github.workspace }}/logs/build

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build images
run: |
cd ./scripts/build_scripts
./build_images.sh

- name: Upload log files
uses: actions/upload-artifact@v4
with:
name: Log File - Building and Pushing container images
path: ${{ env.LOG_DIR }}/*.txt

- name: Cleanup workspace
run: rm -rf ${{ github.workspace }}/*
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**/.DS_Store
**/__pycache__/
**/*.egg-info/
**/json/**/*
scripts/run_scripts/*.txt
**/*.txt
**/*.json
**/*.png
**/*.ipynb
!/hmatools/tests/test_data/**
!/hmatools/requirements.txt
Loading
Loading