Error code 50 when compiling brian2genn code

I encountered the following error when running the “simple_example_synapses.py” 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 "simple_example_synapses.py", line 50, in <module>
    run(100*ms)
  File "/home/wxie/local_pkgs/brian2/brian2/units/fundamentalunits.py", line 2428, in new_f
    result = f(*args, **kwds)
  File "/home/wxie/local_pkgs/brian2/brian2/core/magic.py", line 377, in run
    return magic_network.run(duration, report=report, report_period=report_period,
  File "/home/wxie/local_pkgs/brian2/brian2/core/magic.py", line 230, in run
    Network.run(self, duration, report=report, report_period=report_period,
  File "/home/wxie/local_pkgs/brian2/brian2/core/base.py", line 291, in device_override_decorated_function
    return getattr(curdev, name)(*args, **kwds)
  File "/home/wxie/local_pkgs/brian2genn/brian2genn/device.py", line 1900, in network_run
    super(GeNNDevice, self).network_run(net=net, duration=duration,
  File "/home/wxie/local_pkgs/brian2/brian2/devices/cpp_standalone/device.py", line 1535, in network_run
    self.build(direct_call=False, **self.build_options)
  File "/home/wxie/local_pkgs/brian2genn/brian2genn/device.py", line 880, in build
    raise RuntimeError(('Project compilation failed (Command {cmd} '
RuntimeError: Project compilation failed (Command ['/home/wxie/local_pkgs/genn/bin/genn-buildmodel.sh', '-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: 2.5.0.3.post0.dev123
  • 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