Skip to content

Commit

Permalink
Fix seg fault when exiting before output or container object is insta…
Browse files Browse the repository at this point in the history
…ntiated
  • Loading branch information
Martin D. Weinberg committed Nov 21, 2024
1 parent 817892c commit 3ebd453
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OutputContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public:
void initialize();

//! Execute the all methods in the container
void Run(int nstep, int mstep=std::numeric_limits<int>::max(), bool last=false);
void Run(int nstep, int mstep=std::numeric_limits<int>::max(), bool final=false);
};

#endif
Expand Down
4 changes: 2 additions & 2 deletions src/end.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
void clean_up(void)
{
// Call for final output to files
output->Run(this_step, 0, true);
if (output) output->Run(this_step, 0, true);
// Cache for restart
external->finish();
if (external) external->finish();

MPI_Barrier(MPI_COMM_WORLD);

Expand Down

0 comments on commit 3ebd453

Please sign in to comment.