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

AssertionError on dtype mismatch in pencil.py for small arrays #20

Open
benlandrum opened this issue Mar 21, 2023 · 0 comments
Open

AssertionError on dtype mismatch in pencil.py for small arrays #20

benlandrum opened this issue Mar 21, 2023 · 0 comments

Comments

@benlandrum
Copy link

3D transforms with a small index-2 lengths encounter AssertionError in pencil.py (link to line).

import numpy as np
from mpi4py import MPI
from mpi4py_fft import PFFT, newDistArray

# No assertion error for (5, 5, 3).
shape = np.array((5, 5, 2), dtype=int)

fft = PFFT(MPI.COMM_WORLD, shape=shape, dtype=float)

u = newDistArray(fft, forward_output=False)
u[...] = np.random.random(u.shape).astype(u.dtype)

u_hat = newDistArray(fft, forward_output=True)

# AssertionError
fft.forward(u, u_hat)

An array with dimensions (5, 5, 3) is fine, but (5, 5, 2) doesn't work.

I am using version 2.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant