Skip to content

fix hard-coded field limit in phastaIO #17

@cwsmith

Description

@cwsmith
  • 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions