Hello.
I use nengo-spa and run my model with nengo_ocl.Simulator so far. However, I wanted to try a deep leaning model with CUDA, so I cleaned my computer (uninstalled opencl) and constructed a cuda-environment.
Then, I run my model with nengo_dl.Simulator() but the next error happened:
Optimization finished in 0:23:10
|##################################Constructing graph: creating base arrays (1400%)####################################################################################################################################################################################################################################################################Construction finished in 0:01:41
| Simulating # | 0:00:582019-05-09 19:34:16.435524: W tensorflow/core/common_runtime/bfc_allocator.cc:273] Allocator (GPU_0_bfc) ran out of memory trying to allocate 112.79MiB. Current allocation summary follows.
2019-05-09 19:34:16.436212: W tensorflow/core/common_runtime/bfc_allocator.cc:277] **************************************************************************************xxxxxxxxxxxxxx
2019-05-09 19:34:16.436364: W tensorflow/core/common_runtime/bfc_allocator.cc:273] Allocator (GPU_0_bfc) ran out of memory trying to allocate 112.79MiB. Current allocation summary follows.
2019-05-09 19:34:16.436966: W tensorflow/core/common_runtime/bfc_allocator.cc:277] **************************************************************************************xxxxxxxxxxxxxx
2019-05-09 19:34:16.488728: W tensorflow/core/common_runtime/bfc_allocator.cc:273] Allocator (GPU_0_bfc) ran out of memory trying to allocate 112.79MiB. Current allocation summary follows.
These maessage continues and the next message is shown:
Simulation finished in 0:01:09
Traceback (most recent call last):
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1323, in _do_call
return fn(*args)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
status, run_metadata)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InternalError: Dst tensor is not initialized.
[[Node: _arg_Node_-STATEMENT13_ph_0_5/_149 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_2779__arg_Node_-STATEMENT13_ph_0_5", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
[[Node: transpose_2/_529 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_2852_transpose_2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 124, in <module>
questionAnswering(input_sentences, path, unbinding_list, cue_list, answer, sim_i, verbs, nouns)
File "/home/iwao/Desktop/research/datas/gakkai/codes/simulation.py", line 157, in questionAnswering
sim.run(24)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/nengo_dl/simulator.py", line 321, in run
self.run_steps(steps, **kwargs)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/nengo_dl/simulator.py", line 408, in run_steps
callback=callback, profile=profile)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/nengo_dl/simulator.py", line 897, in run_batch
raise e # pragma: no cover
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/nengo_dl/simulator.py", line 890, in run_batch
options=run_options, run_metadata=run_metadata)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/home/iwao/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Dst tensor is not initialized.
[[Node: _arg_Node_-STATEMENT13_ph_0_5/_149 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_2779__arg_Node_-STATEMENT13_ph_0_5", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
[[Node: transpose_2/_529 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_2852_transpose_2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
Sorry for these dirty error messages.
I think the cause is “out of memory”.
However, out of memory error has not been occured before( when running my model with nengo_ocl).
So, my questions is:
Should I use nengo_dl.Simulator if I use cuda, not nengo_ocl? Please note that my model is nengo-spa model.
import nengo_spa as spa
import nengo_dl
model = spa.Network()
with nengo_dl.Simulator(model) as sim:
sim.run(1.0)
Is this code incorrect?
Please give me any advice. Thank you.