Skip to content
Snippets Groups Projects
Commit 9da70d63 authored by Kyle Klenk's avatar Kyle Klenk
Browse files

Add extra logging for HRU actor and remove unnecessary logging in Job actor

parent a9ac641d
No related branches found
No related tags found
No related merge requests found
#include "hru_actor.hpp" #include "hru_actor.hpp"
bool hru_extra_logging = false;
namespace caf { namespace caf {
behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU,
...@@ -110,8 +112,9 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, ...@@ -110,8 +112,9 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU,
}, },
[=](update_timeZoneOffset, int iFile) { [=](update_timeZoneOffset, int iFile) {
aout(self) << "Recieved New iFile-" << iFile if (hru_extra_logging)
<< " to update timeZoneOffset \n"; aout(self) << "Recieved New iFile-" << iFile
<< " to update timeZoneOffset \n";
int err; int err;
self->state.iFile = iFile; self->state.iFile = iFile;
setTimeZoneOffset(&iFile, self->state.hru_data, &err); setTimeZoneOffset(&iFile, self->state.hru_data, &err);
...@@ -119,8 +122,9 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, ...@@ -119,8 +122,9 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU,
// BMI - Functions // BMI - Functions
[=](update_hru, int timestep, int forcingstep) { [=](update_hru, int timestep, int forcingstep) {
aout(self) << "Computing Time Step: " << timestep if (hru_extra_logging)
<< " Forcing Step: " << forcingstep << "\n"; aout(self) << "Computing Time Step: " << timestep
<< " Forcing Step: " << forcingstep << "\n";
self->state.output_structure_step_index = 1; self->state.output_structure_step_index = 1;
self->state.timestep = timestep; self->state.timestep = timestep;
self->state.forcingStep = forcingstep; self->state.forcingStep = forcingstep;
......
...@@ -139,7 +139,7 @@ behavior job_actor(stateful_actor<job_state>* self, ...@@ -139,7 +139,7 @@ behavior job_actor(stateful_actor<job_state>* self,
}, },
[=](update_hru){ [=](update_hru){
aout(self) << "Job_Actor: Updating HRUs\n"; // aout(self) << "Job_Actor: Updating HRUs\n";
for(auto gru : self->state.gru_container.gru_list) { for(auto gru : self->state.gru_container.gru_list) {
self->send(gru->getGRUActor(), update_hru_v, self->send(gru->getGRUActor(), update_hru_v,
self->state.timestep, self->state.forcingStep); self->state.timestep, self->state.forcingStep);
...@@ -150,7 +150,8 @@ behavior job_actor(stateful_actor<job_state>* self, ...@@ -150,7 +150,8 @@ behavior job_actor(stateful_actor<job_state>* self,
self->state.num_gru_done_timestep++; self->state.num_gru_done_timestep++;
if (self->state.num_gru_done_timestep >= self->state.num_gru) { if (self->state.num_gru_done_timestep >= self->state.num_gru) {
aout(self) << "Job_Actor: Done Update\n"; aout(self) << "Job_Actor: Done Update for timestep:"
<< self->state.timestep << "\n";
// write the output // write the output
int steps_to_write = 1; int steps_to_write = 1;
int start_gru = 1; int start_gru = 1;
...@@ -166,9 +167,8 @@ behavior job_actor(stateful_actor<job_state>* self, ...@@ -166,9 +167,8 @@ behavior job_actor(stateful_actor<job_state>* self,
self->send_exit(self->state.file_access_actor, self->send_exit(self->state.file_access_actor,
exit_reason::user_shutdown); exit_reason::user_shutdown);
self->quit(); self->quit();
} else { }
aout(self) << "Job_Actor: Done Writing Output\n"; // else { aout(self) << "Job_Actor: Done Writing Output\n"; }
}
}); });
self->state.timestep++; self->state.timestep++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment