-
Notifications
You must be signed in to change notification settings - Fork 0
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
require an input file #7
Comments
I'll have overlooked this given that I use visual studio heavily. I've never had access to the code that was used to generate the included map (although I made a crappy implementation during my ug dissertation). Would be nice to explain that too, maybe link the original flamegpu1 ped nav paper? |
I have also run the code, but it's as saying, the program hanged at the loading ... screen. Could you tell me how to run the code? |
Hi You need to tell it where to find the input file that contains the map, e.g.
This example also requests unlimited steps, otherwise the model will only run 1 step. This should be added to the readme. |
Seems the provided map.xml might be faulty aswell?
|
The reason for this, is that this particular model is a copy of one from FLAMEGPU1 and uses the exact same input file. As noted earlier in this issue, the code that generated the input file is long since lost to the best of my knowledge (unless @twinkarma knows). So although we designed the FLAMEGPU2 input file to be compatible, both the input file format and the model have some minor differences.
This particular model doesn't use macro environment (it predates it) so that node would just be empty, that's a case of an overzealous warning. Not sure if the IO has access to check whether that's true when it reports the warning.
This variable is initialised at the start of the simulation, so it doesn't matter that it's not set. |
Aha, gotcha. Cant get the SDL window to open when the map.xml is provided. But opens (loading continusly) when its not provided. |
It's working for me (on Windows/Debug). I don't have a Linux box that I can run the visualisation on, which I presume you're using, @ptheywood may be able to test that side though. I can reproduce the no input file behaviour, off the top of my head that's a side effect of the loading screen waiting for agents to exist (there's been no end of back and forth around when it should be closed). Less clear why the SDL window would fail to open when an input file is provided though, particularly if no errors are being reported to console. It could be a case of the first CUDA kernel hanging when agents exist? But that's not something I've seen in a long while, related to CUDA itself getting stuck dynamically building device code, so very speculative and probably wrong. |
The visualisation window opens for me with the input map.xml file under linux.
@gubbsjuk are you on an optimus laptop, a multi-gpu system or attempting to forward over x? |
Im on Windows. Tried running Debug through visual studio now.
Havent looked into this anything yet, but points towards something iffy with my CUDA. |
x-forwarding is when you are streaming graphics from a linux machine (typically over ssh). Unrelated if you're a windows user.
That appears to be coming from |
It could also be triggered by something in our code which is unchecked prior to the appropriate CUB call. @gubbsjuk If you're on windows then don't worry about my x forwarding comment. With laptops that include integrated graphics (used to be called optimus), if the visualisation is running on the integrated graphics then errors can occur. That's (probably) not the current issue though. Do you know which version of CUDA you have installed and built FLAME GPU with? Knowing the CUB/Thrust version found by CMake would be helpful too, in your build directory there should be a file |
Cuda v12.6 Im sorry for hi-jacking this issue with a seemingly unrelated problem... Any way of forcing wich GPU the viz is running on then? |
No there's a checked
On Windows, if the executable is linked against CUDA Optimus already forces the NVidia GPU to be used. |
I've been unable to reproduce the issue using the same CUDA version and thrust version on my Windows install on a 3060ti (which is Ampere not Ada like your 3500). I don't believe we currently have access to any Ada devices to try and reproduce this ourselves unfortunately. Trying an alternate version of thrust would be my next suggestion, but right now for this repository the only way to do that is to downgrade to an older CUDA version. There is a newer thrust/cub release, 2.6.0 which will presumably ship with CUDA 12.7, but there's nothing in the release notes clearly related to this particular problem (but there might be a difference).
Have you tried to run any other FLAME GPU models than this one? I.e. the examples in the FLAMEGPU/FLAMEGPU2 repository? Do you also know which compute capability you compiled for? ( |
I've potentially managed to encounter/reproduce this within the FLAME GPU 2 test suite rather than this pedestrian navigation example, using CUDA 12.6 on Windows. For my SM86 device, compiling for SM 80 or SM 86 behaves as expected, while compiling for SM 50 or SM 70 with PTX embedding for JIT compilation then This implies you might be able to resolve these issues by setting It'll take a bit more time to work around this, but I'll promote this to it's separate issue for tracking tomorrow. |
Hiya! Will edit this comment in a few. EDIT:
|
The CMake variable for setting the architectures flag is I've downgrade to CUDA 12.5 which is still showing the error unfortunately. |
Whoooops! Rookie mistake... No matter, figured I'd mainly use this example as building blocks. As the main repo is functional I guess I can start from scratch using inspiration from this repo. Let me know if there is anything in specific you want me to test with an Ada GPU at some point :-) Also have a 4060 (Ti?) available aswell if thats of any interest. :-) |
The error is occurring when agents are being sorted, this behaviour occurs when spatial messaging is being used (which isn't the case in the brute force models).
This is by far the most complete example if you want a visualisation, e.g. it has the controls shown in my screenshot above. The intended template is here, but again it's circles spatial3D, so will suffer from the agent sort. You can replace the contents of |
Interesting, as the intended template builds and runs (Debug) just fine...! By the way (haven't looked into it yet) any idea why IntelliSense might be misbehaving on a fresh clone and configure of the template repo? "namespace flamegpu has no member 'XXX'" |
Ah, correction. Your error is occurring when agent IDs are being validated for collision (following agent's loaded from an input file), thought I expect it should also occur with agent sort.
You may want to try Intellisense has had poor support for CUDA since about 2008 (back then the CUDA add-in seemingly was able to modify Intellisense to recognise CUDA), likewise it probably gets a little confused with some of the esoteric approaches we use to abstract away what's required for the simulation. So I've never known it to be perfect when working with CUDA (e.g. the 3rd? chevron in a kernel launch is always red lined). |
Finally!
|
Glad to hear that's worked. I've opened FLAMEGPU/FLAMEGPU2#1253 with my notes on this issue so far, but will have limited time to look into this in the immediate future now we have an apparent workaround. You can also set the re: |
This example does not create a default non-empty map if no input file is provided with navmap agents.
In this case, a visualiastion will show the loading splash screen and never progress.
It would proabbly be a good idea to error and exit if no input map file is passed, or if no navmap agents exist (exit condition?).
Adding some usage info to the reamde wouldn't hurt either.
The text was updated successfully, but these errors were encountered: