-
Notifications
You must be signed in to change notification settings - Fork 22
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
[BugReport] python_native fails to compile #1192
Comments
This is an error trying to compile the agent function I'm assuming you've shared Likewise, are you able to share the agent function. This would help me identify what your compilation error could be. |
Ah sorry, just spotted this is with one of the examples. Give me an hour to look into it. |
I've just built a clean copy of When running Are you able to share:
It did fail to run under a debug build however.
But I think I must have broken this with this PR: #1160, so that's a separate issue. Second time today, I refer to @ptheywood, I know he was looking at moving this check to outside of device code (#1182). |
I'm using the
I have no idea where stdout is going. I'm not redirecting anything in my shell. Is stdout redirected by default somewhere? If so where? I'd love to help! Could you let me know how to get the debug output that is present in your call to |
I've now built it with CUDA 12.2 on Linux (no visualisation though, I've only got access to headless Linux boxes). Same issue post-runtime compilation that I was getting on Windows (with Visualisation) yesterday (already known #1177, with a few suitable workarounds).
Likewise, I called the same example from
Runtime compilation errors should go to regular I forced a compilation error in the same example, and this is how it appeared.
Technically it could be a non-compilation exception being thrown by Jitify, hence no compilation log, but I'm not sure what that would be. At } catch (std::runtime_error const&) {
// jitify does not have a method for getting compile logs so rely on JITIFY_PRINT_LOG defined in cmake
THROW exception::InvalidAgentFunc("Error compiling runtime agent function (or function condition) ('%s'): function had compilation errors (see std::cout), "
"in JitifyCache::buildProgram().",
func_name.c_str());
} If you replace that with the below statement, recompile } catch (std::runtime_error const&e) {
printf(e.what());
throw;
} Given I can't reproduce it locally, it's difficult for me to suggest much else at this time (and I suspect similar of my colleagues). |
The version if jupyter/ipykernal on google colab has a bug that consumes stderr. This was fixed in ipykern in 2021, and I opened an issue with colab in 2021 about this (googlecolab/colabtools#2230), but colab is still running FLAMEGPU/FLAMEGPU2-tutorial-python#10 I've attempted to reproduce your issue as well under linux with visualisation, but as @Robadob found the example compiles successfully for me, before hitting the known issue at runtime with wrapped communication, with commit b0ec5f3 (current master), nvcc 12.2.140, gcc 11.4.0. cmake .. -DCMAKE_CUDA_ARCHITECTURES=86 -DFLAMEGPU_BUILD_PYTHON=ON -DFLAMEGPU_VISUALISATION=ON
cmake --build . --target pyflamegpu -j 8
source lib/Release/python/venv/bin/activate $ python3 ../examples/python_native/boids_spatial3D_wrapped/boids_spatial3D.py
instanced_default_Tcolor_Tpos_Tdir_Tscale-material_flat_Tcolor: Generic vertex attrib named: _normal2 was not found.
instanced_default_Tcolor_Tpos_Tdir_Tscale-material_flat_Tcolor: Generic vertex attrib named: _normal2 was not found.
Traceback (most recent call last):
File "/home/ptheywood/code/flamegpu/FLAMEGPU2/build-12-2-vis/../examples/python_native/boids_spatial3D_wrapped/boids_spatial3D.py", line 430, in <module>
cudaSimulation.simulate()
File "/home/ptheywood/code/flamegpu/FLAMEGPU2/build-12-2-vis/lib/Release/python/venv/lib/python3.10/site-packages/pyflamegpu/pyflamegpu.py", line 9255, in simulate
return _pyflamegpu.CUDASimulation_simulate(self, *args)
pyflamegpu.pyflamegpu.FLAMEGPURuntimeException: (DeviceError) Device function 'inputdata' reported 40000 errors.
First error:
flamegpu/runtime/messaging/MessageSpatial3D/MessageSpatial3DDevice.cuh(545)[12,0,0][864,0,0]:
Spatial messaging radius (0.05) is not a factor of environment dimensions (1, 1, 1), this is unsupported for the wrapped iterator, MessageSpatial3D::In::wrap(). Unfortunatley this does not help us narrow down the issues you are having. Given you appear to have also built pyflamegpu from source successfully, it appears you must have completed the CUDA post-installation steps too (and You also don't appear to have multiple CUDA installations installed (atleast not via apt/dpkg) which would have been my next suggestion too of checkign the value of Are you just running this in a bash terminal, or from within an editor's terminal or similar? Unless you are running via an old version of jupyter I'm not aware of any reasons why the stdout would not be getting printed. |
Yes, I'm running in a plain
I had to switch to another GPU hosting service, now I'm getting the same issue as mentioned in #1177 with both Release and Debug builds and can no longer reproduce the vanishing So from my side this issue here is closed, since I can no longer reproduce it, thanks both of you for your quick support! 🙏 What are the workarounds for that issue? Just disable |
It should be fine then as far as I'm aware.
No problem, I'll close this issue for now but feel free to re-open it if you re-encounter the original problem.
Yes, a build disabling seatbelts via Unfortuantely due to other commitments I'm not sure when I'll have time to fully resolve #1177 (via #1182). |
In addition to disabling seatbelts ( Or simply comment out the check (as you are compiling yourself), let me know if you would like the line numbers. |
Dear FLAMEGPU2 devs, I ran into a pretty straight forward issue, so it's likely I did some setup wrong, if another way to get in touch is preferred over a bug report, please let me know!
How to reproduce:
Build FLAMEGPU2, with FLAMEGPU_BUILD_PYTHON=ON, FLAMEGPU_VISUALISATION=ON, CMAKE_BUILD_TYPE=Release.
Run
System Information: Ubuntu 22.04.4 LTS (GNU/Linux 6.5.0-26-generic x86_64), NVIDIA RTX A4000.
The text was updated successfully, but these errors were encountered: