Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes #1002

Merged
merged 2 commits into from
May 1, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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