Skip to content

Ignore parallel option in fast C reader - #10880

Merged
taldcroft merged 3 commits into
astropy:masterfrom
astrofrog:disable-parallel
Oct 17, 2020
Merged

taldcroft merged 3 commits into
astropy:masterfrom
astrofrog:disable-parallel

Conversation

@astrofrog

Copy link
Copy Markdown
Member

As discussed in #8858, this ignores for now the parallel option in the fast C reader in io.ascii, since serial reading has better performance. The warning is deliberately not a deprecation warning as this may be fixed in future.

This does mean that we now have some code that isn't tested and I think it's important that we simply remove this code if the bug isn't fixed in a timely way, so I'll open an issue to remind us to remove this code, and I'll milestone it for 4.2 initially though we could discuss what a good time frame is. I think it makes sense to be reasonably aggressive or we'll forget about it. In any case we should keep this present PR simple and we can backport it to LTS and 4.1.

Running the test suite before this PR on MacOS X with Python 3.8:

% pytest astropy/io/ascii                            
...
======= 547 passed, 27 skipped, 6 xfailed in 293.08s (0:04:53) =======

and with this PR:

======= 547 passed, 27 skipped, 6 xfailed in 18.73s =======

Fixes #9864

Comment thread CHANGES.rst Outdated
^^^^^^^^^^^^^^^^

- Partially fixed a performance issue when reading in parallel mode. Parallel
reading does not work correctly and has worse performance than serial

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you say "does not work correctly" that could imply it is returning the wrong answer. I did not see any statements this the answer is wrong, just that it is slow. If so, I would reword this here and elsewhere saying that "Parallel reading currently has substantially worse performance than the default serial reading, so we now ignore ...".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread astropy/io/ascii/cparser.pyx Outdated
# deprecation warning since we may still fix it in future.
if parallel:
warnings.warn('parallel reading does not currently work, '
'so falling back to serial reading', AstropyWarning)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might help anybody that hits this to have a reference to issue #8858 in the warning text.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@taldcroft

Copy link
Copy Markdown
Member

About the milestone for removing the code, since the 4.2 feature freeze is 7 days away that seems entirely unrealistic. I'd just start off with the milestone of 4.3 for either fixing or removing the parallel code.

@astrofrog

Copy link
Copy Markdown
Member Author

@taldcroft - I think your comments are addressed now

@taldcroft taldcroft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taldcroft
taldcroft merged commit 8419c50 into astropy:master Oct 17, 2020
eteq pushed a commit to eteq/astropy that referenced this pull request Oct 19, 2020
eteq pushed a commit that referenced this pull request Oct 19, 2020
Ignore parallel option in fast C reader
bsipocz pushed a commit that referenced this pull request Nov 6, 2020
Ignore parallel option in fast C reader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_c_reader tests extremely slow on MacOS X with Python 3.8

2 participants