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

Simplification of the MPI partition_function explanation #1424

Merged
merged 1 commit into from
Sep 4, 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
8 changes: 4 additions & 4 deletions docs/examples/documentation_MPI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
"outputs": [],
"source": [
"def simple_partition_function(coords, mpi_size=1):\n",
" \"\"\"A very simple partition function that assigns particles to processors\"\"\"\n",
" return np.array(\n",
" [int(i) for i in np.linspace(0, mpi_size, coords.shape[0], endpoint=False)]\n",
" )"
" \"\"\"A very simple partition function\n",
" that assigns particles to processors\n",
" \"\"\"\n",
" return np.linspace(0, mpi_size, coords.shape[0], endpoint=False, dtype=np.int32)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/example_stommel.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

def simple_partition_function(coords, mpi_size=1):
"""A very simple partition function that assigns particles to processors (for MPI testing purposes))"""
return np.array([int(i) for i in np.linspace(0, mpi_size, coords.shape[0], endpoint=False)])
return np.linspace(0, mpi_size, coords.shape[0], endpoint=False, dtype=np.int32)

Check warning on line 91 in docs/examples/example_stommel.py

View check run for this annotation

Codecov / codecov/patch

docs/examples/example_stommel.py#L91

Added line #L91 was not covered by tests


def stommel_example(npart=1, mode='jit', verbose=False, method=AdvectionRK4, grid_type='A',
Expand Down
Loading