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

Do not fail for empty reductions #266

Open
inducer opened this issue Jun 16, 2022 · 1 comment
Open

Do not fail for empty reductions #266

inducer opened this issue Jun 16, 2022 · 1 comment

Comments

@inducer
Copy link
Owner

inducer commented Jun 16, 2022

Originally raised by @MTCam in #264:

A second problem is that this pattern fails to actually execute for CV objects since we have:
CV = [DOFArray, DOFArray, DOFArray, ... , numpy.ndarray = [] ], i.e., an empty array for the species_mass component for non-mixture CV. Attempting a reduction operation using a single gas CV now produces this error:

        if not isinstance(vec, DOFArray):
>           return max(
                nodal_max_loc(dcoll, dd, comp, initial=initial)
                for _, comp in serialize_container(vec)
            )
E           ValueError: max() arg is an empty sequence

../../grudge/grudge/reductions.py:257: ValueError
@inducer
Copy link
Owner Author

inducer commented Jun 16, 2022

Making empty reductions work has been the subject of ongoing work for a while, mostly by @majosm, cf:

These look a bit stalled ATM, but I think with a push, we can get them across the finish line.

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