Closed KieCap closed 5 years ago
Not sure if it makes any difference, but /dev/shm
only contains only one file: osrm-region
As a first step, could you check that the data is still loaded at request time? Either running osrm-datastore --list
or just a single top
for memory usage should be enough.
I experienced situations where running osrm-datastore
from a ssh session, then logging out results in the shared memory being released.
Hey @jcoupey, see below:
$ osrm-datastore --list
[info] name shm key timestamp size
[info] eu-car/static 0 1 8194463535
[info] eu-car/updatable 1 1 21025700650
[info] au-car/static 2 1 420672772
[info] au-car/updatable 3 1 1089998231
[info] na-car/static 4 1 7011278772
[info] na-car/updatable 5 1 25194558909
htop
shows almost 60 GB of RAM in use.
I think this is vroom-express
related. Can you confirm if it works with a direct vroom
call ?
echo '{"vehicles":[{"id":0,"profile":"eu-car","start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}]}' > input.json
vroom -i input.json -r libosrm -g
Nope, same error!
$ /opt/osrm/vroom/bin/vroom -i input.json -r libosrm -g
[Error] Invalid shared memory region: eu-car
{"code":3,"error":"Invalid shared memory region: eu-car"}
Are you running all commands from the same user (just to make sure this is not a problem related to system access)?
Forget my previous question, I can reproduce this with OSRM v5.22.0, no matter the dataset name (here with the default car
value):
$ osrm-datastore --dataset-name car my_file.osrm
$ vroom -r libosrm '{"vehicles":[{"id":0,"start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}]}'
[Error] Invalid shared memory region: car
{"code":3,"error":"Invalid shared memory region: car"}
Looks like the interface for using named shared memory changed somewhere between OSRM v5.19.0 and v5.22.0. :-/
Building vroom
against libosrm
v5.19.0 does not issue any warning, while building with v5.22.0 installed triggers a warning that is certainly related:
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/libosrm_wrapper.cpp -o routing/libosrm_wrapper.o
routing/libosrm_wrapper.cpp: In constructor ‘vroom::routing::LibosrmWrapper::LibosrmWrapper(const string&)’:
routing/libosrm_wrapper.cpp:38:18: warning: missing initializer for member ‘osrm::engine::EngineConfig::dataset_name’ [-Wmissing-field-initializers]
_osrm(_config) {
^
The problem is due to the addition of a parameter in the EngineConfig
struct here that breaks our config initialization.
I just pushed a fix/libosrm-dataset-name
branch changing the EngineConfig
initialization to not depend on members order. This should be fine for all libosrm
versions, I checked locally with v5.19.0 and v5.22.0.
@KieCap can you build vroom
from that branch to check that your initial problem is fixed?
Still seems to be happening I'm afraid, but I'll look more closely in the morning.
@jcoupey I did a fresh build of OSRM v5.22.0, and a fresh build of VROOM after checking out to origin/fix/libosrm-dataset-name
and the error still occurs.
Are you seeing any warning when building the fix/libosrm-dataset-name
branch?
the error still occurs
The dataset name should now be correctly set, so maybe you're hitting another problem. In order to confirm, can you check that the profile name passed to the osrm::EngineConfig
is correct when running vroom
, e.g. by applying this patch:
diff --git a/src/routing/libosrm_wrapper.cpp b/src/routing/libosrm_wrapper.cpp
index ceac1e1..09dcee7 100644
--- a/src/routing/libosrm_wrapper.cpp
+++ b/src/routing/libosrm_wrapper.cpp
@@ -7,6 +7,8 @@ All rights reserved (see LICENSE).
*/
+#include <iostream>
+
#include "osrm/coordinate.hpp"
#include "osrm/json_container.hpp"
#include "osrm/route_parameters.hpp"
@@ -30,6 +32,7 @@ osrm::EngineConfig LibosrmWrapper::get_config(const std::string& profile) {
LibosrmWrapper::LibosrmWrapper(const std::string& profile)
: RoutingWrapper(profile), _config(get_config(profile)), _osrm(_config) {
+ std::cout << _config.dataset_name << std::endl;
}
Matrix<Cost>
Applied the diff, ran make clean
, and then make
:
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c main.cpp -o main.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/munkres.cpp -o algorithms/munkres.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/kruskal.cpp -o algorithms/kruskal.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/local_search/operator.cpp -o algorithms/local_search/operator.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/local_search/local_search.cpp -o algorithms/local_search/local_search.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/heuristics/solomon.cpp -o algorithms/heuristics/solomon.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/heuristics/clustering.cpp -o algorithms/heuristics/clustering.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/libosrm_wrapper.cpp -o routing/libosrm_wrapper.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/ors_wrapper.cpp -o routing/ors_wrapper.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/osrm_routed_wrapper.cpp -o routing/osrm_routed_wrapper.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/http_wrapper.cpp -o routing/http_wrapper.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrp.cpp -o problems/vrp.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/cvrp.cpp -o problems/cvrp/cvrp.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/vrptw.cpp -o problems/vrptw/vrptw.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/tsp/tsp.cpp -o problems/tsp/tsp.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/intra_or_opt.cpp -o problems/cvrp/operators/intra_or_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/intra_mixed_exchange.cpp -o problems/cvrp/operators/intra_mixed_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/or_opt.cpp -o problems/cvrp/operators/or_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/reverse_two_opt.cpp -o problems/cvrp/operators/reverse_two_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/mixed_exchange.cpp -o problems/cvrp/operators/mixed_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/intra_relocate.cpp -o problems/cvrp/operators/intra_relocate.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/relocate.cpp -o problems/cvrp/operators/relocate.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/intra_cross_exchange.cpp -o problems/cvrp/operators/intra_cross_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/exchange.cpp -o problems/cvrp/operators/exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/two_opt.cpp -o problems/cvrp/operators/two_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/cross_exchange.cpp -o problems/cvrp/operators/cross_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/cvrp/operators/intra_exchange.cpp -o problems/cvrp/operators/intra_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/intra_or_opt.cpp -o problems/vrptw/operators/intra_or_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/intra_mixed_exchange.cpp -o problems/vrptw/operators/intra_mixed_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/or_opt.cpp -o problems/vrptw/operators/or_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/reverse_two_opt.cpp -o problems/vrptw/operators/reverse_two_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/mixed_exchange.cpp -o problems/vrptw/operators/mixed_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/intra_relocate.cpp -o problems/vrptw/operators/intra_relocate.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/relocate.cpp -o problems/vrptw/operators/relocate.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/intra_cross_exchange.cpp -o problems/vrptw/operators/intra_cross_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/exchange.cpp -o problems/vrptw/operators/exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/two_opt.cpp -o problems/vrptw/operators/two_opt.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/cross_exchange.cpp -o problems/vrptw/operators/cross_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/vrptw/operators/intra_exchange.cpp -o problems/vrptw/operators/intra_exchange.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/tsp/heuristics/christofides.cpp -o problems/tsp/heuristics/christofides.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c problems/tsp/heuristics/local_search.cpp -o problems/tsp/heuristics/local_search.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/generic/matrix.cpp -o structures/generic/matrix.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/generic/edge.cpp -o structures/generic/edge.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/generic/undirected_graph.cpp -o structures/generic/undirected_graph.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/job.cpp -o structures/vroom/job.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/tw_route.cpp -o structures/vroom/tw_route.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/vehicle.cpp -o structures/vroom/vehicle.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/time_window.cpp -o structures/vroom/time_window.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/solution_state.cpp -o structures/vroom/solution_state.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/location.cpp -o structures/vroom/location.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/input/input.cpp -o structures/vroom/input/input.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/solution/summary.cpp -o structures/vroom/solution/summary.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/solution/route.cpp -o structures/vroom/solution/route.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/solution/step.cpp -o structures/vroom/solution/step.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/solution/computing_times.cpp -o structures/vroom/solution/computing_times.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/vroom/solution/solution.cpp -o structures/vroom/solution/solution.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c structures/cl_args.cpp -o structures/cl_args.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c utils/exception.cpp -o utils/exception.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c utils/output_json.cpp -o utils/output_json.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c utils/input_parser.cpp -o utils/input_parser.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c utils/version.cpp -o utils/version.o
mkdir -p ../bin
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -o ../bin/vroom main.o algorithms/munkres.o algorithms/kruskal.o algorithms/local_search/operator.o algorithms/local_search/local_search.o algorithms/heuristics/solomon.o algorithms/heuristics/clustering.o routing/libosrm_wrapper.o routing/ors_wrapper.o routing/osrm_routed_wrapper.o routing/http_wrapper.o problems/vrp.o problems/cvrp/cvrp.o problems/vrptw/vrptw.o problems/tsp/tsp.o problems/cvrp/operators/intra_or_opt.o problems/cvrp/operators/intra_mixed_exchange.o problems/cvrp/operators/or_opt.o problems/cvrp/operators/reverse_two_opt.o problems/cvrp/operators/mixed_exchange.o problems/cvrp/operators/intra_relocate.o problems/cvrp/operators/relocate.o problems/cvrp/operators/intra_cross_exchange.o problems/cvrp/operators/exchange.o problems/cvrp/operators/two_opt.o problems/cvrp/operators/cross_exchange.o problems/cvrp/operators/intra_exchange.o problems/vrptw/operators/intra_or_opt.o problems/vrptw/operators/intra_mixed_exchange.o problems/vrptw/operators/or_opt.o problems/vrptw/operators/reverse_two_opt.o problems/vrptw/operators/mixed_exchange.o problems/vrptw/operators/intra_relocate.o problems/vrptw/operators/relocate.o problems/vrptw/operators/intra_cross_exchange.o problems/vrptw/operators/exchange.o problems/vrptw/operators/two_opt.o problems/vrptw/operators/cross_exchange.o problems/vrptw/operators/intra_exchange.o problems/tsp/heuristics/christofides.o problems/tsp/heuristics/local_search.o structures/generic/matrix.o structures/generic/edge.o structures/generic/undirected_graph.o structures/vroom/job.o structures/vroom/tw_route.o structures/vroom/vehicle.o structures/vroom/time_window.o structures/vroom/solution_state.o structures/vroom/location.o structures/vroom/input/input.o structures/vroom/solution/summary.o structures/vroom/solution/route.o structures/vroom/solution/step.o structures/vroom/solution/computing_times.o structures/vroom/solution/solution.o structures/cl_args.o utils/exception.o utils/output_json.o utils/input_parser.o utils/version.o -lboost_system -lpthread -L/usr/local/lib -losrm -fuse-ld=gold -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -lboost_filesystem -lboost_iostreams -lboost_thread -lrt -ltbb
mkdir -p ../lib
ar cr ../lib/libvroom.a main.o algorithms/munkres.o algorithms/kruskal.o algorithms/local_search/operator.o algorithms/local_search/local_search.o algorithms/heuristics/solomon.o algorithms/heuristics/clustering.o routing/libosrm_wrapper.o routing/ors_wrapper.o routing/osrm_routed_wrapper.o routing/http_wrapper.o problems/vrp.o problems/cvrp/cvrp.o problems/vrptw/vrptw.o problems/tsp/tsp.o problems/cvrp/operators/intra_or_opt.o problems/cvrp/operators/intra_mixed_exchange.o problems/cvrp/operators/or_opt.o problems/cvrp/operators/reverse_two_opt.o problems/cvrp/operators/mixed_exchange.o problems/cvrp/operators/intra_relocate.o problems/cvrp/operators/relocate.o problems/cvrp/operators/intra_cross_exchange.o problems/cvrp/operators/exchange.o problems/cvrp/operators/two_opt.o problems/cvrp/operators/cross_exchange.o problems/cvrp/operators/intra_exchange.o problems/vrptw/operators/intra_or_opt.o problems/vrptw/operators/intra_mixed_exchange.o problems/vrptw/operators/or_opt.o problems/vrptw/operators/reverse_two_opt.o problems/vrptw/operators/mixed_exchange.o problems/vrptw/operators/intra_relocate.o problems/vrptw/operators/relocate.o problems/vrptw/operators/intra_cross_exchange.o problems/vrptw/operators/exchange.o problems/vrptw/operators/two_opt.o problems/vrptw/operators/cross_exchange.o problems/vrptw/operators/intra_exchange.o problems/tsp/heuristics/christofides.o problems/tsp/heuristics/local_search.o structures/generic/matrix.o structures/generic/edge.o structures/generic/undirected_graph.o structures/vroom/job.o structures/vroom/tw_route.o structures/vroom/vehicle.o structures/vroom/time_window.o structures/vroom/solution_state.o structures/vroom/location.o structures/vroom/input/input.o structures/vroom/solution/summary.o structures/vroom/solution/route.o structures/vroom/solution/step.o structures/vroom/solution/computing_times.o structures/vroom/solution/solution.o structures/cl_args.o utils/exception.o utils/output_json.o utils/input_parser.o utils/version.o
$ osrm-datastore --list
[info] name shm key timestamp size
[info] eu-car/static 0 1 8194463535
[info] eu-car/updatable 1 1 21025700650
$ /opt/osrm/vroom/bin/vroom -r libosrm '{"vehicles":[{"id":0,"profile":"eu-car","start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}]}'
[Error] Invalid shared memory region: eu-car
{"code":3,"error":"Invalid shared memory region: eu-car"}
I don't get it, you should have a new line outputted (before the [Error]
message) from:
std::cout << _config.dataset_name << std::endl;
Just in case, the vroom
executable being rebuilt is the one you're calling (/opt/osrm/vroom/bin/vroom
)?
Yeah it is! I don't get it either! To confirm, I updated MAJOR
in utils/version.h
so all my changes are as follows:
diff --git a/src/routing/libosrm_wrapper.cpp b/src/routing/libosrm_wrapper.cpp
index ceac1e1..09dcee7 100644
--- a/src/routing/libosrm_wrapper.cpp
+++ b/src/routing/libosrm_wrapper.cpp
@@ -7,6 +7,8 @@ All rights reserved (see LICENSE).
*/
+#include <iostream>
+
#include "osrm/coordinate.hpp"
#include "osrm/json_container.hpp"
#include "osrm/route_parameters.hpp"
@@ -30,6 +32,7 @@ osrm::EngineConfig LibosrmWrapper::get_config(const std::string& profile) {
LibosrmWrapper::LibosrmWrapper(const std::string& profile)
: RoutingWrapper(profile), _config(get_config(profile)), _osrm(_config) {
+ std::cout << _config.dataset_name << std::endl;
}
Matrix<Cost>
diff --git a/src/utils/version.h b/src/utils/version.h
index c82fcf6..3bce3d0 100644
--- a/src/utils/version.h
+++ b/src/utils/version.h
@@ -10,7 +10,7 @@ All rights reserved (see LICENSE).
*/
-#define MAJOR 1
+#define MAJOR 2
#define MINOR 5
#define PATCH 0
#define DEV 1
(based on HEAD detached at origin/fix/libosrm-dataset-name
)
Version number update:
$ /opt/osrm/vroom/bin/vroom -h
VROOM Copyright (C) 2015-2019, Julien Coupey
Version: 2.5.0-dev
Usage:
vroom [OPTION]... "INPUT"
vroom [OPTION]... -i FILE
Options:
-a PROFILE:HOST (=car:0.0.0.0) routing server
-g, add detailed route geometry and indicators
-i FILE, read input from FILE rather than from stdin
-o OUTPUT, output file name
-p PROFILE:PORT (=car:5000), routing server port
-r ROUTER (=osrm), osrm, libosrm or ors
-t THREADS (=4), number of threads to use
-x EXPLORE (=5), exploration level to use (0..5)
For the sake of it, I tried renaming the dataset name to remove the hyphen, so it's just eucar
, as follows:
$ osrm-datastore --list
[info] name shm key timestamp size
[info] eucar/static 0 1 8194463535
[info] eucar/updatable 1 1 21025700650
And then ran VROOM again:
$ /opt/osrm/vroom/bin/vroom -r libosrm '{"vehicles":[{"id":0,"profile":"eucar","start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}]}'
[Error] Invalid shared memory region: eucar
{"code":3,"error":"Invalid shared memory region: eucar"}
The mind boggles.
Is there some weird restriction on what the dataset name can be called?
My bad, if the dataset name is not correct, the error is thrown when initializing the osrm::OSRM
object with _osrm(_config)
so the LibosrmWrapper
constructor body if not reached at all.
Can you output the content of the profile
variable inside LibosrmWrapper::get_config
with something like:
diff --git a/src/routing/libosrm_wrapper.cpp b/src/routing/libosrm_wrapper.cpp
index ceac1e1..5a587eb 100644
--- a/src/routing/libosrm_wrapper.cpp
+++ b/src/routing/libosrm_wrapper.cpp
@@ -7,6 +7,8 @@ All rights reserved (see LICENSE).
*/
+#include <iostream>
+
#include "osrm/coordinate.hpp"
#include "osrm/json_container.hpp"
#include "osrm/route_parameters.hpp"
@@ -25,6 +27,8 @@ osrm::EngineConfig LibosrmWrapper::get_config(const std::string& profile) {
config.max_alternatives = 1;
config.dataset_name = profile;
+ std::cout << "profile: " << profile << std::endl;
+
return config;
}
Also to try and reproduce, what is your gcc version?
Profile recognised OK:
$ /opt/osrm/vroom/bin/vroom -r libosrm '{"vehicles":[{"id":0,"profile":"eucar","start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}]}'
profile: eucar
[Error] Invalid shared memory region: eucar
{"code":3,"error":"Invalid shared memory region: eucar"}
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
Would doing all this as root
make any difference?
I have the exact same gcc
and OS version... Maybe there is something going on with system permissions that comes in the way and make shared memory inaccessible to the user running vroom
.
I think at that point it would be a good thing to test libosrm
usage itself in isolation. You could do that by adjusting and compiling the basic example provided with OSRM. You'd want to adjust:
// config.storage_config = {argv[1]}; (not required)
config.use_shared_memory = true;
config.dataset_name = "eu-car";
config.algorithm = EngineConfig::Algorithm::CH;
@KieCap any update on this? Did you get a chance to test libosrm
in isolation?
For what it's worth: I'll merge #259 before the next release in any case, even if it does not fully solves this issue.
The osrm::EngineConfig
init fix has been merged with #259. I'm keeping this ticket open in case further inquiries are necessary.
Hey @jcoupey...no I didn't, sorry. I've actually moved on to pastures new in terms of work, so I may not be looking at it again I'm afraid!
@KieCap thanks for your feedback. Considering I couldn't reproduce the remaining problem myself and a fix for the obvious bug has already been merged with #259, I'm closing this ticket for now. Anyone running into similar trouble is welcome to comment here though.
Hello!
I'm gettting the same error (well, the error message got changed to Invalid profile:
, but it's the same error) with my setup.
I'm running osrm-datastore in a seperate docker container from vroom with shared memory and the osrm lockfiles being shared between the two containers.
This is the output in the vroom docker
osrm-datastore --list
[2024-01-25T22:56:42.780052475] [info] name shm key timestamp size
[2024-01-25T22:56:42.780185974] [info] car/static 0 1 254659728
[2024-01-25T22:56:42.780232774] [info] car/updatable 1 1 556069100
But it does not work
vroom -r libosrm '{"vehicles":[{"id": 0, "start": [13.7,48.3]}], "jobs": [{ "id": 0, "description": "test", "location": [13.2,48]}]}'
[Error] Invalid profile: car
{"code":2,"error":"Invalid profile: car"}
Is there a good way to further debug this issue and get a more descriptive error message?
I'm running osrm-datastore in a seperate docker container from vroom with shared memory and the osrm lockfiles being shared between the two containers.
This is likely a problem with memory sharing across containers, in which case it is outside of scope for VROOM itself.
Is there a good way to further debug this issue and get a more descriptive error message?
Yes, by confirming that the routing layer does not work with libosrm on its own on the "other" container, e.g. by running the same osrm-datastore --list
command there, or trying something like the minimum working example of using libosrm
.
I've moved everything into one container and was able to run osrm-routed --shared-memory --dataset-name=car --port=5001 -a MLD
and calculate a route, so the shared memory is not the problem. osrm-datastore --list
also shows the dataset, but vroom still errors with Invalid profile: car
. Should I try to debug and check the thrown exception, or do you already have a clue why this happens?
Edit: I've checked around for a bit and the original error from OSRM is Could not find any metrics for CH in the data. Did you load the right dataset?
. Adding config.algorithm = osrm::EngineConfig::Algorithm::MLD;
to L30 in libosrm_wrapper.cpp solved it and it works!
In relation to #181...
Using OSRM v5.22.0 and VROOM v1.4.0. I've ran the following:
The Node server outputs:
Any ideas?