-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add Windows support. #31
Comments
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). Once this is included, we should make sure that all future changes still compile and run on Windows. As not all developers have access to a Windows machine, we have to find a way how to make this automatically. We have a Windows machine running here in Basel where the FastDownward developers perform compilation and performance tests as well, and it should be possible to create a script that compiles PROST automatically on that machine and sends an email if compilation fails. We can also use that machine to run some instances and see if the output is as expected. Note that, even though it would be nice to also have performance tests, we have no access to a Windows grid such that this is not a possibility. If you agree on this, we therefore need the following scripts (as part of this issue):
|
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ). There is a problem with fdd.h library included in search_engine.h in line 16. There is no patch instructions for handling that and I cannot find windows version of this lib. The library can be found at BuDDy webpage. Is it an option to download the lib and include it directly if target OS is Windows? |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). There is some discussion on this topic on the archive of the buddy-users mailing list which can be found here: https://sourceforge.net/p/buddy/mailman/buddy-users/. It seems that it is possible to compile the library if the right compiler is used, so I see two possibilities how to proceed (and neither includes the library into our code base):
|
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ). I found a way to install BuDDy to windows after a short discussion and the answer was to install it from a website of a developer that works on porting Linux libraries to Cygwin via As the second proposition for solving the problem concerning BuDDy (removing BuDDy functionality from Windows version), these are the variables and methods that are being used:
So, in case that solution is better, their importance should be discussed. However, before everything, we should decide on which ways should this port to windows be implemented (one or multiple). Possible ways to do it are using:
Cygwin and MinGW don't work good together, it's possible but their communication is complicated and relying to this combination is a bad thing in my opinion. I started porting the app with Cygwin (and succeeded to install BuDDy with it) but current patch notes suggest using flag So, in my opinion, it would be good to chose the way how porting to windows should be done and if multiple ways are to be done, in which order and priority, so that we would have a version for windows soon. It would also be good to contact Mr. Teichteil and discuss his initial idea and work like that. One more note, which different versions of Windows should be covered? Cygwin stopped support for Windows versions older than Windows 7 and from Windows 10 on, there is Bash on Windows that enables users to run native Linux apps on windows without any additional setup (I already tested it and it works like a charm :)). Sorry for a long comment, I hope that it is at least clear as it is long. |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79).
If we leave the external dependencies out of the discussion for now (BuDDy can be removed for Windows easily), I think we should aim for a true Windows version, which is, in my understanding, running the code from Visual Studio. As far as I understand it, Cygwin emulates a Linux-like environment, and I think that the code should run there already.
I'll point Florent to this discussion
I honestly have no idea about Windows version. Just start with the one you have, and then we'll see if it also runs on other (newer) version. |
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ). @thomaskeller79 Is there a particular reason why Also, the patch doesn't cut it for all the changes that need to be done. One of the issues is with For now, I'm generating VS project successfully but am still setting proper flags for correct compilation of the project. |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79).
No, there is no reason for that, it's historical and will be changed with issue #33 anyway, so go ahead and change it accordingly.
Which modifications do you mean? Currently, no one is working on issue #33, so you can go ahead and adapt the search and parser code.
I feared so. Please go on and make sure that everything that is crucial (and the timer is crucial for the learning part of the IDS heuristic) runs on Windows. |
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ). @thomaskeller79 Building and compilation in CMake on Windows now works. Haven't tested anything yet, but I noticed that current The code is online. Testing is due to be done, checking if all corresponding flags are included and adding comments to |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79).
Since I don't use VS, I do not have any preference. If you were to develop PROST in VS, would you like the solution file to be generated automatically? If so, add it. Otherwise, leave it.
Sounds great, I'll try to have a look at the code as soon as possible. In the meanwhile, we should think about doing some performance tests. If we want to do this properly, we should run all the benchmarks on a single machine, even if it takes a couple of days. We could use our groups Windows PC for that. |
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ).
Personally, I would never use Visual Studio for C++ development. Even now I did everything from Visual Studio Command Prompt and a random editor. There can be a short instruction (make a folder, change to that folder and run |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). I tried to compile the planner on Windows (using some VS shell) and got the following error message:
|
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ). I forgot to write here the instructions. You have to install |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). But why does it say "Found FLEX" and "Found BISON" then? |
Original comment by Relić Đorđe (Bitbucket: 557058:f6befa2c-c3fc-4e1b-965b-ab7eca65a967, ). The distribution from which you installed Flex and Bison doesn't contain |
Original comment by osrunescape080417 (Bitbucket: 5b39a13ed38a522e77ff7640, ). I have been studying AI Planning since the middle of April and PDDL since the middle of May. I am intrigued by RDDL and PROST. I would like to compile PROST on my Windows XP machine. I have read issue #31 (i.e., this issue) and patch.txt. Is there a way that I can get the source code for the work that has been done on issue #31 so far? You don't have to go to a lot of trouble for me; if you want, just put all of the source code that requires changes into a single file and I will sort it all out. To show my appreciation, if you desire, I can provide documentation so that others can use my recipe to compile it on their Windows machines. |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). Hi @osrunescape080417 we are happy to share our code with you, and if you manage to get things to run on Windows we'd be happy to include your changes into the repo. I grant you read access to the developer repository, there you can find what we have so far under the branch issue-31. If you need any more help, please let us now! Best, |
Original comment by osrunescape080417 (Bitbucket: 5b39a13ed38a522e77ff7640, ). Thank you, Doctor Keller. |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). @osrunescape080417 I'm not sure how else to contact you - could you send me an email at some point to tho.keller@unibas.ch if you are still interested in this topic, so I can get in contact directly?, |
Original comment by geisserf (Bitbucket: 557058:e7a9f9a5-3ea8-4154-97d2-10446425dce3, GitHub: geisserf). I would like to start working on this issue when I have some time over the next week. The major problem with Windows support right now seems to be the BuDDy library. Since most of the links provided in the above discussions are dead nowadays I think the best way to deal with this is to remove BuDDy from the planner, at least for Windows support (although we should also evaluate how much performance BuDDy actually brings). As far as I see it the only part where we use BDDs is in goal and dead end checks. It seems to me that an alternate approach would be just to introduce state caches for dead ends and goal states. This presents a problem if there will be exponentially many dead ends or goal states, but right now I don’t know of any domain where this actually happens. We could also think of using a more popular BDD library which has Windows support instead. What do you think @{557058:280236d3-4090-4dc9-9a03-b6e1425df4e7} ? |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). The number of dead ends or goals is exponentially in many cases. In crossing traffic, for instance, the goal is reached once the agent reaches the goal cell, but the position of the stones / obstacles is irrelevant. Nonetheless, I agree that we should evaluate how important the usage of the goal and dead end detection is - I wanted to look into this for quite a long time. I started an experiment and will report on the results here once it has finished. |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). Results for 2011/2014 domains with/without BuDDy usage. Turns out that the bdds only help in crossing traffic. Experiments for IPC 2018 domains are still running. |
Original comment by geisserf (Bitbucket: 557058:e7a9f9a5-3ea8-4154-97d2-10446425dce3, GitHub: geisserf). For other domains, at least in the IPPC2014 configuration, the results are actually better without BuDDy usage. Do you know if this is a statistical artefact or is this really a result from having less overhead during search? |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). The largest differences for the IPC 2014 configuration are in triangle tireworld, crossing traffic and navigation, and these are indeed domains where reward locks were detected during training. The small differences of up to \pm 0.02 in elevators, game of life, traffic and skill teaching must be statistical noise because no reward locks were detected during the training phase and bdd usage is hence turned off for both planner configuration. Finally, the difference for wildfire might be explained by BDD usage (there are 3 instances where reward locks are detected), but it could also be noise. The IPC 2011 configuration always had a larger variance, as can be seen in sysadmin: there, both planners are identical (no reward locks detected in sysadmin), but the difference is 0.07! |
Original comment by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79). Providing results for IPC 2018 is harder than expected, because the scripts do not work for those domains. I’ll see if I can dedicate time to this today or not. |
Original comment by geisserf (Bitbucket: 557058:e7a9f9a5-3ea8-4154-97d2-10446425dce3, GitHub: geisserf). I see, so BDDs are never detrimental. I think we could also measure the difference to using a normal map to cache states. It’s true that in some cases there might be exponentially many goal states, but adding the states to the BDD (by applying the or operator) also induces some overhead, so it might be interesting to see how a naive caching approach performs (but maybe you already tried this back when you implemented the BDD approach?). Especially since BDDs for goal formula can also become exponentially large (e.g. when encoding the goal description of Connect Four). |
I started to work on this issue today and managed to build the planner in debug mode on windows and executing the unit tests:
I did not yet run the planner normally, but what I want to discuss is some of the warning messages which we normally disable and that are automatically enabled in Visual Studio, in particular conversion warnings. Here is the output of the debug build when I compile search with VS2019: https://pastebin.com/uN17eZ0n. This already excludes some more extreme warnings, such as Do we want to get rid of these warnings or should we just disable conversion warnings for windows build systems as well? If we do want to get rid of them perhaps creating a separate issue that deals with conversion warnings is more appropriate, because this might induce quite a lot of changes which are not necessarily linked to building the planner under windows. |
Most of these will be fixed by adding static_cast<>() statements, which I am in favor of. After we have updated these, I would even switch to a gcc configuration that doesn't ignore this type of warning. Let's have a look at what is left after these are fixed, it will be easier then to decide on a case by case basis what to do. |
I will create a separate issue to fix the warnings, since it is not necessarily related to compiling under windows and a separate issue makes it easier to track the changes related only to windows compilation. |
In the old work on this issue by Relić Đorđe Buddy is disabled if it is not found. Once issue #31 is resolved we can add a Windows test build to github. I would not add a MacOS build as long as we do not explicitly support MacOS as well. |
Original report by tkeller (Bitbucket: 557058:280236d3-4090-4dc9-9a03-b6e1425df4e7, GitHub: thomaskeller79).
Florent Teichteil-Koenigsbuch recently provided a patch (which is attached) that allows to run the planner on Windows. We should evaluate the planners performance on Windows before we incorporate the (awesome, thanks Florent!) addition into the main repo.
The text was updated successfully, but these errors were encountered: