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

Fix parallel fileReader.lines bugs #25983

Merged

Conversation

jeremiah-corrado
Copy link
Contributor

@jeremiah-corrado jeremiah-corrado commented Sep 24, 2024

Fix two bugs in the parallel overloads of fileReader.lines:

  • for stripNewline=false, the final \n was missing (due to calculating fileReader's region's upper-bound incorrectly)
  • when the file has fewer lines than the number of targetLocales, some of the lines could be read multiple times

(fixes the same bugs present in ParallelIO's iterators)

  • local paratest
  • gasnet paratest

…iles, and bug with missing terminating '\n'

Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
modules/standard/IO.chpl Show resolved Hide resolved
…ped if it's size is one

Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
@jeremiah-corrado jeremiah-corrado merged commit 9d3eeb8 into chapel-lang:main Sep 24, 2024
7 checks passed
@jeremiah-corrado jeremiah-corrado deleted the parallel-lines-bug-fix branch September 24, 2024 20:37
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

Successfully merging this pull request may close these issues.

2 participants