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 hard-coded field limit in phastaIO #17

Open
4 of 10 tasks
cwsmith opened this issue Feb 12, 2017 · 0 comments
Open
4 of 10 tasks

fix hard-coded field limit in phastaIO #17

cwsmith opened this issue Feb 12, 2017 · 0 comments
Assignees

Comments

@cwsmith
Copy link
Contributor

cwsmith commented Feb 12, 2017

  • 1. Copy the test phIOwriteReadZeroSz.cc to create a new test named phIOwriteFields.cc
    (cp phIOwriteReadZeroSz.cc phIOwriteFields.cc).
    phIOwriteReadZeroSz.cc reads an integer from the command line specifying the number of syncio files to create.
  • 2. Add the test to testing.cmake as is done for phIOwriteReadZeroSz.cc
  • 3. Hard code the number of syncio files to create by setting nfiles to one on line 31.
  • 4. Lines 44 and 45 write a header and its associated data block
    Add a for loop that starts above line 44 and ends after line 45. The loop should run a user specified (see line 31) number of times; each time it writes a header and a data block.
  • 5. At the top of the loop create a string that specifies the header and data block name. This name should be unique; use the loop number in the string. Replace the phrase argument on lines 44 (the call to phio_writeheader) and 45 (the call to phio_writedatablock) with the created string. Note, these functions expect the string to be a const char*.
  • 6. Repeat the loop creation done in steps four and five for the calls to phio_readheader and phio_readdatablock on lines 56 and 58. At run time this will read back the headers and data blocks that were created by the loop in step four.
  • 7. manually run the test with an increasing field count until it breaks (likely in syncio)
  • 8. debug the code to find the problem
  • 9. fix the problem
  • 10. re-run the test
@cwsmith cwsmith changed the title fix hard-coded field limit fix hard-coded field limit in phastaIO Feb 12, 2017
PSRPI pushed a commit that referenced this issue Feb 27, 2017
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

2 participants