Description of problem
Hello and Good day. I was trying to run brian2toCuda. (was trying to run the example : brian2cuda/examples/cobahh.py at b01fa83c9dae330b5415ce7c093bf4c7d914e950 · brian-team/brian2cuda · GitHub ). However while running , encountered the error : No module named ‘utils’ error for from utils import set_prefs, update_from_command_line. Now even installing utils using pip install utils does not solve the problem .
[system details : for now using colab and conda environment to not mess up my previous installations ]
Minimal code to reproduce problem
What you have aready tried
Expected output (if relevant)
Actual output (if relevant)
Full traceback of error (if relevant)
Hi @Jeevan_codes8580. The example you link to was used to do automatic benchmarking in many different configurations, so it is a bit more complex than you’d usually write it. The utils
import refers to the utils.py
file that is in the same directory (brian2cuda/examples/utils.py at b01fa83c9dae330b5415ce7c093bf4c7d914e950 · brian-team/brian2cuda · GitHub), You’ll have to put it in the same directory from which you are running the cobahh.py
example.
If you want to try out simpler examples, you can use most examples from the Brian2 documentation, e.g. Example: COBAHH — Brian 2 2.7.1 documentation, and add the lines
import brian2cuda
set_device('cuda_standalone')
after the brian2
import. But note that these examples are usually too small/simple to benefit from GPU acceleration.