-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undeclared Identifier Error for Multiple Runs #129
Comments
Hum ... I tried to reproduce the problem but it doesn't occur for me. Any ideas @mstimberg ? |
I called device.reinit() only once and did not call device.activate() in my new code, and it continues to provide the same error. Could the difference in results be due to different GPUs being used? |
It is unlikely that a different GPU would make a difference here. However, from your posted output I can see you are working on Windows (whereas I am on a Mac). |
Hi @ademirtas04, @tnowotny is off this week but I'm back (that's August for you...) - are you still have problems with this? |
Hi @neworderofjamie! Yep. I'm still having problems with it. |
Good to know - in that case, could you upload the contents of the folder @tnowotny said? |
Hey there! I was running my first code on Brian2Genn, and I was trying to run the code multiple times on the same Jupyter Notebook File. It seems as though the code is looking for objects in the previous run, as it sometimes gives no error and plots a graph and other times gives the undeclared identifier error. I was wondering if I was using the device.activate() and device.reinit() methods properly, or if there is something else that I am missing.
from brian2 import *
import brian2genn
%matplotlib inline
set_device('genn')
device.reinit()
device.activate()
start_scope()
G = NeuronGroup(1, 'v : 1', threshold='v>0.6', reset='v=0', method='exact')
G.v = '0.6'
SM = StateMonitor(G, 'v', record=True)
print("Completed without Errors")
run(100*ms)
print("Ran without Errors")
plot(SM.t/ms, SM.v[0])
device.reinit()
device.activate()
ERROR PROVIDED:
neurongroup_group_variable_set_conditional_codeobject.cpp
C:\Users\ademi\GeNNworkspace\brianlib\common_math.h(8,1): warning C4005: 'INFINITY': macro redefinition [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h(88): message : see previous definition of 'INFINITY' [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\brianlib\common_math.h(9,1): warning C4005: 'NAN': macro redefinition [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h(92): message : see previous definition of 'NAN' [C:\Users\ademi\GeNNworkspace\project.vcxproj]
statemonitor_codeobject.cpp
C:\Users\ademi\GeNNworkspace\brianlib\common_math.h(8,1): warning C4005: 'INFINITY': macro redefinition [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h(88): message : see previous definition of 'INFINITY' [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\brianlib\common_math.h(9,1): warning C4005: 'NAN': macro redefinition [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h(92): message : see previous definition of 'NAN' [C:\Users\ademi\GeNNworkspace\project.vcxproj]
main.cpp
C:\Users\ademi\GeNNworkspace\engine.cpp(45,19): error C2065: 'vneurongroup': undeclared identifier [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\engine.cpp(51,7): error C3861: 'pullneurongroupStateFromDevice': identifier not found [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\main.cpp(73,47): error C2065: 'ineurongroup': undeclared identifier [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\main.cpp(74,47): error C2065: 'vneurongroup': undeclared identifier [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\main.cpp(106,15): error C2065: 'ineurongroup': undeclared identifier [C:\Users\ademi\GeNNworkspace\project.vcxproj]
C:\Users\ademi\GeNNworkspace\main.cpp(107,15): error C2065: 'vneurongroup': undeclared identifier [C:\Users\ademi\GeNNworkspace\project.vcxproj]
The text was updated successfully, but these errors were encountered: