Skip to content

Commit

Permalink
Merge pull request #1002 from TheMarex/small-fixes
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
DennisOSRM committed May 1, 2014
2 parents 27e002e + b4a762f commit b5c095d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Extractor/ExtractionContainers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void ExtractionContainers::PrepareData(
);
std::cout << "ok, after " << get_timestamp() - time << "s" << std::endl;

std::cout << "[extractor] Sorting restrctns. by from... " << std::flush;
std::cout << "[extractor] Sorting restrictions. by from... " << std::flush;
stxxl::sort(
restrictions_list.begin(),
restrictions_list.end(),
Expand Down Expand Up @@ -142,7 +142,7 @@ void ExtractionContainers::PrepareData(
std::cout << "ok, after " << get_timestamp() - time << "s" << std::endl;
time = get_timestamp();

std::cout << "[extractor] Sorting restrctns. by to ... " << std::flush;
std::cout << "[extractor] Sorting restrictions. by to ... " << std::flush;
stxxl::sort(
restrictions_list.begin(),
restrictions_list.end(),
Expand Down
6 changes: 4 additions & 2 deletions extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,16 @@ int main (int argc, char *argv[]) {
return 1;
}

int real_num_threads = std::min(omp_get_num_procs(), requested_num_threads);

SimpleLogger().Write() << "Input file: " << input_path.filename().string();
SimpleLogger().Write() << "Profile: " << profile_path.filename().string();
SimpleLogger().Write() << "Threads: " << requested_num_threads;
SimpleLogger().Write() << "Threads: " << real_num_threads << " (requested " << requested_num_threads << ")";

/*** Setup Scripting Environment ***/
ScriptingEnvironment scriptingEnvironment(profile_path.c_str());

omp_set_num_threads(std::min(omp_get_num_procs(), requested_num_threads));
omp_set_num_threads(real_num_threads);

bool file_has_pbf_format(false);
std::string output_file_name = input_path.string();
Expand Down
8 changes: 5 additions & 3 deletions prepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,14 @@ int main (int argc, char *argv[]) {
return 1;
}

int real_num_threads = std::min(omp_get_num_procs(), requested_num_threads);

SimpleLogger().Write() << "Input file: " << input_path.filename().string();
SimpleLogger().Write() << "Restrictions file: " << restrictions_path.filename().string();
SimpleLogger().Write() << "Profile: " << profile_path.filename().string();
SimpleLogger().Write() << "Threads: " << requested_num_threads;
SimpleLogger().Write() << "Threads: " << real_num_threads << " (requested " << requested_num_threads << ")";

omp_set_num_threads( std::min( omp_get_num_procs(), requested_num_threads) );
omp_set_num_threads(real_num_threads);
LogPolicy::GetInstance().Unmute();
boost::filesystem::ifstream restrictionsInstream(restrictions_path, std::ios::binary);
TurnRestriction restriction;
Expand Down Expand Up @@ -245,7 +247,7 @@ int main (int argc, char *argv[]) {
trafficLightNodes.size() << " traffic lights";

/***
* Building an edge-expanded graph from node-based input an turn restrictions
* Building an edge-expanded graph from node-based input and turn restrictions
*/

SimpleLogger().Write() << "Generating edge-expanded graph representation";
Expand Down

0 comments on commit b5c095d

Please sign in to comment.