Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Latest commit

 

History

History
History
101 lines (97 loc) · 3.63 KB

File metadata and controls

101 lines (97 loc) · 3.63 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Sharpy CI
run-name: ${{ github.actor }} CI for sharpy
permissions: read-all
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: bash -l {0}
env:
IMEX_CACHE_NUMBER: 4 # Increase to reset cache
jobs:
build_and_test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- name: Check repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup env
run: |
INSTALLED_DIR="$(realpath $GITHUB_WORKSPACE)/third_party/install"
echo "INSTALLED_DIR=$INSTALLED_DIR" >> "$GITHUB_ENV"
echo 'IMEX_SHA<<EOF' >> $GITHUB_ENV
cat imex_version.txt >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Restore IMEX cache
id: cache-imex
uses: actions/cache/restore@v3
with:
path: third_party/install/**
key: ${{ runner.os }}-build-imex-${{ env.IMEX_CACHE_NUMBER }}-${{ env.IMEX_SHA }}
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
# environment-file: etc/example-environment.yml
- name: Build SHARPY
run: |
env
conda install -y conda-build
cd conda-recipe
conda build --numpy 1.26 --no-anaconda-upload --no-test .
- name: Save IMEX cache
uses: actions/cache/save@v3
if: steps.cache-imex.outputs.cache-hit != 'true'
with:
path: third_party/install/**
key: ${{ runner.os }}-build-imex-${{ env.IMEX_CACHE_NUMBER }}-${{ env.IMEX_SHA }}
- name: Install SHARPY
run: |
conda create --use-local -c file://${CONDA_PREFIX}/conda-bld/ -n sharpy -v sharpy pytest pytest-timeout
conda activate sharpy
- name: Test SHARPY (pytest)
run: |
conda activate sharpy
cd test
pytest . -v -s --timeout=30
SHARPY_FORCE_DIST=1 pytest . -v -s --timeout=30
mpirun -n 2 pytest . -v -s --timeout=30
mpirun -n 3 pytest . -v -s --timeout=30
mpirun -n 4 pytest . -v -s --timeout=30
cd -
- name: Run examples
run: |
conda activate sharpy
cd examples
SHARPY_FALLBACK=numpy python -u ./stencil-2d.py 5 1024 star 4
SHARPY_FALLBACK=numpy SHARPY_FORCE_DIST=1 python -u ./stencil-2d.py 5 1024 star 4
mpirun -n 2 -genv SHARPY_FALLBACK=numpy python -u ./stencil-2d.py 5 2048 star 2
mpirun -n 3 -genv SHARPY_FALLBACK=numpy python -u ./stencil-2d.py 5 2048 star 2
mpirun -n 4 -genv SHARPY_FALLBACK=numpy python -u ./stencil-2d.py 5 2048 star 2
python -u ./wave_equation.py -b numpy
python -u ./wave_equation.py -d f32
python -u ./wave_equation.py -d f64
SHARPY_FORCE_DIST=1 python -u ./wave_equation.py
mpirun -n 2 python -u ./wave_equation.py
mpirun -n 3 python -u ./wave_equation.py
mpirun -n 4 python -u ./wave_equation.py
python -u ./shallow_water.py -b numpy
python -u ./shallow_water.py -d f32
python -u ./shallow_water.py -d f64
mpirun -n 2 python -u ./shallow_water.py
mpirun -n 3 python -u ./shallow_water.py
mpirun -n 4 python -u ./shallow_water.py
python -u ./black_scholes.py -b numpy
python -u ./black_scholes.py -d f32
python -u ./black_scholes.py -d f64
SHARPY_FORCE_DIST=1 python -u ./black_scholes.py
mpirun -n 2 python -u ./black_scholes.py
mpirun -n 3 python -u ./black_scholes.py
mpirun -n 4 python -u ./black_scholes.py
cd -
Morty Proxy This is a proxified and sanitized view of the page, visit original site.