Skip to content

Commit

Permalink
Merge pull request #318 from ludwig-cf/fix-issue-277
Browse files Browse the repository at this point in the history
Add i/o aggregator check
  • Loading branch information
kevinstratford authored Aug 12, 2024
2 parents b8ed6ef + 1c502c3 commit 9255199
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lb_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ int lb_data_create(pe_t * pe, cs_t * cs, const lb_data_options_t * options,
if (ifail != 0) pe_fatal(pe, "lb_data: bad i/o output decomposition\n");
}

/* Run the aggregator here and now in an attempt to make sure we
* don't suffer an oom at the point of output */

{
io_impl_t * io = NULL;
int ifail = io_impl_create(&obj->output, &io);
if (ifail != 0) pe_exit(pe, "lb_data.c: error in aggregator creation\n");
lb_io_aggr_pack(obj, io->aggr);
io->impl->free(&io);
}

*lb = obj;

return 0;
Expand Down

0 comments on commit 9255199

Please sign in to comment.