You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromfiredrakeimport*fromgustoimportDomainm=PeriodicIntervalMesh(3, 10) # increasing 3 to 5 here makes the error go awaymesh=ExtrudedMesh(m, layers=3, layer_height=10/3)
domain=Domain(mesh, 0.1, 'CG', 1)
with mpiexec -n 2 python myfile.py throws
Traceback (most recent call last):
File "/home/connor/Code/firedrake-dev3/src/gusto/mydemo.py", line 7, in <module>
domain = Domain(mesh, 0.1, 'CG', 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connor/Code/firedrake-dev3/src/gusto/gusto/core/domain.py", line 152, in __init__
self.set_height_above_surface()
File "/home/connor/Code/firedrake-dev3/src/gusto/gusto/core/domain.py", line 179, in set_height_
above_surface
columnwise_height, index_data = self.coords.get_column_data(CG1_height, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connor/Code/firedrake-dev3/src/gusto/gusto/core/coordinates.py", line 193, in get_co
lumn_data
data_range = np.max(coords_X) - np.min(coords_X)
^^^^^^^^^^^^^^^^
File "/home/connor/Code/firedrake-dev3/lib/python3.12/site-packages/numpy/_core/fromnumeric.py",
line 3199, in max
return _wrapreduction(a, np.maximum, 'max', axis, None, out,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connor/Code/firedrake-dev3/lib/python3.12/site-packages/numpy/_core/fromnumeric.py",
line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation maximum which has no identity
which is because an array getting passed to np.max has zero size. I expect this is because one rank has no cells kept on it.
The text was updated successfully, but these errors were encountered:
Running the code
with
mpiexec -n 2 python myfile.py
throwswhich is because an array getting passed to
np.max
has zero size. I expect this is because one rank has no cells kept on it.The text was updated successfully, but these errors were encountered: