Error code 50 when compiling brian2genn code

I encountered the following error when running the “” provided by brian2genn. It looks like a out of memory issue during compilation. Thanks for any help.

Description of problem

Traceback (most recent call last):
  File "", line 50, in <module>
  File "/home/wxie/local_pkgs/brian2/brian2/units/", line 2428, in new_f
    result = f(*args, **kwds)
  File "/home/wxie/local_pkgs/brian2/brian2/core/", line 377, in run
    return, report=report, report_period=report_period,
  File "/home/wxie/local_pkgs/brian2/brian2/core/", line 230, in run, duration, report=report, report_period=report_period,
  File "/home/wxie/local_pkgs/brian2/brian2/core/", line 291, in device_override_decorated_function
    return getattr(curdev, name)(*args, **kwds)
  File "/home/wxie/local_pkgs/brian2genn/brian2genn/", line 1900, in network_run
    super(GeNNDevice, self).network_run(net=net, duration=duration,
  File "/home/wxie/local_pkgs/brian2/brian2/devices/cpp_standalone/", line 1535, in network_run, **self.build_options)
  File "/home/wxie/local_pkgs/brian2genn/brian2genn/", line 880, in build
    raise RuntimeError(('Project compilation failed (Command {cmd} '
RuntimeError: Project compilation failed (Command ['/home/wxie/local_pkgs/genn/bin/', '-i', '/home/wxie/example:/home/wxie/example/simple_example_synapses:/home/wxie/example/simple_example_synapses/brianlib/randomkit', 'magicnetwork_model.cpp'] failed with error code 50).
See the output above (if any) for more details.

Hi @DavidKing2020 . Why do you think this is a memory issue? It’s hard to say what is going on just by the error message you posted. Could you run it again with debug=True in the set_device call at the beginning? I think it should give more output in that case. Also, what versions of brian2, brian2genn and genn are you using?

Hi Marcel, this error message doesn’t come up when running in a less busier machine. That made me think it’s a memory issue. Further inputs would be appreciated. The attached is the output after setting the debug=True.

out.txt (15.3 KB)

Here are the version of the softwares:

  • Brian2:
  • Brian2genn: 1.6
  • genn: 4.7.1

Thanks for the error output. The actual problem seems to be this:

cuda driver error 999: CUDA_ERROR_UNKNOWN

As far as I can tell, this is not an issue with GeNN or Brian2GeNN, but rather a problem with the nvidia driver. Apparently restarting the machine should fix it, otherwise reloading the drivers should work as well. See some example commands you could try here: python - Runtime error 999 when trying to use cuda with pytorch - Stack Overflow

1 Like

Thanks. From the provided solutions in that link, the command “nvidia-modprobe -u” solved the problem without requiring superuser account.

1 Like