Skip to content
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

Wrapped MsgSpatial interaction radius factor bug #1177

Open
ptheywood opened this issue Jan 29, 2024 · 0 comments · May be fixed by #1182
Open

Wrapped MsgSpatial interaction radius factor bug #1177

ptheywood opened this issue Jan 29, 2024 · 0 comments · May be fixed by #1182
Labels

Comments

@ptheywood
Copy link
Member

#1160 added checks that comm radii are a factor of the environment when using spacial comms with seatbelts enabled.

This seems to be incorrectly triggering in some cases, including the python_native example.

python3 ../examples/python_native/boids_spatial3D_wrapped/boids_spatial3D.py -t  -v
FLAME GPU 2.0.0-rc.2+25a37160
Simulation configuration:
        Random Seed: 1706546446
        Steps: 1
RTC Initialisation Processing time: 26.107000 s
Init Function Processing time: 0.000000 s
Processing Simulation Step 0
Traceback (most recent call last):
  File "/users/pheywood/flamegpu/FLAMEGPU2/build-gh-123/../examples/python_native/boids_spatial3D_wrapped/boids_spatial3D.py", line 430, in <module>
    cudaSimulation.simulate()
  File "/users/pheywood/flamegpu/FLAMEGPU2/build-gh-123/lib/Release/python/venv/lib64/python3.9/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)[52,0,0][0,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().

Probably due to inexact floating point stuff.

This needs fixing, and the test suite(s) expanding to cover a broader range of cases / edge cases.

Additionally, this check is currenrlty doing expensive ops per thread on device (when seatbelts enabled) which could instead be done once on the host, then a single bool / bit being set on device and read when the iterator is requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant