INCF / csa

The Python implementation of the Connection-Set Algebra
GNU General Public License v3.0
13 stars 17 forks source link

Connection between libneurosim and csa is broken #6

Closed jougs closed 6 years ago

jougs commented 6 years ago

When running the following code (both NEST and CSA compiled against libneurosim)

import csa
import nest
cg = csa.cset(csa.oneToOne)
nest.sli_push(cg)

NEST reports an error:

pynestkernel.NESTError: unknown Python type: <class 'csa._elementary.OneToOne'>

Inside PyNEST, the error is caused by the call to libneurosim's PNS::isConnectionGenerator( cg ), which erroneously returns false for the cg object pushed from Python to SLI/NEST.

@mdjurfeldt tracked this further down to a problem with loading libpycsa.so, which is responsible for the runtime type detection. A solution probably requires work on the build system.

Most likely, this is the cause for https://github.com/nest/nest-simulator/issues/821.

mdjurfeldt commented 6 years ago

Fixed in commit b9e0453

mdjurfeldt commented 6 years ago

Previous fix caused an unexpanded variable to be inserted into a python script. This has been fixed in commit e1a8fb7.