pyclustering icon indicating copy to clipboard operation
pyclustering copied to clipboard

[pyclustering.nnet.sync] Crash in case of DYNAMIC structure

Open annoviko opened this issue 3 years ago • 0 comments

Introduction When user-custom structure is needed, then crash happens in case of ccore=True.

Example:

amount_neurons = 8
network = sync_network(amount_neurons, type_conn=conn_type.DYNAMIC, ccore=True)

# build circle structure
for i in range(1, len(network)):
    network.set_connection(i - 1, i)
    network.set_connection(i, i - 1)

network.set_connection(0, amount_neurons - 1)
network.set_connection(amount_neurons - 1, 0)

# simulate
output_dynamic = network.simulate(1000, 1)

sync_visualizer.show_output_dynamic(output_dynamic)
sync_visualizer.show_order_parameter(output_dynamic)

Output:

Traceback (most recent call last):
  File "D:/workspace/pyclustering/pyclustering/cluster/examples/z_example_no_commit.py", line 4, in <module>
    network = sync_network(amount_neurons, type_conn=conn_type.DYNAMIC, ccore=True)
  File "D:\workspace\pyclustering\pyclustering\nnet\sync.py", line 737, in __init__
    self._ccore_network_pointer = wrapper.sync_create_network(num_osc, weight, frequency, type_conn, initial_phases);
  File "D:\workspace\pyclustering\pyclustering\core\sync_wrapper.py", line 20, in sync_create_network
    pointer_network = ccore.sync_create_network(c_uint(num_osc), c_double(weight), c_double(frequency), c_uint(type_conn), c_uint(initial_phases))
OSError: [WinError -529697949] Windows Error 0xe06d7363

annoviko avatar Jun 09 '21 19:06 annoviko