-
Hello all! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is a tricky one. You certainly can't debug from a python debugger as the code is run on the GPU device. The stringified agent functions are compiled (as cuda c++) on the fly and executed so a Python debugger would not have any way to understand this. The best way to debug would probably to be to add print lines within your agent functions (@Robadob will follow up with an example). We discussed this and it is technically possible to use the cuda debugger to attach to your agent functions but I would expect this to be difficult (to the point we probably wouldn't attempt this!). We are looking at improving our Python interfaces and I am currently drafting the option for pure python functions (although this would undertake source to source compilation so wouldn't actually allow you to debug them). |
Beta Was this translation helpful? Give feedback.
-
Firstly you probably want to build a recent copy of Three options (assuming you're referring to debugging agent behaviour, rather than compilation errors) in order of ease, these all apply to non-python models too.
Actions For Me
|
Beta Was this translation helpful? Give feedback.
Firstly you probably want to build a recent copy of
pyflamegpu
withSEATBELTS
enabled. This runtime error-checking, will throw an exception if you are accessing variables that don't exist and similar. I don't believe this is enabled in the official release builds (@ptheywood can confirm when he's back from leave?), similarly those are now 7 months old so alot of improvements will be missing. (We've been holding off a further release until an academic paper is accepted...)Three options (assuming you're referring to debugging agent behaviour, rather than compilation errors) in order of ease, these all apply to non-python models too.
printf()
You can use the C/C++
printf()
method to print…