After flashing gateware and upgrading to ARTIQ 7, I am seeing artiq.coredevice.comm_kernel.LoadErrors upon submitting any experiment that has a kernel function, with a recent artiq installed on Ubuntu 20.04 with nix shell/flakes. During the process of flashing the gateware, an incorrect variant was accidentally flashed to the crate, but the correct variant has since been flashed and confirmed by looking at the serial output from the crate.
Here's an example experiment file:
from artiq.experiment import *
class Minimal(EnvExperiment):
""" Minimal experiment """
def build(self):
self.setattr_device("core")
self.a = 1
def run(self):
print("run on host")
self.run_core()
@kernel
def run_core(self):
self.core.reset()
print(self.a)
print("run on core")
The output from artiq_master:
INFO:worker(87,minimal.py):print:run on host
ERROR:worker(87,minimal.py):root:Terminating with exception (LoadError: cannot load kernel: parse error: not a shared library for current architecture) Traceback (most recent call last):
File "/nix/store/gq14bzq5vbr391839x5lg0dx9m55dz8b-python3-3.9.13-env/lib/python3.9/site-packages/artiq/master/worker_impl.py", line 343, in main exp_inst.run()
File "/tmp/tmpl7m8_x4u/minimal.py", line 13, in run
self.run_core()
File "/nix/store/gq14bzq5vbr391839x5lg0dx9m55dz8b-python3-3.9.13-env/lib/python3.9/site-packages/artiq/language/core.py", line 54, in run_on_core return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
File "/nix/store/gq14bzq5vbr391839x5lg0dx9m55dz8b-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 140, in run self._run_compiled(kernel_library, embedding_map, symbolizer, demangler)
File "/nix/store/gq14bzq5vbr391839x5lg0dx9m55dz8b-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 128, in _run_compiled self.comm.load(kernel_library)
File "/nix/store/gq14bzq5vbr391839x5lg0dx9m55dz8b-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 381, in load raise LoadError(self._read_string())
artiq.coredevice.comm_kernel.LoadError: cannot load kernel: parse error: not a shared library for current architecture
ERROR:master:artiq.master.scheduler:got worker exception in run stage, deleting RID 87
No code inside of a kernel function executes successfully, rendering our crate inoperable.
The output from connecting to the crate with flterm during the execution of the experiment:
[ 619.672670s] INFO(runtime::session): new connection from 169.254.40.45:51878
[ 619.733845s] INFO(runtime::session): no connection, starting idle kernel
[ 619.739769s] INFO(runtime::session): no idle kernel found
To confirm the correct versions, here's the first few lines of the flterm output upon crate startup:
__ __ _ ____ ____
| \/ (_) ___| ___ / ___|
| |\/| | \___ \ / _ \| |
| | | | |___) | (_) | |___
|_| |_|_|____/ \___/ \____|
MiSoC Bootloader
Copyright (c) 2017-2022 M-Labs Limited
Bootloader CRC passed
Gateware ident 7.0.unknown;mitll_marlo
Initializing SDRAM...
Read leveling scan:
Module 1:
00000000000111111111110000000000
Module 0:
00000000000111111111110000000000
Read leveling: 15+-5 16+-5 done
SDRAM initialized
Memory test passed
Booting from flash...
Starting firmware.
[ 0.000013s] INFO(runtime): ARTIQ runtime starting...
[ 0.003929s] INFO(runtime): software ident 7.0.unknown;mitll_marlo
[ 0.010207s] INFO(runtime): gateware ident 7.0.unknown;mitll_marlo
[ 0.016491s] INFO(runtime): log level set to INFO by default
[ 0.022218s] INFO(runtime): UART log level set to INFO by default
[ 0.028606s] WARN(runtime::rtio_clocking): rtio_clock setting not recognised. Falling back to default.
[ 0.037791s] INFO(runtime::rtio_clocking): using internal 125MHz RTIO clock
[ 0.314293s] INFO(board_artiq::si5324): waiting for Si5324 lock...
[ 5.513134s] INFO(board_artiq::si5324): ...locked
[ 5.516779s] INFO(runtime::rtio_clocking::crg): Using internal RTIO clock
mitll_marlo is the name of the correct variant compiled from the json file for this crate. I'm guessing the variant being displayed as 7.0.unknown is some sort of minor bug, because this is compiled from a just-cloned (as of a week ago) copy of release-7 of artiq.
Running artiq_master --version in the same nix shell prints out "ARTIQ v7.8142.079d57b
".