Skip to content
Snippets Groups Projects
Commit fc190c48 authored by Andreas Gattringer's avatar Andreas Gattringer
Browse files

butterflies: log message when ending debug run early

parent b67f8f64
Branches
Tags
No related merge requests found
......@@ -42,6 +42,7 @@ static void inline single_random_walk(struct cats_thread_info *ts, struct cats_g
const struct conf_data_butterflies *module_conf = CATS_MODULE_DATA;
const bool debug_rw = module_conf->debug_rw;
int32_t eggs_left = eggs;
const cats_dt_coord max_steps = module_conf->animal_dispersal_max_radius;
......@@ -71,6 +72,7 @@ static void inline single_random_walk(struct cats_thread_info *ts, struct cats_g
return; // we escaped the simulation extent and got lost
}
// is the cell a valid dispersal target location?
if (!(data->info_layer[row][col] & BF_CELL_VALID_DISPERSAL_TARGET)) {
if (debug_rw) {
......@@ -220,6 +222,7 @@ butterflies_cell_dispersal(struct cats_grid *grid, struct cats_thread_info *ts,
if (debug_rw) {
fflush(module_conf->debug_rw_file);
fclose(module_conf->debug_rw_file);
log_message(LOG_IMPORTANT, "Ending simulation early - first cell with random walks complete");
exit_cats(EXIT_SUCCESS);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment