- Edited
I've flashed a crate with gateware built from the NAC3 branch of ARTIQ, and I have a nix environment with the same git version for running the master/dashboard/moninj/coreanalyzer. I can run simple experiments and they seem to behave as expected. However, if there is a bug in any of the experiment code, an error is thrown but no useful error message is provided. Here is a simple example experiment that runs correctly:
from artiq.experiment import *
from artiq.coredevice.core import Core
from artiq.coredevice.ttl import TTLOut
@compile
class Dummy(EnvExperiment):
"""Dummy Experiment"""
core: KernelInvariant[Core]
ttl4: KernelInvariant[TTLOut]
def build(self):
self.setattr_device("core")
self.setattr_device("ttl4")
def run(self):
print("running...")
self.run_core()
print("done")
@kernel
def run_core(self):
self.core.reset()
self.core.break_realtime()
for _ in range(10):
self.core.delay(1.0 * s)
self.ttl4.pulse(1.0 * s)
The output to the terminal/dashboard log is
INFO:dashboard:artiq.dashboard.experiments:Submitted 'repo:Dummy Experiment', RID is 74
INFO:worker(74,dummy.py):print:running...
WARNING:worker(74,dummy.py):artiq.coredevice.comm_kernel:Mismatch between gateware (10.9682+c640bbc.beta) and software (10.0+c640bbc.beta) versions
INFO:worker(74,dummy.py):print:done
However, if I introduce a mistake in the kernel code, such as writing self.core.delay(1 * s)
instead of self.core.delay(1.0 * s)
, the experiment fails as expected, but the log output is
INFO:dashboard:artiq.dashboard.experiments:Submitted 'repo:Dummy Experiment', RID is 75
INFO:worker(75,dummy.py):print:running...
ERROR:master:artiq.master.scheduler:got worker exception in run stage, deleting RID 75
No other error message is provided. The coremanagement log tool also doesn't show any error message. This will make it incredibly difficult to debug experiments of any complexity.
Why is there no error message printed? Also, why is there a gateware mismatch warning when the git hashes are the same? I installed and built both the gateware and the software nix environment on the same day (yesterday).