Skip to content

Commit 90aa2da

Browse files
committed
Dump info about installed packages
1 parent 7727131 commit 90aa2da

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

.github/workflows/benchmark.yaml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
workflow_dispatch: # allows to trigger manually
711
schedule:
812
- cron: "0 5 * * 4" # Once a week at 0500 on Thursday
913

@@ -31,13 +35,17 @@ jobs:
3135
- name: Install dependencies
3236
run: |
3337
sudo apt update -y
34-
sudo apt install git zlib1g-dev build-essential pkg-config rsync -y
38+
sudo apt install git zlib1g-dev build-essential pkg-config rsync lsof -y
3539
3640
- uses: actions/checkout@v4
3741
with:
3842
repository: deshaw/versioned-hdf5
3943
path: ./versioned-hdf5/
40-
fetch-depth: 0 # Needed for asv to be able to run benchmarks on old commits
44+
fetch-depth: 0 # Needed for asv to be able to run benchmarks on old commits
45+
46+
- name: Get commit hash
47+
working-directory: ./versioned-hdf5
48+
run: echo "PROJECT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
4149

4250
- uses: actions/checkout@v4
4351
with:
@@ -52,10 +60,18 @@ jobs:
5260
- name: Install versioned-hdf5
5361
working-directory: ./versioned-hdf5
5462
run: |
55-
echo "PROJECT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
5663
conda install -n test pip hdf5 openmpi h5py ndindex -c conda-forge -y
5764
conda run -n test pip install '.[bench]'
5865
66+
- name: Dump conda environment
67+
run: conda list -n test
68+
69+
- name: Print hdf5 configuration
70+
working-directory: ./versioned-hdf5-benchmarks
71+
run: |
72+
conda run -n test python -c 'import utils; utils.debug_libhdf5_so()'
73+
conda run -n test h5cc -showconfig
74+
5975
- name: Run benchmarks
6076
working-directory: ./versioned-hdf5
6177
run: |
@@ -83,17 +99,18 @@ jobs:
8399

84100
- name: Generate html
85101
working-directory: ./versioned-hdf5
86-
run: |
87-
conda run -n test asv publish -o ./html
102+
run: conda run -n test asv publish -o ./html
88103

89104
- name: Setup Pages
90105
uses: actions/configure-pages@v5
91106

92107
- name: Upload artifact
93108
uses: actions/upload-pages-artifact@v3
94109
with:
95-
path: './versioned-hdf5/html'
110+
path: ./versioned-hdf5/html
111+
retention-days: 30
96112

97113
- name: Deploy to GitHub Pages
114+
if: github.event_name != 'pull_request'
98115
id: deployment
99116
uses: actions/deploy-pages@v4

utils.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
import subprocess
3+
4+
5+
def debug_libhdf5_so():
6+
"""Print out which .so file is actually loaded at runtime for libhdf5"""
7+
import h5py
8+
9+
for row in (
10+
subprocess.check_output(["lsof", "-p", str(os.getpid())])
11+
.decode("utf-8")
12+
.splitlines()
13+
):
14+
row = row.strip()
15+
if "libhdf5" in row:
16+
print(row)

0 commit comments

Comments
 (0)