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).

    debry On the software side your version number is missing the minor version number, probably because the versioneer doesn't have access to the git rev count (known issue depending on installation method). If you know for a fact the software version is the same, just ignore it.

    debry No other error message is provided.

    I think you're the first one to try this via the management system 🙂

    With artiq_run error messages are definitely printed here. Can you try?

      sb10q

      Yes, seems like it's just a management system issue. When I use artiq_run I get a proper error message:

      artiq@5cde14163c70:~/artiq-master$ artiq_run repository/dummy.py
      running...
      Traceback (most recent call last):
        File "/nix/store/fqq7frblvfbn5p5ya1h62lkfg5bxzwvs-python3.12-artiq-10.0+c640bbc.beta/bin/.artiq_run-wrapped", line 9, in <module>
          sys.exit(main())
                   ^^^^^^
        File "/nix/store/w7n5ii830svp0n7xhgwl6rqgphc5chb4-python3-3.12.10-env/lib/python3.12/site-packages/artiq/frontend/artiq_run.py", line 215, in main
          return run(with_file=True)
                 ^^^^^^^^^^^^^^^^^^^
        File "/nix/store/w7n5ii830svp0n7xhgwl6rqgphc5chb4-python3-3.12.10-env/lib/python3.12/site-packages/artiq/frontend/artiq_run.py", line 199, in run
          raise exn
        File "/nix/store/w7n5ii830svp0n7xhgwl6rqgphc5chb4-python3-3.12.10-env/lib/python3.12/site-packages/artiq/frontend/artiq_run.py", line 193, in run
          exp_inst.run()
        File "repository/dummy.py", line 19, in run
          self.run_core()
        File "/nix/store/w7n5ii830svp0n7xhgwl6rqgphc5chb4-python3-3.12.10-env/lib/python3.12/site-packages/artiq/language/core.py", line 91, in run_on_core
          return self.core.run(fake_method, args, kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/nix/store/w7n5ii830svp0n7xhgwl6rqgphc5chb4-python3-3.12.10-env/lib/python3.12/site-packages/artiq/coredevice/core.py", line 173, in run
          kernel_library = self.compile(function, args, kwargs, embedding_map)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/nix/store/w7n5ii830svp0n7xhgwl6rqgphc5chb4-python3-3.12.10-env/lib/python3.12/site-packages/artiq/coredevice/core.py", line 167, in compile
          return self.compiler.compile_method_to_mem(obj, name, args, embedding_map)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      nac3artiq.CompileError: compilation failed
      ----------
      Unsupported operand type(s) for *: 'int32' and 'float' (right operand should have type N) at repository/dummy.py:27:31
      
      Notes:
          ndarray_ndims ∈ {uint32}
          N ∈ {int32, ndarray[int32, ndarray_ndims]}