Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast Matrix Assembly #448

Draft
wants to merge 10 commits into
base: devel
Choose a base branch
from
24 changes: 12 additions & 12 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ jobs:
export OMP_NUM_THREADS=2
python -m pytest -n auto --pyargs psydac -m "not parallel and not petsc"

- name: Run MPI tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and not petsc"
#- name: Run MPI tests with Pytest
# working-directory: ./pytest
# run: |
# export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
# export OMP_NUM_THREADS=2
# python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and not petsc"

- name: Run single-process PETSc tests with Pytest
working-directory: ./pytest
Expand All @@ -190,12 +190,12 @@ jobs:
export OMP_NUM_THREADS=2
python -m pytest -n auto --pyargs psydac -m "not parallel and petsc"

- name: Run MPI PETSc tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and petsc"
#- name: Run MPI PETSc tests with Pytest
# working-directory: ./pytest
# run: |
# export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
# export OMP_NUM_THREADS=2
# python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and petsc"

- name: Remove test directory
if: ${{ always() }}
Expand Down
14 changes: 14 additions & 0 deletions psydac/api/discretization.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,20 @@ def discretize(a, *args, **kwargs):
domain_h = args[0]
assert isinstance(domain_h, Geometry)
domain = domain_h.domain
dim = domain.dim

backend = kwargs.get('backend')# or None
#print(f'backend: {backend}')
assembly_backend = kwargs.get('assembly_backend')# or None
#print(f'assembly_backend: {assembly_backend}')
assembly_backend = backend or assembly_backend
#print(f'assembly_backend: {assembly_backend}')
openmp = False if assembly_backend is None else assembly_backend.get('openmp')
#print(f'openmp: {openmp}')

if (((isinstance(a, sym_BilinearForm)) and (dim == 3))) and not openmp:
if not (kwargs.get('new_assembly') == 'test'): # enable test cases
kwargs['new_assembly'] = True
mapping = domain_h.domain.mapping
kwargs['symbolic_mapping'] = mapping

Expand Down
Loading
Loading