Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
53 changes: 33 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ jobs:
- 1 # automatically expands to the latest stable 1.x release of Julia
devitoversion:
- 'main'
- 'devitopro'
# - 'devitopro'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats going on here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is related to credentials. let's chat offline about it.

- ''
os:
- ubuntu-latest
arch:
- x64

env:
DEVITO_LANGUAGE: "openmp"
DEVITO_ARCH: "gcc"
OMP_NUM_THREADS: "2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we get the number of threads with a function call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the function call that you have in mind? Do you mean using the openmp c api?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github runners are fixed 4-core config, so that's bit overkill to go through the trouble of infering it
https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories

DEVITO_AUTOPADDING: "0"
RDMAV_FORK_SAFE: 1

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand All @@ -30,43 +38,48 @@ jobs:
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1

- name: install mpi
run: sudo apt-get update
- run: sudo apt-get install -y mpich libmpich-dev
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: 'mpich'

- name: download miniconda manually
run: wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh

- name: run install
run: bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p $HOME/miniconda

- name: run path export
run: |
echo "$HOME/miniconda/bin:" >> $GITHUB_PATH
echo "PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "CONDA_EXE=$HOME/miniconda/bin/conda" >> $GITHUB_ENV

- name: use system MPI
run: julia -e 'using Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary()'

- name: run build for devito/devitopro
if: matrix.devitoversion == 'devitopro'
run: julia --color=yes --project -e 'using Pkg; Pkg.build(verbose=true)'
env:
DEVITO_PRO: ${{ secrets.DEVITOPRO }}

- name: run build for devito
if: ! matrix.devitoversion != 'devitopro'
run: julia --color=yes --project -e 'using Pkg; Pkg.build(verbose=true)'
env:
DEVITO_BRANCH: ${{ matrix.devitoversion }}


- name: use system MPI
run: |
# https://juliaparallel.org/MPI.jl/latest/configuration/#Configuration-of-the-MPI.jl-testsuite
julia --project=test -e 'using Pkg; Pkg.instantiate(); Pkg.status(); using MPIPreferences; MPIPreferences.use_system_binary()'

# note Pkg.test docs indicate --inline=no can improve coverage
- run: julia --color=yes --check-bounds=yes --inline=no --project -e 'using Pkg; Pkg.test(coverage=true)'

- name: run tests
run: |
julia --color=yes --check-bounds=yes --inline=no --project -e 'using Pkg; Pkg.test(coverage=true)'

- uses: julia-actions/julia-processcoverage@v1

- uses: codecov/codecov-action@v1
with:
file: lcov.info
Expand All @@ -79,29 +92,29 @@ jobs:
- uses: julia-actions/setup-julia@v2
with:
version: '1'

- name: install mpi
run: sudo apt-get update
- run: sudo apt-get install -y mpich

- name: download miniconda manually
run: wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh

- name: run install
run: bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p ~/miniconda

- name: run path export
run: |
echo "$HOME/miniconda/bin:" >> $GITHUB_PATH
echo "PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "CONDA_EXE=$HOME/miniconda/bin/conda" >> $GITHUB_ENV

- run: julia --color=yes --project -e 'using Pkg; if VERSION >= v"1.1.0-rc1"; Pkg.build(verbose=true); else Pkg.build(); end'
- run: julia --color=yes --project -e 'using Pkg; Pkg.build()'

- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'

- run: |
julia --project=docs -e '
using Pkg
Expand Down
9 changes: 7 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ authors = ["Sam Kaplan <Sam.Kaplan@chevron.com>"]
version = "1.0.0"

[deps]
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"

[weakdeps]
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"

[extensions]
MPIExt = "MPI"

[compat]
MPI = "0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20"
MPI = "0.20"
PyCall = "1"
Strided = "1"
julia = "1.9"
Loading
Loading