Skip to content

Commit

Permalink
Thread number only prints in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Jun 13, 2023
1 parent 1565ffb commit 51b209c
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions include/epiworld/database-meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ inline void DataBase<TSeq>::reset()
transmission_target.clear();
transmission_source_exposure_date.clear();



return;

}
Expand Down Expand Up @@ -803,15 +801,15 @@ inline void DataBase<TSeq>::write_data(
}

file_variant <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread "<< "date " << "id " << "state " << "n\n";
#else
"date " << "id " << "state " << "n\n";
#endif

for (epiworld_fast_uint i = 0; i < hist_variant_id.size(); ++i)
file_variant <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
hist_variant_date[i] << " " <<
Expand All @@ -834,7 +832,7 @@ inline void DataBase<TSeq>::write_data(
}

file_tool_info <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"id " << "tool_name " << "tool_sequence " << "date_recorded\n";
Expand All @@ -843,7 +841,7 @@ inline void DataBase<TSeq>::write_data(
{
int id = t.second;
file_tool_info <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
id << " \"" <<
Expand All @@ -868,14 +866,14 @@ inline void DataBase<TSeq>::write_data(
}

file_tool_hist <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"date " << "id " << "state " << "n\n";

for (epiworld_fast_uint i = 0; i < hist_tool_id.size(); ++i)
file_tool_hist <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
hist_tool_date[i] << " " <<
Expand All @@ -898,14 +896,14 @@ inline void DataBase<TSeq>::write_data(
}

file_total <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"date " << "nvariants " << "state " << "counts\n";

for (epiworld_fast_uint i = 0; i < hist_total_date.size(); ++i)
file_total <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
hist_total_date[i] << " " <<
Expand All @@ -928,14 +926,14 @@ inline void DataBase<TSeq>::write_data(
}

file_transmission <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"date " << "variant " << "source_exposure_date " << "source " << "target\n";

for (epiworld_fast_uint i = 0; i < transmission_target.size(); ++i)
file_transmission <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
transmission_date[i] << " " <<
Expand All @@ -960,7 +958,7 @@ inline void DataBase<TSeq>::write_data(
}

file_transition <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"date " << "from " << "to " << "counts\n";
Expand All @@ -973,7 +971,7 @@ inline void DataBase<TSeq>::write_data(
for (int from = 0u; from < ns; ++from)
for (int to = 0u; to < ns; ++to)
file_transition <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
i << " " <<
Expand Down Expand Up @@ -1116,14 +1114,14 @@ inline void DataBase<TSeq>::reproductive_number(
}

fn_file <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"variant source source_exposure_date rt\n";

for (auto & m : map)
fn_file <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
m.first[0u] << " " <<
Expand Down Expand Up @@ -1745,15 +1743,15 @@ inline void DataBase<TSeq>::generation_time(


fn_file <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
"thread " <<
#endif
"variant source source_exposure_date gentime\n";

size_t n = agent_id.size();
for (size_t i = 0u; i < n; ++i)
fn_file <<
#ifdef _OPENMP
#ifdef EPI_DEBUG
EPI_GET_THREAD_ID() << " " <<
#endif
virus_id[i] << " " <<
Expand Down

0 comments on commit 51b209c

Please sign in to comment.