-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Develop win rebased #880
Develop win rebased #880
Conversation
Great, thanks for the update. I also got a Windows license. |
Great! By the way, on Linux 67 cucumber tests are failing. Now I am compiling unpatched develop version to compare. |
@@ -810,7 +811,7 @@ class StaticRTree : boost::noncopyable { | |||
found_a_nearest_edge = true; | |||
} else | |||
if( DoubleEpsilonCompare(current_perpendicular_distance, min_dist) && | |||
( 1 == abs(current_edge.id - result_phantom_node.edgeBasedNode ) ) && | |||
( DoubleEpsilonCompare((double) current_edge.id - result_phantom_node.edgeBasedNode , 1) ) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casting to double here doesn't make much sense as we are comparing integers here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a problematic place - (unsigned) - (unsigned) is causing compilation errors.
(abs is not compiling due to many possible overloads)
I'll replace it with id1==id2+1 || id1+1==id2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was also producing incorrect results (no ide, why). Was fixed :)
We (mostly I :) ) have a problem. The patching introduced 67 failing tests, in clean develop branch only one fails. I'll locate the problematic places and improve the patces. |
thank god for tests :-) |
thank god for tests :-) |
thank god for tests :-) |
1 similar comment
thank god for tests :-) |
@alex85k Which test is failing in Windows? Can you run the one test verbose and report the output? |
Too many tests fail with incorrect result (not running error), must be something like signed/unsigned datatype mismatch I am still unable to run tests on Windows (problem with launching/stopping/connecting service - occupied socket or something like that), there are results of running on Linux with changed code. I am checking commits one-by-one to isolate bad change. |
Only failing test for current develop is "Basic travel time, 1km scale" here is the log: |
Bad commit detected: |
we should try to get the cucumber tests running on windows. can you create a gist with the command line output? |
There are just timeout errors from routed (after patching .rb files to open exe files and avoid unix utilities). |
I have re-published the fixed patches. |
I have a lead on the single failing test. It comes down to floating point precision and actual differences in hardware, i.e. the tests pass on some processor/compiler combinations, but fail on others. |
The test scripts were adapted to run on Windows (Linux testing is passing correctly, I checked) Problem with timeout existed because the routing on my 2-core PC is running very slow on Windows - about 1 second per one viaroute request (8-core Linux server is about 4 times faster). When the testing process will finish (~1hour), I'll post the duration and failing tests info. |
Wow! The tests passed successfully on Windows! :) (One test is failing on both Linux and Windows (I did not use last commit from develop branch). |
Great job. The last failing test should also be ok, if you rebase onto latest develop branch |
One more rebase is not a problem :) (the commits in this PR will soon change a little) |
Yes! The last test passed. |
By the way, there are some problems with automatic tests on Travis CI (great feature!): |
yeah, no idea why travis is failing. will have to investigate at a later point. |
I investigated slow runnig of test on Windows. After many pring-based debuging, trivial answer was found: All the tests on Windows passed in 12 minutes only (Core 2 Duo E6400, empty test/cache folder) (I have also used datastore-based launcher from #889 , but inserted osrm-routed shutdown code to avoid strange errors ) |
My updated testing sources are here: https://github.com/alex85k/Project-OSRM/commits/experimental/cuke_datastore |
@alex85k nice progress. Could you write up a gist on how to install dependencies on windows? |
well done. |
your branch now includes my commit tat uses osrm-datastore during test. why is it requried to shutdown osrm-routed each time on windows? |
Yes, I included your datastore-runner (branching result isn git is always some random surprice for me) for demonstration, mine did not work well enough :) (iI did not know about stici variables and correct usinf ifs in Ruby).
Thank you. I have batch files that downloads and install all dependencies, will publish them as soon as possible. |
Cool. Let's put this batch file in the repo, too |
Here are the instructions and batch files: At this point building is still semi-manual (you need to download some libraries, edit some path in the file and install problematic libraries like stxxl), maybe after your experience with building it can be automated and placed to the repository. Do not hesitate to remind if I forgot something... |
i don't have a windows dev setup. but you you try adding a delay after ruby calls osrm-datastore, and see if that make tests pass. |
I have inserted 7 seconds delay before and after osrm-datastore and also adding --threads 1. --threads 1 without delay does not help. |
sevend seconds delay sounds pretty obnoxious :-) it sounds to be like something in the launch mechanics is broken. |
i suggest leaving out the code for using osrm-datastore with cucumber from this PR, and handle it in a separate one. |
yeah, let's keep this separate. |
OK, this issue is about Windows.compatibility, not about testing. However, I had to reimplement shared-memory base class on Windows (without any experience in interprocess communication, except MPI), so please check that part well before including (and without that part it can not compile) :) About manual running: if I start osrm-routed manually one time and test with reloading osrm-datastore, the results are the same (small delays - more errors, big delays - rare errors, mostly falling server). If I reload the data manually, then server seems to work correctly. But I remember one run, when manual loading data from different pbf extract with osrm-datastore gave me the segm. fault of osrm-routed on next query (on Windows). |
I also tried enabling all possible logging (removed output redirecting to file, added debugging output to routed on memory reload). The order of calls seems to be correct even for failing tests: loading to memory finished, then delay, then first request triggers memory reload before answering, then next requests are processed. If osrm-routed fails, it does this somewhere inside the request processing, not always on the last request of the test. |
it's probably a problem with your reimplementation of shared mem then? @DennisOSRM do you want full windows compatibility including shared mem before merging this branch, or you prefer to merge as-is and fix the shared mem stuff later? |
I am afraid unpatched develop version may have datastore-testing errors too in Linux environment (I had the same errors on RedHat and Ubuntu, but you may recheck to be sure). |
I have updated path to the recent OSRM 0.3.8 and created new pull-request |
@alex85k would you like to update this PR or would you go for an new PR? |
Closing in favor of #979 |
Pathces for issue #646
Hope something of this compatibity code could be useful
This one does compile on Linux too (checked on old RHEL with custom-built gcc 4.7.2 and libaries from sources)