summaryrefslogtreecommitdiff
path: root/extractor
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-03-08 11:44:25 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-03-08 11:44:25 +0000
commite4bbb2cfdcb735b69203886d1c63104343c1bdc2 (patch)
treee82e499a787050350c7a2964d8f6a6be2b0bd5df /extractor
parent092b7cf020680e949d6956ec6ef2cf012faccd86 (diff)
Critical region for stderr write.
Diffstat (limited to 'extractor')
-rw-r--r--extractor/rule_factory.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/extractor/rule_factory.cc b/extractor/rule_factory.cc
index a5505ced..fbc62e50 100644
--- a/extractor/rule_factory.cc
+++ b/extractor/rule_factory.cc
@@ -201,11 +201,14 @@ Grammar HieroCachingRuleFactory::GetGrammar(const vector<int>& word_ids) {
}
Clock::time_point stop_time = Clock::now();
- cerr << "Total time for rule lookup, extraction, and scoring = "
- << GetDuration(start_time, stop_time) << " seconds" << endl;
- cerr << "Extract time = " << total_extract_time << " seconds" << endl;
- cerr << "Intersect time = " << total_intersect_time << " seconds" << endl;
- cerr << "Lookup time = " << total_lookup_time << " seconds" << endl;
+ #pragma omp critical (stderr_write)
+ {
+ cerr << "Total time for rule lookup, extraction, and scoring = "
+ << GetDuration(start_time, stop_time) << " seconds" << endl;
+ cerr << "Extract time = " << total_extract_time << " seconds" << endl;
+ cerr << "Intersect time = " << total_intersect_time << " seconds" << endl;
+ cerr << "Lookup time = " << total_lookup_time << " seconds" << endl;
+ }
return Grammar(rules, scorer->GetFeatureNames());
}