Climate-REF / Climate-REF/climate-ref
BlockingIO error when running `ref executions list-groups` in a HPC
- Dominant language
- Python
- Stars
- 26
- Forks
- 14
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 36
Description
## The problem
After I ran REF on a HPC (DOE NERSC), I listed the results using
```
ref executions list-groups
```
And I got the __BlockingIO error__ as follows:
```
│ /pscratch/sd/m/minxu/mytest_ref_2025-08-16/climate-ref/packages/climate-ref/src/climate_ref/cli/_utils.py:68 in pretty_print_df │
│ │
│ 65 │ max_col_count = console.width // 10 │
│ 66 │ table = df_to_table(df, max_col_count=max_col_count) │
│ 67 │ │
│ ❱ 68 │ console.print(table) │
│ 69 │
│ │
│ ╭────────────────────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────────────────╮ │
│ │ console = │ │
│ │ df = │ id key provider diagnostic dirty successful created_at updated_at │ │
│ │ 0 1 cmip6_abrupt-4xCO2_ACCESS-ESM1-5_rsut_r1i1p1f1 example global-mean-timeseries False True 2025-08-17 17:19:58 2025-08-17 17:21:24 │ │
│ │ 1 2 cmip6_historical_ACCESS-ESM1-5_rsut_r1i1p1f1 example global-mean-timeseries False True 2025-08-17 17:19:58 2025-08-17 17:21:24 │ │
│ │ 2 3 cmip6_piControl_ACCESS-ESM1-5_rsut_r1i1p1f1 example global-mean-timeseries False True 2025-08-17 17:19:58 2025-08-17 17:21:24 │ │
│ │ 3 4 cmip6_ssp126_ACCESS-ESM1-5_rsut_r1i1p1f1 example global-mean-timeseries False True 2025-08-17 17:19:58 2025-08-17 17:21:24 │ │
│ │ 4 5 cmip6_abrupt-4xCO2_ACCESS-ESM1-5_tas_r1i1p1f1 example global-mean-timeseries False True 2025-08-17 17:19:58 2025-08-17 17:21:24 │ │
│ │ .. .. ... ... ... ... ... ... ... │ │
│ │ 81 82 cmip6_historical ilamb snc-esacci False True 2025-08-17 17:20:01 2025-08-17 17:28:14 │ │
│ │ 82 83 cmip6_historical ilamb burntfractionall-gfed False True 2025-08-17 17:20:01 2025-08-17 17:27:50 │ │
│ │ 83 84 cmip6_historical ilamb thetao-woa2023-surface False True 2025-08-17 17:20:01 2025-08-17 17:27:59 │ │
│ │ 84 85 cmip6_historical ilamb so-woa2023-surface False True 2025-08-17 17:20:01 2025-08-17 17:27:41 │ │
│ │ 85 86 cmip6_historical ilamb amoc-rapid False True 2025-08-17 17:20:01 2025-08-17 17:27:33 │ │
│ │ │ │
│ │ [86 rows x 8 columns] │ │
│ │ max_col_count = 25 │ │
│ │ table = │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
rror in sys.excepthook:mytest_ref_2025-08-16/climate-ref/.venv/lib/python3.11/site-packages/rich/console.py
Traceback (most recent call last):
File "/pscratch/sd/m/minxu/mytest_ref_2025-08-16/climate-ref/.venv/lib/python3.11/site-packages/rich/console.py", line 2033, in _check_buffer
self._write_buffer()
File "/pscratch/sd/m/minxu/mytest_ref_2025-08-16/climate-ref/.venv/lib/python3.11/site-packages/rich/console.py", line 2102, in _write_buffer
self.file.write(text)
BlockingIOError: [Errno 11] write could not complete without blocking
```
## Definition of "done"
## Additional context
A temporary solution if users meet the similar problem:
```
PYTHONUNBUFFERED=1 ref executions list-groups
```
The complete solution may be need to force blocking mode on stdout/stderr before loading `rich` or `typer`.
Contributor guide
Assessment
This issue has not been assessed yet.