Skip to content

Commit

Permalink
parallelized the computation of weighted_* quantities with MPI; updat…
Browse files Browse the repository at this point in the history
…ed the relevant tests; updated pyproject.toml and setup.py to include the path for mpi4py headers automatically; github test workflow will now run on every push
  • Loading branch information
anand-avinash committed May 30, 2024
1 parent 54c203b commit e693ce6
Show file tree
Hide file tree
Showing 17 changed files with 553 additions and 293 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
# setting up compiler: <https://github.com/marketplace/actions/setup-c-c-compiler>

name: Tests
on:
push:
branches:
- main
on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down
14 changes: 12 additions & 2 deletions brahmap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
from . import interfaces, utilities, linop, mapmakers, _extensions
import mpi4py

from .utilities import Initialize
mpi4py.rc.initialize = False

from mpi4py import MPI # noqa: E402

if MPI.Is_initialized() is False:
MPI.Init_thread(required=MPI.THREAD_FUNNELED)

from . import interfaces, utilities, linop, mapmakers, _extensions # noqa: E402

from .utilities import Initialize, MPI_RAISE_EXCEPTION # noqa: E402

bMPI = None

Expand All @@ -11,4 +20,5 @@
"mapmakers",
"_extensions",
"Initialize",
"MPI_RAISE_EXCEPTION",
]
Loading

0 comments on commit e693ce6

Please sign in to comment.