Closed divjakm closed 2 months ago
Hi @divjakm, thanks for reporting this issue. I suspect that your compiled instance of DaphneLib (lib/libdaphnelib.so
) is outdated. Please try to rebuild DaphneLib by doing ./build.sh --target daphnelib
and then try executing the shift-and-scale.py
script again. That might already solve your problem.
For some background:
build.sh
builds the daphne
executable and all required static/shared libraries (e.g., the DaphneDSL parser, runtime kernels, etc.). However, DaphneLib is not required by the daphne
executable, so lib/libdaphnelib.so
is not updated unless you specify a target, e.g., ./build.sh --target daphnelib
or ./build.sh --target run_tests
or ./build.sh --target all
.error while parsing kernel catalog file `/home/divjak/Work/daphne/lib/catalog.json`: KernelCatalogParser: error while parsing argument types of kernel `_print__List_DenseMatrix_double__bool__bool` for operation `print` (backend `CPP`): unknown type for argument #0: `List<DenseMatrix<double>>
indicates that the list type, which was recently added to DaphneDSL in c4c928af139f4214da13257b49a6cdc327c029ed, is not recognized by the kernel catalog parser.
Further action for the DAPHNE development:
build.sh
built both the daphne
and daphnelib
targets by default.Thank you! Re-compilation solved the problem. I forgot to try that before because I already had the *.so files in the /lib folder after the default building process and I thought it's not necessary to explicitly build DaphneLib. It works now!
I wanted to try combining Python with DaphneLib but it seems I'm doing something wrong and I can't figure out what.
My OS is Kubuntu 24.04, installed in a QEMU/KVM virtual machine. I cloned the latest version of Daphne source code from GitHub and built it using the build.sh script. Then I followed the instructions for using DaphneLib (https://daphne-eu.github.io/daphne/DaphneLib/Overview/):
At first I didn't install the Daphne Python package, I followed the instructions in the section "Use Without Installation". So I set the PYTHONPATH and I modified the run_python.sh to use the python3 executable from my Anaconda installation. If I try running the simplest provided DaphneLib example with:
./run_python.sh scripts/examples/daphnelib/shift-and-scale.py
I get an error message and a segmentation fault:Then I tried installing the Daphne Python package into a pip virtual environment. The installation was successfull, but when I try to run the example code I get the same error:
Does anybody have any idea what I'm doing wrong?