brian-team / brian2genn

Brian 2 frontend to the GeNN simulator
http://brian2genn.readthedocs.io/
GNU General Public License v2.0
46 stars 16 forks source link

Cannot open include file: 'brianlib/stdint_compat.h from clocks.h #118

Closed BoarensteinBoar closed 3 years ago

BoarensteinBoar commented 4 years ago

Hello,

I am trying to implement a two-layer SNN 64 x 16. The brian 2code and the error message are shown below. The code works perfectly without BrianGeNN. Clocks.h reads the include directive: <brianlib/stdint_compat.h>. Clocks.h and stdint_compat.h are in the same folder, so i think the include directive should just be . I tried manually changing the clocks.h file but it resets everytime I run the brian2 code.

Error Message running brian code generation ... INFO No numerical integration method specified for group 'neurongroup_1', using method 'exact' (took 0.02s). [brian2.stateupdaters.base.method_choice] INFO No numerical integration method specified for group 'neurongroup', using method 'euler' (took 0.01s, trying other methods took 0.01s). [brian2.stateupdaters.base.method_choice] building genn executable ... Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

genn.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\genn......\lib\genn_Release.lib cuda_backend.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\backends\cuda........\lib\genn_cuda_backend_Release.lib Successfully built GeNN Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

generator.cc D:*\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(197,23): warning C4244: 'argument': conversion from '__time64_t' to 'unsigned long', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*l\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(196,5): warning C4996: '_ftime64': This function or variable may be unsafe. Consider using _ftime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(221,66): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(225,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(228,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(353,68): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*\Python Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:*****\Python Code\GeNNworkspace\brianlib\clocks.h(5,9): fatal error C1083: Cannot open include file: 'brianlib/stdint_compat.h': No such file or directory [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] Unable to build code generator Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: D:*****\Python Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj

Brian 2 Code

from brian2 import *
import brian2genn
set_device('genn')
prefs.devices.genn.path = 'D:\\GameFiles\\genn-4.3.1'
prefs.codegen.target = 'numpy'
from matplotlib import pyplot as plt
%matplotlib inline
from sklearn import datasets
import numpy as np
import pandas as pd
defaultclock.dt = 0.00001*us

digits = datasets.load_digits()
digit_labels = pd.DataFrame(digits.target)# Data Labels(0 -9) of 1796 64-pixel images of handwritten digits
digits = datasets.load_digits()
digit_pixels = pd.DataFrame(digits.data)
digit_pixels.describe()

Idet = digit_pixels/16
#scale and translate 0-1 to 1nA to 100nA
Idet = 99*Idet+1 # in nA
Idet.describe()

R = 100*kohm
C = 0.1*pfarad
tau = R*C 
trefract = 245.5*(1E-9)*ms
print("RC Constant:", tau)
print("Refractory Period:",trefract)
k = R/ohm
print("Current Coefficient:",k)

start_scope()
trefract = 245.5*(1E-9)*ms

Cint = 0.1*pfarad
Cint = Cint/farad
Cint = Cint*second
Npixel = 64

eqsdroic = '''
dv/dt = 1.8/second - I/Cint : 1
I : 1
tau : second
'''
Pixel = NeuronGroup(Npixel, eqsdroic, threshold='v<0.5', reset='v = 1.8', refractory=trefract)
Pixel.I = (Idet.iloc[0, :])*(1E-9)
Pixel.v = '1.8'

R = 10*kohm
C = 0.1*pfarad
tau = R*C
taupre = tau
taupost = tau
Apre = 0.000005
Apost = -Apre*taupre/taupost*1.05
k = R/ohm
eqLIF = '''
dv/dt = -v/tau : 1
'''

SNN = NeuronGroup(16, eqLIF, threshold='v>0.5', reset='v = 0', refractory=trefract)
SNN.v = '0'

kmirror = 2
del_v = kmirror*(1.8*(trefract/second))/(C/farad)
#S = Synapses(Pixel, SNN, 'w : 1', on_pre='v_post += del_v*w')

S = Synapses(Pixel, SNN,              '''
             w : 1
             dapre/dt = -apre/taupre : 1 (event-driven)
             dapost/dt = -apost/taupost : 1 (event-driven)
             ''',
             on_pre='''
             v_post += del_v*w
             apre += Apre
             w = clip(w+apost, 0.000001, 0.00002)
             ''',
             on_post='''
             apost += Apost
             w = clip(w+apre, 0.000001, 0.00002)
             ''')
S.connect()
S.w = 'rand()*0.00001+0.00001'
#S.w = '0.0001'

spikemonpixel = SpikeMonitor(Pixel)
spikemonsnn = SpikeMonitor(SNN)
statemonsnn = StateMonitor(SNN, 'v', record=0)
run(200*us)

"""plot(spikemonpixel.t/us, spikemonpixel.i, '.k')
xlabel('Time (us)')
ylabel('Neuron index')"""

plot(spikemonsnn.t/us, spikemonsnn.i, '.k')
xlabel('Time (us)')
ylabel('Neuron index')
neworderofjamie commented 4 years ago

Sorry to hear you're having problems with Brian2GeNN. I managed to run your script successfully on my Windows machine so it's not a fundamental issue! Could you add logger.warn(cmd) here and paste the output here so we can figure out what's going wrong?

BoarensteinBoar commented 4 years ago

Hello, I pasted the error below. I forgot to mention I was running the script in Jupyter Lab using Python 3.0 and CUDA 10.1

running brian code generation ... INFO No numerical integration method specified for group 'neurongroup_1', using method 'exact' (took 0.02s). [brian2.stateupdaters.base.method_choice] INFO No numerical integration method specified for group 'neurongroup', using method 'euler' (took 0.01s, trying other methods took 0.01s). [brian2.stateupdaters.base.method_choice] building genn executable ... WARNING D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python Code;D:\Name\Python Code\GeNNworkspace;D:\Name\Python Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python Code\GeNNworkspace\project.vcxproj" [brian2.devices.genn] Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

genn.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\genn......\lib\genn_Release.lib cuda_backend.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\backends\cuda........\lib\genn_cuda_backend_Release.lib Successfully built GeNN Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

generator.cc D:\Name\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(197,23): warning C4244: 'argument': conversion from '__time64_t' to 'unsigned long', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(196,5): warning C4996: '_ftime64': This function or variable may be unsafe. Consider using _ftime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(221,66): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(225,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(228,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(353,68): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python Code\GeNNworkspace\brianlib\clocks.h(5,9): fatal error C1083: Cannot open include file: 'brianlib/stdint_compat.h': No such file or directory [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] Unable to build code generator Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: D:\Name\Python Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj

CalledProcessError Traceback (most recent call last) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 901 try: --> 902 self.compile_source(debug, directory, use_GPU) 903 except CalledProcessError as ex:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in compile_source(self, debug, directory, use_GPU) 1170 # making seperate check_calls doesn't work -> 1171 check_call(cmd, cwd=directory, env=env) 1172 else:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\subprocess.py in check_call(*popenargs, **kwargs) 310 cmd = popenargs[0] --> 311 raise CalledProcessError(retcode, cmd) 312 return 0

CalledProcessError: Command 'D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python Code;D:\Name\Python Code\GeNNworkspace;D:\Name\Python Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python Code\GeNNworkspace\project.vcxproj"' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)

in 59 spikemonsnn = SpikeMonitor(SNN) 60 statemonsnn = StateMonitor(SNN, 'v', record=0) ---> 61 run(100*us) 62 63 """plot(spikemonpixel.t/us, spikemonpixel.i, '.k') C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\units\fundamentalunits.py in new_f(*args, **kwds) 2390 get_dimensions(newkeyset[k])) 2391 -> 2392 result = f(*args, **kwds) 2393 if 'result' in au: 2394 if au['result'] == bool: C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(duration, report, report_period, namespace, profile, level) 372 ''' 373 return magic_network.run(duration, report=report, report_period=report_period, --> 374 namespace=namespace, profile=profile, level=2+level) 375 run.__module__ = __name__ 376 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(self, duration, report, report_period, namespace, profile, level) 230 self._update_magic_objects(level=level+1) 231 Network.run(self, duration, report=report, report_period=report_period, --> 232 namespace=namespace, profile=profile, level=level+1) 233 234 def store(self, name='default', filename=None, level=0): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\base.py in device_override_decorated_function(*args, **kwds) 276 curdev = get_device() 277 if hasattr(curdev, name): --> 278 return getattr(curdev, name)(*args, **kwds) 279 else: 280 return func(*args, **kwds) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1843 report_period=report_period, 1844 namespace=namespace, -> 1845 level=level + 1) 1846 self.run_statement_used = True 1847 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\devices\cpp_standalone\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1512 'device.build call to use multiple run ' 1513 'statements with this device.') -> 1514 self.build(direct_call=False, **self.build_options) 1515 1516 def network_store(self, net, *args, **kwds): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 906 'See the output above (if any) for more ' 907 'details.').format(cmd=ex.cmd, --> 908 returncode=ex.returncode) 909 ) 910 if run: RuntimeError: Project compilation failed (Command D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python Code;D:\Name\Python Code\GeNNworkspace;D:\Name\Python Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python Code\GeNNworkspace\project.vcxproj" failed with error code 1). See the output above (if any) for more details.
neworderofjamie commented 4 years ago

Can you try moving your project into a path without spaces? e.g. D:\Name\Python_Code\. This looks like a bug somewhere in handling paths with spaces.

BoarensteinBoar commented 4 years ago

It helped fix some things. But there's still some problems left with CUDA. CUDA 10.1 props is not in the target directory. Here's the error:

running brian code generation ... INFO No numerical integration method specified for group 'neurongroup_1', using method 'exact' (took 0.02s). [brian2.stateupdaters.base.method_choice] INFO No numerical integration method specified for group 'neurongroup', using method 'euler' (took 0.01s, trying other methods took 0.01s). [brian2.stateupdaters.base.method_choice] building genn executable ... WARNING D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" [brian2.devices.genn] Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

genn.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\genn......\lib\genn_Release.lib cuda_backend.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\backends\cuda........\lib\genn_cuda_backend_Release.lib Successfully built GeNN Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

generator.cc D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(197,23): warning C4244: 'argument': conversion from '__time64_t' to 'unsigned long', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(196,5): warning C4996: '_ftime64': This function or variable may be unsafe. Consider using _ftime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(221,66): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(225,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(228,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(353,68): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\common_math.h(8,1): warning C4005: 'INFINITY': macro redefinition [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(90): message : see previous definition of 'INFINITY' [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\common_math.h(9,1): warning C4005: 'NAN': macro redefinition [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(94): message : see previous definition of 'NAN' [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(83,51): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(83,51): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(112,42): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(86,69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(86,69): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(87,69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(87,69): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(89,75): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(89,75): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(92,77): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(92,77): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(163,54): warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(163,54): warning C4267: 'initializing': conversion from 'size_t' to 'const int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(180,52): warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(180,52): warning C4267: 'initializing': conversion from 'size_t' to 'const int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] Generating code Previous IPDB not found, fall back to full compilation. All 11804 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. Finished generating code generator.vcxproj -> D:\Name\Python_Code\GeNNworkspace\generator_Release_CUDA.exe Successfully built code generator neuronUpdate.cc synapseUpdate.cc init.cc neuronUpdate.cc synapseUpdate.cc init.cc 2020-07-22 16:24:22.659 INFO [38296] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updateNeuronsKernel, block size:32 2020-07-22 16:24:22.659 INFO [38296] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updatePresynapticKernel, block size:32 2020-07-22 16:24:22.659 INFO [38296] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updatePostsynapticKernel, block size:32 2020-07-22 16:24:22.659 INFO [38296] [anonymous-namespace'::optimizeBlockSize@357] Kernel: initializeKernel, block size:32 2020-07-22 16:24:22.659 INFO [38296] [anonymous-namespace'::optimizeBlockSize@357] Kernel: initializeSparseKernel, block size:32 2020-07-22 16:24:22.659 INFO [38296] [anonymous-namespace'::optimizeBlockSize@357] Kernel: preNeuronResetKernel, block size:32 2020-07-22 16:24:22.659 INFO [38296] [`anonymous-namespace'::chooseOptimalDevice@444] Optimal device 0 - total occupancy:5760, number of small models:6, SM version:75 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@77] Host memory required for model: 0 MB 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@78] Device memory required for model: 0 MB 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@79] Zero-copy memory required for model: 0 MB 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@87] Merging model with 2 neuron groups and 1 synapse groups results in: 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@88] 2 merged neuron update groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@89] 1 merged presynaptic update groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@90] 1 merged postsynaptic update groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@91] 0 merged synapse dynamics groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@92] 2 merged neuron init groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@93] 0 merged synapse dense init groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@94] 0 merged synapse connectivity init groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@95] 1 merged synapse sparse init groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@96] 1 merged neuron spike queue update groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@97] 0 merged synapse dendritic delay update groups 2020-07-22 16:24:22.722 INFO [38296] [CodeGenerator::generateAll@98] 0 merged synapse connectivity host init groups 2020-07-22 16:24:22.736 INFO [38296] [main@94] Generated new project GUID:112A9B2E-F18C-455C-987F-9C9D9FFA45EE Model build complete Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj(29,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.props" is correct, and that the file exists on disk. D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning: variable "ipre" was declared but never referenced

D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning: variable "ipre" was declared but never referenced


CalledProcessError Traceback (most recent call last) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 901 try: --> 902 self.compile_source(debug, directory, use_GPU) 903 except CalledProcessError as ex:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in compile_source(self, debug, directory, use_GPU) 1170 # making seperate check_calls doesn't work -> 1171 check_call(cmd, cwd=directory, env=env) 1172 else:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\subprocess.py in check_call(*popenargs, **kwargs) 310 cmd = popenargs[0] --> 311 raise CalledProcessError(retcode, cmd) 312 return 0

CalledProcessError: Command 'D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj"' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)

in 59 spikemonsnn = SpikeMonitor(SNN) 60 statemonsnn = StateMonitor(SNN, 'v', record=0) ---> 61 run(100*us) 62 63 """plot(spikemonpixel.t/us, spikemonpixel.i, '.k') C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\units\fundamentalunits.py in new_f(*args, **kwds) 2390 get_dimensions(newkeyset[k])) 2391 -> 2392 result = f(*args, **kwds) 2393 if 'result' in au: 2394 if au['result'] == bool: C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(duration, report, report_period, namespace, profile, level) 372 ''' 373 return magic_network.run(duration, report=report, report_period=report_period, --> 374 namespace=namespace, profile=profile, level=2+level) 375 run.__module__ = __name__ 376 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(self, duration, report, report_period, namespace, profile, level) 230 self._update_magic_objects(level=level+1) 231 Network.run(self, duration, report=report, report_period=report_period, --> 232 namespace=namespace, profile=profile, level=level+1) 233 234 def store(self, name='default', filename=None, level=0): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\base.py in device_override_decorated_function(*args, **kwds) 276 curdev = get_device() 277 if hasattr(curdev, name): --> 278 return getattr(curdev, name)(*args, **kwds) 279 else: 280 return func(*args, **kwds) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1843 report_period=report_period, 1844 namespace=namespace, -> 1845 level=level + 1) 1846 self.run_statement_used = True 1847 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\devices\cpp_standalone\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1512 'device.build call to use multiple run ' 1513 'statements with this device.') -> 1514 self.build(direct_call=False, **self.build_options) 1515 1516 def network_store(self, net, *args, **kwds): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 906 'See the output above (if any) for more ' 907 'details.').format(cmd=ex.cmd, --> 908 returncode=ex.returncode) 909 ) 910 if run: RuntimeError: Project compilation failed (Command D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" failed with error code 1). See the output above (if any) for more details.
neworderofjamie commented 4 years ago

Ok, I've created a GeNN issue for your first issue but, hopefully, the workaround is ok for now. I suspect the new issue is because you installed CUDA before Visual Studio 2019. If you reinstall CUDA and make certain to install Visual Studio intergration for 2019 you should be fine.

BoarensteinBoar commented 4 years ago

I have installed Visual Studio Community 2019 and then reinstalled CUDA 10.1 I ran the code again, but it still couldnt find "CUDA10.1.props" I found this forum thread on NVIDiA's website and manually copied the missing file from another folder.

I got a new error message below:

running brian code generation ... INFO No numerical integration method specified for group 'neurongroup_1', using method 'exact' (took 0.02s). [brian2.stateupdaters.base.method_choice] INFO No numerical integration method specified for group 'neurongroup', using method 'euler' (took 0.01s, trying other methods took 0.01s). [brian2.stateupdaters.base.method_choice] building genn executable ... WARNING D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" [brian2.devices.genn] Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

genn.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\genn......\lib\genn_Release.lib cuda_backend.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\backends\cuda........\lib\genn_cuda_backend_Release.lib Successfully built GeNN Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

generator.cc D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(197,23): warning C4244: 'argument': conversion from '__time64_t' to 'unsigned long', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(196,5): warning C4996: '_ftime64': This function or variable may be unsafe. Consider using _ftime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(221,66): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(225,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(228,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(353,68): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\common_math.h(8,1): warning C4005: 'INFINITY': macro redefinition [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(90): message : see previous definition of 'INFINITY' [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\common_math.h(9,1): warning C4005: 'NAN': macro redefinition [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(94): message : see previous definition of 'NAN' [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(82,51): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(82,51): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(112,42): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(85,79): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(85,79): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(90,69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(90,69): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(91,69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(91,69): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(92,77): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(92,77): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(163,54): warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(163,54): warning C4267: 'initializing': conversion from 'size_t' to 'const int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(180,52): warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(180,52): warning C4267: 'initializing': conversion from 'size_t' to 'const int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] Generating code 72 of 11804 functions ( 0.6%) were compiled, the rest were copied from previous compilation. 0 functions were new in current compilation 18 functions had inline decision re-evaluated but remain unchanged Finished generating code generator.vcxproj -> D:\Name\Python_Code\GeNNworkspace\generator_Release_CUDA.exe Successfully built code generator neuronUpdate.cc synapseUpdate.cc init.cc neuronUpdate.cc synapseUpdate.cc init.cc 2020-07-23 02:55:46.523 INFO [8788] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updateNeuronsKernel, block size:32 2020-07-23 02:55:46.523 INFO [8788] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updatePresynapticKernel, block size:32 2020-07-23 02:55:46.523 INFO [8788] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updatePostsynapticKernel, block size:32 2020-07-23 02:55:46.523 INFO [8788] [anonymous-namespace'::optimizeBlockSize@357] Kernel: initializeKernel, block size:32 2020-07-23 02:55:46.523 INFO [8788] [anonymous-namespace'::optimizeBlockSize@357] Kernel: initializeSparseKernel, block size:32 2020-07-23 02:55:46.523 INFO [8788] [anonymous-namespace'::optimizeBlockSize@357] Kernel: preNeuronResetKernel, block size:32 2020-07-23 02:55:46.523 INFO [8788] [`anonymous-namespace'::chooseOptimalDevice@444] Optimal device 0 - total occupancy:5760, number of small models:6, SM version:75 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@77] Host memory required for model: 0 MB 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@78] Device memory required for model: 0 MB 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@79] Zero-copy memory required for model: 0 MB 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@87] Merging model with 2 neuron groups and 1 synapse groups results in: 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@88] 2 merged neuron update groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@89] 1 merged presynaptic update groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@90] 1 merged postsynaptic update groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@91] 0 merged synapse dynamics groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@92] 2 merged neuron init groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@93] 0 merged synapse dense init groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@94] 0 merged synapse connectivity init groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@95] 1 merged synapse sparse init groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@96] 1 merged neuron spike queue update groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@97] 0 merged synapse dendritic delay update groups 2020-07-23 02:55:46.591 INFO [8788] [CodeGenerator::generateAll@98] 0 merged synapse connectivity host init groups 2020-07-23 02:55:46.602 INFO [8788] [main@105] Using previously generated project GUID:112A9B2E-F18C-455C-987F-9C9D9FFA45EE Model build complete Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

Compiling CUDA source file neuronUpdate.cc... Compiling CUDA source file init.cc... Compiling CUDA source file synapseUpdate.cc...

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\neuronUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\neuronUpdate.cc" Compiling CUDA source file runner.cc...

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\init.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\init.cc"

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\synapseUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\synapseUpdate.cc"

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\runner.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.cc" D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning : variable "ipre" was declared but never referenced [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] runner.cc neuronUpdate.cc C:/Users/quibu/AppData/Local/Temp/tmpxft_000088c4_00000000-6_neuronUpdate.cudafe1.cpp : fatal error C1041: cannot open program database 'D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\x64\Release\vc142.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(757,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\neuronUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\neuronUpdate.cc"" exited with code 2. [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] synapseUpdate.cc C:/Users/quibu/AppData/Local/Temp/tmpxft_00007664_00000000-6_synapseUpdate.cudafe1.cpp : fatal error C1041: cannot open program database 'D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\x64\Release\vc142.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(757,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\synapseUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\synapseUpdate.cc"" exited with code 2. [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] init.cc D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(12): warning C4297: 'pushMergedNeuronInitGroup0ToDevice': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(12): note: declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(15): warning C4297: 'pushMergedNeuronInitGroup1ToDevice': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(15): note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(30): warning C4297: 'pushMergedSynapseSparseInitGroup0ToDevice': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(30): note: declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(118): warning C4297: 'initialize': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(118): note: declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(123): warning C4297: 'initialize': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(123): note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(135): warning C4297: 'initializeSparse': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/init.cc(135): note: declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning: variable "ipre" was declared but never referenced

D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning: variable "ipre" was declared but never referenced


CalledProcessError Traceback (most recent call last) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 901 try: --> 902 self.compile_source(debug, directory, use_GPU) 903 except CalledProcessError as ex:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in compile_source(self, debug, directory, use_GPU) 1170 # making seperate check_calls doesn't work -> 1171 check_call(cmd, cwd=directory, env=env) 1172 else:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\subprocess.py in check_call(*popenargs, **kwargs) 310 cmd = popenargs[0] --> 311 raise CalledProcessError(retcode, cmd) 312 return 0

CalledProcessError: Command 'D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj"' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)

in 59 spikemonsnn = SpikeMonitor(SNN) 60 statemonsnn = StateMonitor(SNN, 'v', record=0) ---> 61 run(100*us) 62 63 """plot(spikemonpixel.t/us, spikemonpixel.i, '.k') C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\units\fundamentalunits.py in new_f(*args, **kwds) 2390 get_dimensions(newkeyset[k])) 2391 -> 2392 result = f(*args, **kwds) 2393 if 'result' in au: 2394 if au['result'] == bool: C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(duration, report, report_period, namespace, profile, level) 372 ''' 373 return magic_network.run(duration, report=report, report_period=report_period, --> 374 namespace=namespace, profile=profile, level=2+level) 375 run.__module__ = __name__ 376 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(self, duration, report, report_period, namespace, profile, level) 230 self._update_magic_objects(level=level+1) 231 Network.run(self, duration, report=report, report_period=report_period, --> 232 namespace=namespace, profile=profile, level=level+1) 233 234 def store(self, name='default', filename=None, level=0): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\base.py in device_override_decorated_function(*args, **kwds) 276 curdev = get_device() 277 if hasattr(curdev, name): --> 278 return getattr(curdev, name)(*args, **kwds) 279 else: 280 return func(*args, **kwds) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1843 report_period=report_period, 1844 namespace=namespace, -> 1845 level=level + 1) 1846 self.run_statement_used = True 1847 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\devices\cpp_standalone\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1512 'device.build call to use multiple run ' 1513 'statements with this device.') -> 1514 self.build(direct_call=False, **self.build_options) 1515 1516 def network_store(self, net, *args, **kwds): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 906 'See the output above (if any) for more ' 907 'details.').format(cmd=ex.cmd, --> 908 returncode=ex.returncode) 909 ) 910 if run: RuntimeError: Project compilation failed (Command D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" failed with error code 1). See the output above (if any) for more details.
BoarensteinBoar commented 4 years ago

I restarted my computer and I got a new error with more description on what's going on:

running brian code generation ... INFO No numerical integration method specified for group 'neurongroup_1', using method 'exact' (took 0.02s). [brian2.stateupdaters.base.method_choice] INFO No numerical integration method specified for group 'neurongroup', using method 'euler' (took 0.01s, trying other methods took 0.01s). [brian2.stateupdaters.base.method_choice] building genn executable ... WARNING D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" [brian2.devices.genn] Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

genn.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\genn......\lib\genn_Release.lib cuda_backend.vcxproj -> D:\GameFiles\genn-4.3.1\src\genn\backends\cuda........\lib\genn_cuda_backend_Release.lib Successfully built GeNN Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

generator.cc D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(197,23): warning C4244: 'argument': conversion from '__time64_t' to 'unsigned long', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(196,5): warning C4996: '_ftime64': This function or variable may be unsafe. Consider using _ftime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(221,66): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(225,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(228,70): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit\randomkit.cc(353,68): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(161,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(164,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\spikequeue.h(178,1): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\common_math.h(8,1): warning C4005: 'INFINITY': macro redefinition [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(90): message : see previous definition of 'INFINITY' [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\brianlib\common_math.h(9,1): warning C4005: 'NAN': macro redefinition [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(94): message : see previous definition of 'NAN' [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(82,51): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(82,51): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_group_variable_set_conditional_codeobject.cpp(112,42): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(89,69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(89,69): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(90,69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(90,69): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(92,75): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(92,75): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(93,77): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(93,77): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(163,54): warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(163,54): warning C4267: 'initializing': conversion from 'size_t' to 'const int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(180,52): warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] D:\Name\Python_Code\GeNNworkspace\code_objects\synapses_max_row_length.cpp(180,52): warning C4267: 'initializing': conversion from 'size_t' to 'const int32_t', possible loss of data [D:\GameFiles\genn-4.3.1\src\genn\generator\generator.vcxproj] Generating code 70 of 11804 functions ( 0.6%) were compiled, the rest were copied from previous compilation. 0 functions were new in current compilation 18 functions had inline decision re-evaluated but remain unchanged Finished generating code generator.vcxproj -> D:\Name\Python_Code\GeNNworkspace\generator_Release_CUDA.exe Successfully built code generator neuronUpdate.cc synapseUpdate.cc init.cc neuronUpdate.cc synapseUpdate.cc init.cc 2020-07-23 03:27:31.233 INFO [20064] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updateNeuronsKernel, block size:32 2020-07-23 03:27:31.233 INFO [20064] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updatePresynapticKernel, block size:32 2020-07-23 03:27:31.233 INFO [20064] [anonymous-namespace'::optimizeBlockSize@357] Kernel: updatePostsynapticKernel, block size:32 2020-07-23 03:27:31.233 INFO [20064] [anonymous-namespace'::optimizeBlockSize@357] Kernel: initializeKernel, block size:32 2020-07-23 03:27:31.233 INFO [20064] [anonymous-namespace'::optimizeBlockSize@357] Kernel: initializeSparseKernel, block size:32 2020-07-23 03:27:31.233 INFO [20064] [anonymous-namespace'::optimizeBlockSize@357] Kernel: preNeuronResetKernel, block size:32 2020-07-23 03:27:31.233 INFO [20064] [`anonymous-namespace'::chooseOptimalDevice@444] Optimal device 0 - total occupancy:5760, number of small models:6, SM version:75 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@77] Host memory required for model: 0 MB 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@78] Device memory required for model: 0 MB 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@79] Zero-copy memory required for model: 0 MB 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@87] Merging model with 2 neuron groups and 1 synapse groups results in: 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@88] 2 merged neuron update groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@89] 1 merged presynaptic update groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@90] 1 merged postsynaptic update groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@91] 0 merged synapse dynamics groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@92] 2 merged neuron init groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@93] 0 merged synapse dense init groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@94] 0 merged synapse connectivity init groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@95] 1 merged synapse sparse init groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@96] 1 merged neuron spike queue update groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@97] 0 merged synapse dendritic delay update groups 2020-07-23 03:27:31.294 INFO [20064] [CodeGenerator::generateAll@98] 0 merged synapse connectivity host init groups 2020-07-23 03:27:31.304 INFO [20064] [main@105] Using previously generated project GUID:112A9B2E-F18C-455C-987F-9C9D9FFA45EE Model build complete Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

Compiling CUDA source file neuronUpdate.cc... Compiling CUDA source file synapseUpdate.cc... Compiling CUDA source file init.cc... Compiling CUDA source file runner.cc...

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\init.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\init.cc"

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\synapseUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\synapseUpdate.cc"

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\runner.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.cc"

(Neuromorphic) D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\neuronUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\neuronUpdate.cc" D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning : variable "ipre" was declared but never referenced [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] neuronUpdate.cc synapseUpdate.cc C:/Users/quibu/AppData/Local/Temp/tmpxft_00004fd0_00000000-6_synapseUpdate.cudafe1.cpp : fatal error C1041: cannot open program database 'D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\x64\Release\vc142.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(757,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\synapseUpdate.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\synapseUpdate.cc"" exited with code 2. [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] runner.cc C:/Users/quibu/AppData/Local/Temp/tmpxft_00004f38_00000000-6_runner.cudafe1.cpp : fatal error C1041: cannot open program database 'D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\x64\Release\vc142.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(757,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\runner.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.cc"" exited with code 2. [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] init.cc C:/Users/quibu/AppData/Local/Temp/tmpxft_00002a08_00000000-6_init.cudafe1.cpp : fatal error C1041: cannot open program database 'D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\x64\Release\vc142.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(757,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64" -x cu -rdc=true -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -DBUILDING_GENERATED_CODE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc142.pdb /Zi /MD " -o x64\Release\init.cc.obj "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\init.cc"" exited with code 2. [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(13): warning C4297: 'pushMergedNeuronSpikeQueueUpdateGroup0ToDevice': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(13): note: declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(29): warning C4297: 'pushMergedNeuronUpdateGroup0ToDevice': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(29): note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(32): warning C4297: 'pushMergedNeuronUpdateGroup1ToDevice': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(32): note: declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(187): warning C4297: 'updateNeurons': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(187): note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(193): warning C4297: 'updateNeurons': function assumed not to throw an exception but does [D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj] D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/neuronUpdate.cc(193): note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning: variable "ipre" was declared but never referenced

D:/Name/Python_Code/GeNNworkspace/magicnetwork_model_CODE/synapseUpdate.cc(115): warning: variable "ipre" was declared but never referenced


CalledProcessError Traceback (most recent call last) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 901 try: --> 902 self.compile_source(debug, directory, use_GPU) 903 except CalledProcessError as ex:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in compile_source(self, debug, directory, use_GPU) 1170 # making seperate check_calls doesn't work -> 1171 check_call(cmd, cwd=directory, env=env) 1172 else:

C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\subprocess.py in check_call(*popenargs, **kwargs) 310 cmd = popenargs[0] --> 311 raise CalledProcessError(retcode, cmd) 312 return 0

CalledProcessError: Command 'D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj"' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)

in 59 spikemonsnn = SpikeMonitor(SNN) 60 statemonsnn = StateMonitor(SNN, 'v', record=0) ---> 61 run(100*us) 62 63 """plot(spikemonpixel.t/us, spikemonpixel.i, '.k') C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\units\fundamentalunits.py in new_f(*args, **kwds) 2390 get_dimensions(newkeyset[k])) 2391 -> 2392 result = f(*args, **kwds) 2393 if 'result' in au: 2394 if au['result'] == bool: C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(duration, report, report_period, namespace, profile, level) 372 ''' 373 return magic_network.run(duration, report=report, report_period=report_period, --> 374 namespace=namespace, profile=profile, level=2+level) 375 run.__module__ = __name__ 376 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\magic.py in run(self, duration, report, report_period, namespace, profile, level) 230 self._update_magic_objects(level=level+1) 231 Network.run(self, duration, report=report, report_period=report_period, --> 232 namespace=namespace, profile=profile, level=level+1) 233 234 def store(self, name='default', filename=None, level=0): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\core\base.py in device_override_decorated_function(*args, **kwds) 276 curdev = get_device() 277 if hasattr(curdev, name): --> 278 return getattr(curdev, name)(*args, **kwds) 279 else: 280 return func(*args, **kwds) C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1843 report_period=report_period, 1844 namespace=namespace, -> 1845 level=level + 1) 1846 self.run_statement_used = True 1847 C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2\devices\cpp_standalone\device.py in network_run(self, net, duration, report, report_period, namespace, profile, level, **kwds) 1512 'device.build call to use multiple run ' 1513 'statements with this device.') -> 1514 self.build(direct_call=False, **self.build_options) 1515 1516 def network_store(self, net, *args, **kwds): C:\Users\quibu\Anaconda3\envs\Neuromorphic\lib\site-packages\brian2genn\device.py in build(self, directory, compile, run, use_GPU, debug, with_output, direct_call) 906 'See the output above (if any) for more ' 907 'details.').format(cmd=ex.cmd, --> 908 returncode=ex.returncode) 909 ) 910 if run: RuntimeError: Project compilation failed (Command D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" failed with error code 1). See the output above (if any) for more details.
neworderofjamie commented 4 years ago

So within all the verbosity, in both of the last two traces, the actual error is:

fatal error C1041: cannot open program database 'D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\x64\Release\vc142.pdb'; if multiple CL.EXE write to the same .PDB file

I've never encounterd this before but, maybe, as you just upgraded your Visual Studio, there's some files from the old version lying around. Perhaps delete GeNNworkspace and try again?

BoarensteinBoar commented 4 years ago

Hi, I just deleted GeNNworkspace but I still get the same error. I tried specifying the location of vcvarsall.bat explicitly using:

prefs.codegen.cpp.msvc_vars_location = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat'

I get the same error but I get an additional output below:

running brian code generation ... INFO No numerical integration method specified for group 'neurongroup_1', using method 'exact' (took 0.01s). [brian2.stateupdaters.base.method_choice] INFO No numerical integration method specified for group 'neurongroup', using method 'euler' (took 0.01s, trying other methods took 0.01s). [brian2.stateupdaters.base.method_choice] building genn executable ... WARNING "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 && D:\GameFiles\genn-4.3.1\bin\genn-buildmodel.bat -s -i "D:\Name\Python_Code;D:\Name\Python_Code\GeNNworkspace;D:\Name\Python_Code\GeNNworkspace\brianlib\randomkit" magicnetwork_model.cpp && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\magicnetwork_model_CODE\runner.vcxproj" && msbuild /m /verbosity:minimal /p:Configuration=Release "D:\Name\Python_Code\GeNNworkspace\project.vcxproj" [brian2.devices.genn]


Visual Studio 2019 Developer Command Prompt v16.6.5 Copyright (c) 2020 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86_x64' Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

binomial.cc backendBase.cc codeGenUtils.cc codeStream.cc generateAll.cc generateInit.cc generateMSBuild.cc generateMakefile.cc generateNeuronUpdate.cc generateRunner.cc generateSupportCode.cc

neworderofjamie commented 4 years ago

Yeah, finding Visual Studio is no longer the issue so I wouldn't expect that to change anything. The only thing different there is that you're deleting files which it rebuilds so there's more output. As I say, the only actual error is about not being able to open the program database which is an internal visual studio problem. Googling suggests you might try:

BoarensteinBoar commented 4 years ago

I tried disabling windows defender and killing the mspdbsrv I still get the same error. I have about 20GB free in my C drive and 800GB in D.

Could it be my Brian2, Brian2GeNN and GeNN installations? I forgot to mention I am using anaconda. I installed Brian2 using Conda and Brian2Genn using pip. I wasnt able to set the Gen Path according to the instructions here. It wants me to set "Path" but I am already using that name for some other program. I just manually set the path using

prefs.devices.genn.path = 'D:\GameFiles\genn-4.3.1'

BoarensteinBoar commented 4 years ago

I tried setting an environment variable CL to /MP to force /FS on visual studio but it doesnt work either

neworderofjamie commented 4 years ago

Ok, I have found some more references to this issue:

neworderofjamie commented 4 years ago

I suspect what is happening is that you are using CUDA 10.1.105 (the original version of CUDA 10.1) which doesn't officially support Visual Studio 2019. This explains why it didn't automatically install and also won't set /FS (which happens on my machine)

BoarensteinBoar commented 4 years ago

Thank you very much for your help! I updated to CUDA 10.1.243 and I dont see anymore errors

The problem is I don't see any output in my statemonitor and spikemonitors. It works fine with just brian2. What I'm doing is I am importing an image dataset and then manually converting the pixel values into currents to simulate photodetector currents in an image sensor. I then feed that into an Integrate and Fire Neuron to generate spike rates proportional to the current intensity. These first layer of IF neurons are then connected to a second layer of LIF neurons. I am not sure if this method is supported in Brian2. Can I use two layers?

neworderofjamie commented 4 years ago

No problem - happy to help! I think your new issue could be one for @tnowotny or @mstimberg though 😄

tnowotny commented 4 years ago

Your description sounds like it should be quite a standard thing to do. I can't make out any deal breakers without further detail.

BoarensteinBoar commented 4 years ago

I have this code to accomplish the task I described. It works with Brian2 and I get outputs on the state and spikemonitors of both layers. But when I use Brian2genn I get a blank plot on both the spike and state monitors of both layers. I am using two NeuronGroups to define the two layers, but I read from here that some features are unsupported. I havent really understood what linked variables mean but I suspect it could be the reason or because I am using two neurongroups(networks??) -----------------------Setup-------------------------------------------------------------------------------------------------------------

from brian2 import *
import brian2genn
#set_device('genn')
prefs.devices.genn.path = 'D:\\GameFiles\\genn-4.3.1'
prefs.codegen.cpp.msvc_vars_location = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat'
#prefs.codegen.target = 'auto'
from matplotlib import pyplot as plt
%matplotlib inline
from sklearn import datasets
import numpy as np
import pandas as pd
defaultclock.dt = 0.00001*us

----------------------Import Images------------------------------------------------------------------------------------------------------

digits = datasets.load_digits()
digit_labels = pd.DataFrame(digits.target)# Data Labels(0 -9) of 1796 64-pixel images of handwritten digits
digits = datasets.load_digits()
digit_pixels = pd.DataFrame(digits.data)
digit_pixels.describe()
Idet = digit_pixels/16
#scale and translate 0-1 to 1nA to 100nA
Idet = 99*Idet+1 # in nA
Idet.describe()

--------------------------Neural Network ----------------------------------------------------------------------------------------------

start_scope()
trefract = 245.5*(1E-9)*ms
####Define 1st Layer  characteristics ###############################################################
Cint = 0.1*pfarad
Cint = Cint/farad
Cint = Cint*second
Npixel = 64
eqsdroic = '''
dv/dt = 1.8/second - I/Cint : 1
I : 1
tau : second
'''
Pixel = NeuronGroup(Npixel, eqsdroic, threshold='v<0.5', reset='v = 1.8', refractory=trefract)
Pixel.I = (Idet.iloc[0, :])*(1E-9) ##Set Pixel Currents
Pixel.v = '1.8'
#Define 2nd Layer characteristics ######################################################################
R = 10*kohm
C = 0.1*pfarad
tau = R*C
taupre = tau
taupost = tau
Apre = 0.00001 
Apost = -Apre*taupre/taupost*1.05
k = R/ohm
eqLIF = '''
dv/dt = -v/tau : 1
'''
SNN = NeuronGroup(16, eqLIF, threshold='v>0.5', reset='v = 0', refractory=trefract)
SNN.v = '0'
######Define Synapses  #########################################################
kmirror = 2
del_v = kmirror*(1.8*(trefract/second))/(C/farad)
S = Synapses(Pixel, SNN,              '''
             w : 1
             dapre/dt = -apre/taupre : 1 (event-driven)
             dapost/dt = -apost/taupost : 1 (event-driven)
             ''',
             on_pre='''
             v_post += del_v*w
             apre += Apre
             w = clip(w+apost, 0.000001, 0.00002)
             ''',
             on_post='''
             apost += Apost
             w = clip(w+apre, 0.000001, 0.00002)
             ''')
S.connect()
S.w = 'rand()*0.00001+0.00001'
#S.w = '0.0001'
#####################################################
spikemonpixel = SpikeMonitor(Pixel)
spikemonsnn = SpikeMonitor(SNN)
statemonsnn = StateMonitor(SNN, 'v', record=0)
run(5*us)

plot(spikemonsnn.t/us, spikemonsnn.i, '.k')
xlabel('Time (us)')
ylabel('Neuron index')
tnowotny commented 4 years ago

Hi - I was able to reproduce your problem and one aspect of it is that we never designed GeNN to work with time steps of 10^(-11) ... and it defaulted to timestep 0. We are fixing that now but in the meantime, if you don't want to wait you could rescale your model into more reasonable ranges ...?

tnowotny commented 4 years ago

Ok ... this was faster than I thought possible. The issue with too small timesteps is now fixed in the current master branch of GeNN if you want to pull that ... with that in place, your code seems to run fine in brian2genn on my machine.

BoarensteinBoar commented 4 years ago

Hi, thank you so much for helping me! It is working perfectly. I needed the small timesteps to simulate the hardware accurately. This is a really cool software.

tnowotny commented 3 years ago

all fixed closing now.