Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wh3248 committed Dec 20, 2024
1 parent ddcf179 commit d530ca7
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions tests/hf_hydrodata/test_fast_pfb_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_reading_multiple_files():


def test_not_enough_memory_error():
"""Test attempting to read a file with PQR too small for number of files read."""
"""Test attempting to read a file with so many conus2 sized files that will not fit in memory."""

if not os.path.exists("/hydrodata"):
# Just skip test if this is run on a machine without /hydrodata access
Expand All @@ -60,7 +60,13 @@ def test_not_enough_memory_error():


def too_slow_test_pqr_too_small():
"""Test ability to read many files with small subgrid with small pqr"""
"""
Test ability to read many files with small subgrid with small pqr.
Since the constraint only reads one point the result is small enough to fit in memory,
but the input is 24 conus2 sized files with PQR=1,1,1 that would not fit in memory when loaded in parallel.
This should still work because fast pfb reader should limit the number of files read in parallel
so the temporary subgrid reads of the parallel files still fit in memory.
"""

if not os.path.exists("/hydrodata"):
# Just skip test if this is run on a machine without /hydrodata access
Expand Down Expand Up @@ -99,7 +105,12 @@ def too_slow_test_pqr_too_small():


def test_y_remainder_rows():
"""Test reading a y position which is after the remainder sized y rows in pfb file."""
"""
Test reading a y position which is after the remainder sized y rows in pfb file.
This is an edge case in reading pfb files with subgrids when the subgrid size of the P,Q,R is not
a multiple of the full pfb size. In that case some subgrids are smaller than others
to fit the data in memory in approximately the P,Q,R size. This should still work.
"""

if not os.path.exists("/hydrodata"):
# Just skip test if this is run on a machine without /hydrodata access
Expand Down

0 comments on commit d530ca7

Please sign in to comment.