Skip to content

Commit

Permalink
Merge pull request #10 from hyoklee/master
Browse files Browse the repository at this point in the history
ci: add ECP platform test scripts for my.cdash.org
  • Loading branch information
brtnfld authored Sep 29, 2023
2 parents 96dfb30 + e65fe48 commit 559c9e0
Show file tree
Hide file tree
Showing 31 changed files with 682 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: lint commit messages
on: [push]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5

30 changes: 30 additions & 0 deletions .github/workflows/cron_fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: frontier cron

on:
schedule:
- cron: '25 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout hpc-h5
uses: actions/checkout@v4
- name: cURL request
run: curl -s -o out.json 'https://my.cdash.org/api/v1/index.php?project=HDF5'
- id: date
run: echo "##[set-output name=data;]$(python ./bin/cdash.py frontier 1.15.0-PrgEnv-gnu\/8.3.3--gcc\/12.2.0-frontier----)"
- name: Time badge
uses: RubbaBoy/[email protected]
with:
NAME: frontier
LABEL: 'Frontier Test Failures'
STATUS: ${{ steps.date.outputs.data }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REPOSITORY: hyoklee/hpc-h5
ACTOR: hyoklee
- name: Upload
uses: actions/upload-artifact@v2
with:
name: out.json
path: ${{ runner.workspace }}/hpc-h5/out.json
30 changes: 30 additions & 0 deletions .github/workflows/cron_pe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: perlmutter cron

on:
schedule:
- cron: '25 3,15 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout hpc-h5
uses: actions/checkout@v3
- name: cURL request
run: curl -s -o out.json 'https://my.cdash.org/api/v1/index.php?project=HDF5'
- id: date
run: echo "##[set-output name=data;]$(python ./bin/cdash.py perlmutter nvhpc)"
- name: Time badge
uses: RubbaBoy/[email protected]
with:
NAME: perlmutter
LABEL: 'Perlmutter Test Failures'
STATUS: ${{ steps.date.outputs.data }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REPOSITORY: hyoklee/hpc-h5
ACTOR: hyoklee
- name: Upload
uses: actions/upload-artifact@v2
with:
name: out.json
path: ${{ runner.workspace }}/hpc-h5/out.json
30 changes: 30 additions & 0 deletions .github/workflows/cron_po.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: polaris cron

on:
schedule:
- cron: '25 4 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout hpc-h5
uses: actions/checkout@v3
- name: cURL request
run: curl -s -o out.json 'https://my.cdash.org/api/v1/index.php?project=HDF5'
- id: date
run: echo "##[set-output name=data;]$(python ./bin/cdash.py polaris-login-01 Linux-mpicc)"
- name: Time badge
uses: RubbaBoy/[email protected]
with:
NAME: polaris
LABEL: 'Polaris Test Failures'
STATUS: ${{ steps.date.outputs.data }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REPOSITORY: hyoklee/hpc-h5
ACTOR: hyoklee
- name: Upload
uses: actions/upload-artifact@v2
with:
name: out.json
path: ${{ runner.workspace }}/hpc-h5/out.json
30 changes: 30 additions & 0 deletions .github/workflows/cron_po_nv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: polaris-nv cron

on:
schedule:
- cron: '25 16 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout hpc-h5
uses: actions/checkout@v4
- name: cURL request
run: curl -s -o out.json 'https://my.cdash.org/api/v1/index.php?project=HDF5'
- id: date
run: echo "##[set-output name=data;]$(python ./bin/cdash.py polaris nvhpc)"
- name: Time badge
uses: RubbaBoy/[email protected]
with:
NAME: polaris_nv
LABEL: 'Polaris Test Failures'
STATUS: ${{ steps.date.outputs.data }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REPOSITORY: hyoklee/hpc-h5
ACTOR: hyoklee
- name: Upload
uses: actions/upload-artifact@v2
with:
name: out.json
path: ${{ runner.workspace }}/hpc-h5/out.json
32 changes: 32 additions & 0 deletions .github/workflows/cron_su.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: sunspot cron

on:
schedule:
- cron: '25 5 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout hpc-h5
uses: actions/checkout@v4
- name: cURL request
run: curl -s -o out.json 'https://my.cdash.org/api/v1/index.php?project=HDF5'
- id: date
run: echo "##[set-output name=data;]$(python ./bin/cdash.py uan-0001 Linux-mpicc)"

- name: Upload
uses: actions/upload-artifact@v2
with:
name: out.json
path: ${{ runner.workspace }}/hpc-h5/out.json

- name: Time badge
uses: RubbaBoy/[email protected]
with:
NAME: sunspot
LABEL: 'Sunspot Test Failures'
STATUS: ${{ steps.date.outputs.data }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REPOSITORY: hyoklee/hpc-h5
ACTOR: hyoklee
11 changes: 11 additions & 0 deletions .github/workflows/spell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: check spelling
on: [push, pull_request]
jobs:
codespell:
name: Check spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@master
with:
ignore_words_list: hdf5
14 changes: 14 additions & 0 deletions WATCHME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# hpc-h5

HPC HDF5 CTest Results

<a href="https://my.cdash.org/index.php?project=HDF5"><img src="https://img.shields.io/badge/dynamic/json?label=Frontier&query=frontier.status&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyoklee%2Fhpc-h5%2Fshields%2Fshields.json"></img></a>
<a href="https://my.cdash.org/index.php?project=HDF5"><img src="https://img.shields.io/badge/dynamic/json?label=Perlmutter NVHPC&query=perlmutter.status&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyoklee%2Fhpc-h5%2Fshields%2Fshields.json"></img></a>
<a href="https://my.cdash.org/index.php?project=HDF5"><img src="https://img.shields.io/badge/dynamic/json?label=Polaris&query=polaris.status&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyoklee%2Fhpc-h5%2Fshields%2Fshields.json"></img></a>
<a href="https://my.cdash.org/index.php?project=HDF5"><img src="https://img.shields.io/badge/dynamic/json?label=Polaris NVHPC&query=polaris_nv.status&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyoklee%2Fhpc-h5%2Fshields%2Fshields.json"></img></a>
<a href="https://my.cdash.org/index.php?project=HDF5"><img src="https://img.shields.io/badge/dynamic/json?label=Sunspot&query=sunspot.status&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyoklee%2Fhpc-h5%2Fshields%2Fshields.json"></img></a>


See [Wiki](https://github.com/hyoklee/hpc-h5/wiki) for more details.


36 changes: 36 additions & 0 deletions bin/cdash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Return the number of CTest failures from the last CDash submission
# from a given host name.
import sys
import json
import sys

v = sys.argv

if len(v) != 3:
print('cdash.py hostname buildname')
sys.exit(1)

json_file = 'out.json'
try:
with open(json_file) as data_file:
try:
data = json.load(data_file)
except ValueError:
print('ERROR:Invalid json file')
sys.exit(1)
except IOError:
print('ERROR:cannot open '+json_file)
sys.exit(1)

n = len(data['buildgroups'][0]['builds'])
b = data['buildgroups'][0]['builds']

# Print the number of CTest failures of hostname argument.
found = False
for i in reversed(range(0, n)):
if (b[i]['site'] == v[1] and b[i]['buildname'] == v[2] and not found):
found = True
print(b[i]['test']['fail'])

if not found:
sys.exit(1)
6 changes: 6 additions & 0 deletions bin/ckrev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/bash
OLD_HEAD=$(git rev-parse HEAD)
git pull
NEW_HEAD=$(git rev-parse HEAD)
[ $OLD_HEAD = $NEW_HEAD ] && exit 0
exit 1
28 changes: 28 additions & 0 deletions bin/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/bash

# This is for Sunspot and Polaris.

HDF5=..

export CC=mpicc
export CXX=mpicxx
export FC=mpifort
export RUNPARALLEL="mpiexec -n 6"

cmake -C $HDF5/config/cmake/cacheinit.cmake -G "Unix Makefiles" \
-D CMAKE_INSTALL_PREFIX=$PWD/hdf5 \
-D CMAKE_BUILD_TYPE:STRING="Release" \
-D HDF5_BUILD_FORTRAN:BOOL=ON \
-D HDF5_ENABLE_PARALLEL:BOOL=ON \
-D HDF5_BUILD_CPP_LIB:BOOL=OFF \
-D HDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-D HDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-D BUILD_TESTING:BOOL=ON \
-D HDF5_BUILD_EXAMPLES:BOOL=OFF \
-D HDF5_BUILD_HL_LIB:BOOL=ON \
-D BUILD_SHARED_LIBS:BOOL=ON \
-D HDF5_BUILD_JAVA:BOOL=OFF \
-D HDF5_ENABLE_SUBFILING_VFD:BOOL=ON \
-D HDF5_ENABLE_MAP_API:BOOL=ON \
-D CTEST_DROP_SITE_INIT:STRING="my.cdash.org" \
$HDF5
31 changes: 31 additions & 0 deletions bin/cmake_nv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/bash

# This is for Sunspot and Polaris.

HDF5=..

export CC=nvc
export CXX=nvc++
export FC=nvfortran
export RUNPARALLEL="mpiexec -n 6"

cmake \
-C $HDF5/config/cmake/cacheinit.cmake \
-G "Unix Makefiles" \
-D SITE:STRING=polaris \
-D BUILDNAME:STRING=nvhpc \
-D CMAKE_BUILD_TYPE:STRING="Release" \
-D HDF5_BUILD_FORTRAN:BOOL=ON \
-D HDF5_ENABLE_PARALLEL:BOOL=ON \
-D HDF5_BUILD_CPP_LIB:BOOL=OFF \
-D HDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-D HDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-D BUILD_TESTING:BOOL=ON \
-D HDF5_BUILD_EXAMPLES:BOOL=OFF \
-D HDF5_BUILD_HL_LIB:BOOL=ON \
-D BUILD_SHARED_LIBS:BOOL=ON \
-D HDF5_BUILD_JAVA:BOOL=OFF \
-D HDF5_ENABLE_SUBFILING_VFD:BOOL=ON \
-D HDF5_ENABLE_MAP_API:BOOL=ON \
-D CTEST_DROP_SITE_INIT:STRING="my.cdash.org" \
$HDF5
31 changes: 31 additions & 0 deletions bin/cmake_nv_pe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/bash

# This is for Sunspot and Polaris.

HDF5=..

export CC=nvc
export CXX=nvc++
export FC=nvfortran
export RUNPARALLEL="mpiexec -n 6"

cmake \
-C $HDF5/config/cmake/cacheinit.cmake \
-G "Unix Makefiles" \
-D SITE:STRING=perlmutter \
-D BUILDNAME:STRING=nvhpc \
-D CMAKE_BUILD_TYPE:STRING="Release" \
-D HDF5_BUILD_FORTRAN:BOOL=ON \
-D HDF5_ENABLE_PARALLEL:BOOL=ON \
-D HDF5_BUILD_CPP_LIB:BOOL=OFF \
-D HDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-D HDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-D BUILD_TESTING:BOOL=ON \
-D HDF5_BUILD_EXAMPLES:BOOL=ON \
-D HDF5_BUILD_HL_LIB:BOOL=ON \
-D BUILD_SHARED_LIBS:BOOL=ON \
-D HDF5_BUILD_JAVA:BOOL=OFF \
-D HDF5_ENABLE_SUBFILING_VFD:BOOL=ON \
-D HDF5_ENABLE_MAP_API:BOOL=ON \
-D CTEST_DROP_SITE_INIT:STRING="my.cdash.org" \
$HDF5
14 changes: 14 additions & 0 deletions bin/cron_fr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/bash

. /etc/profile
. /ccs/home/hyoklee/.bashrc

cd /lustre/orion/csc332/scratch/hyoklee/hdf5
OLD_HEAD=$(git rev-parse HEAD)
git pull
NEW_HEAD=$(git rev-parse HEAD)
[ $OLD_HEAD = $NEW_HEAD ] && exit 0
cd /ccs/home/hyoklee/src/hpc-h5/bin
sbatch j_fr.slurm
sleep 1200
cd /lustre/orion/csc332/scratch/hyoklee/hdf5/build && ctest -T Submit
25 changes: 25 additions & 0 deletions bin/cron_pe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/bash

. /etc/profile
. /global/homes/h/hyoklee/.bashrc

echo "Hello" > /global/homes/h/hyoklee/bin/hello.txt
module load nvhpc/23.1

d="/pscratch/sd/h/hyoklee/hdf5"
cd $d
/global/homes/h/hyoklee/src/hpc-h5/bin/ckrev
rc_h5=$?
rc_h5=1
if [ $rc_h5 -eq 1 ]
then
rm -rf $d/build
mkdir $d/build
cd $d/build
/global/homes/h/hyoklee/src/hpc-h5/bin/cmake_nv_pe.sh
sbatch /global/homes/h/hyoklee/src/hpc-h5/bin/j_pe.slurm
fi

# To measure time
echo "Hello2" > /global/homes/h/hyoklee/bin/hello2.txt

Loading

0 comments on commit 559c9e0

Please sign in to comment.