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

run all examples, fix demo_distributed_node_duplication #475

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
. ci-support-v0
build_py_project_in_conda_env
pip install pytest # for advection.py
run_examples
run_examples --no-require-main

docs:
name: Documentation
Expand Down
9 changes: 6 additions & 3 deletions examples/demo_distributed_node_duplication.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
"""
An example to demonstrate the behavior of
:func:`pytato.find_distrbuted_partition`. One of the key characteristic of the
partitioning routine is to recompute expressions that appear in the multiple
:func:`pytato.find_distributed_partition`. One of the key characteristics of the
partitioning routine is to recompute expressions that appear in multiple
partitions but are not materialized.
"""
import pytato as pt
import numpy as np
from mpi4py import MPI

comm = MPI.COMM_WORLD

size = 2
rank = 0
Expand All @@ -30,7 +33,7 @@
out = tmp2 + recv
result = pt.make_dict_of_named_arrays({"out": out})

partitions = pt.find_distributed_partition(result)
partitions = pt.find_distributed_partition(comm, result)

# Visualize *partitions* to see that each of the two partitions contains a node
# named 'tmp2'.
Expand Down
Loading