-
I would like to import myAgentFunction = fr"""
#include <helper_math.h>
FLAMEGPU_AGENT_FUNCTION(myAgentFunction, flamegpu::MessageArray3D, flamegpu::MessageArray3D) {{
// agent code using float3 here
}}
""" Error output:
Error iteself: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I don't actually recognise that error, it's coming from Jitify which we use for handling RTC compilation. But I know enough about RTC to explain the likely problem. The RTC compiler does not have access to the CUDA_samples directory or CUDA include directory, I'm not even sure if we specify the working directory as somewhere it can look for include files. Similarly, standard C/C++ system headers are not available to NVRTC, and Jitify provides shims for a subset of them. This generally means including additional headers within RTC kernels can be a bit delicate. We recognise that basic vector maths are very useful, and have an experimental feature The reason this feature remains experimental, is that the technique Jitify uses for processing source prior to runtime compilation is inefficient for large include hierarchies. So the simple act of including the core GLM header, prohibitively increases the compile time of RTC kernels (e.g. 60 seconds per agent function). We have an open issue to address this with a workaround, but it's not something we've got around to yet. If you would like to use GLM, it would require a build of pyflamegpu with Otherwise, I can try and find time to look into this next week, it might be as simple as copying the header to where pyflamegpu finds the flame gpu headers (inside the python work packages dir for pyflamegpu). Or it might require some more advanced tinkering, potentially even another patch to Jitify (I had to submit one to get GLM supported). Regardless, I don't believe our documentation has any coverage related to including 3rd party headers (especially in the context of RTC), so i'll create an issue for this too. |
Beta Was this translation helpful? Give feedback.
I don't actually recognise that error, it's coming from Jitify which we use for handling RTC compilation. But I know enough about RTC to explain the likely problem.
The RTC compiler does not have access to the CUDA_samples directory or CUDA include directory, I'm not even sure if we specify the working directory as somewhere it can look for include files. Similarly, standard C/C++ system headers are not available to NVRTC, and Jitify provides shims for a subset of them. This generally means including additional headers within RTC kernels can be a bit delicate.
We recognise that basic vector maths are very useful, and have an experimental feature
USE_GLM
, which enables access to glm vector …