m-labs / artiq-comtools Goto Github PK
View Code? Open in Web Editor NEWLightweight ARTIQ communication tools
License: GNU Lesser General Public License v3.0
Lightweight ARTIQ communication tools
License: GNU Lesser General Public License v3.0
The manual chapter Developing a Network Device Support Package should probably hint the user to implement a ping()
method to avoid the controllers being restarted by the ctlmgr
.
Futhermore, a log entry like WARNING:ctlmgr(artiq-host):artiq_comtools.ctlmgr:Controller xyz ping failed
is misleading to an unsuspecting user as it leaves the impression that the controller is hung, where it in fact very much alive but failed to implement the ping() method. It would be nice to make the message explicit if the controller did not find the method in the first place.
Could you please create a tag with whatever this version nominally is (1.0?)?
Starting the ARTIQ no_hardware
examples fails on Ubuntu (Nix).
Use the following my-shell.nix
file with latest versions of nixos-20.03
& artiq-full
:
EDIT: taken from ARTIQ manual, extra python packages are needed for correct python packages for no_hardware/device_db.py
so it (shouldn't) fail.
let
pkgs = import <nixpkgs> {};
artiq-full = import <artiq-full> { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = [
(pkgs.python3.withPackages(ps: [
artiq-full.artiq
artiq-full.artiq-comtools
ps.numpy
ps.scipy
ps.numba
ps.setuptools
(ps.matplotlib.override { enableQt = true; })
]))
];
}
(Assuming ARTIQ Nix derivations & binaries are installed as specified in manual).
Get the ARTIQ repo w/ examples & start
git clone https://github.com/m-labs/artiq
nix-shell ./my-shell.nix
$ cd artiq/artiq/examples/no_hardware
$ artiq_session
[nix-shell:~/git/artiq/artiq/examples/no_hardware]$ artiq_session
ARTIQ master is now ready.
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller lda failed to start
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller lda failed to start
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
INFO:controller(camera_sim):print:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin/python3: Error while finding module specification for 'artiq.examples.remote_exec_controller' (ModuleNotFoundError: No module named 'artiq')
INFO:controller(camera_sim):print:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin/python3: Error while finding module specification for 'artiq.examples.remote_exec_controller' (ModuleNotFoundError: No module named 'artiq')
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller camera_sim exited
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller camera_sim exited
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
[nix-shell:~/git/artiq/artiq/examples/no_hardware]$ artiq_session
ARTIQ master is now ready.
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller lda failed to start
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller lda failed to start
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
INFO:controller(camera_sim):print:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin/python3: Error while finding module specification for 'artiq.examples.remote_exec_controller' (ModuleNotFoundError: No module named 'artiq')
INFO:controller(camera_sim):print:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin/python3: Error while finding module specification for 'artiq.examples.remote_exec_controller' (ModuleNotFoundError: No module named 'artiq')
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller camera_sim exited
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Controller camera_sim exited
WARNING:ctlmgr(PC):artiq_comtools.ctlmgr:Restarting in 5.0 seconds
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
INFO:dashboard:root:ARTIQ dashboard 5.7139.a694d130 connected to ::1
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Falling back to using screens root_visual.
^CTraceback (most recent call last):
Traceback (most recent call last):
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/runpy.py", line 193, in _run_module_as_main
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
"__main__", mod_spec)
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/runpy.py", line 85, in _run_code
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
exec(code, run_globals) File "/nix/store/d2grsm7cs8j5ql8h9dhyikhqjydv5y74-python3-3.7.6-env/lib/python3.7/site-packages/artiq_comtools/artiq_ctlmgr.py", line 88, in <module>
File "/nix/store/d2grsm7cs8j5ql8h9dhyikhqjydv5y74-python3-3.7.6-env/lib/python3.7/site-packages/artiq/frontend/artiq_master.py", line 161, in <module>
main()
File "/nix/store/d2grsm7cs8j5ql8h9dhyikhqjydv5y74-python3-3.7.6-env/lib/python3.7/site-packages/artiq_comtools/artiq_ctlmgr.py", line 84, in main
main()
File "/nix/store/d2grsm7cs8j5ql8h9dhyikhqjydv5y74-python3-3.7.6-env/lib/python3.7/site-packages/artiq/frontend/artiq_master.py", line 158, in main
loop.run_until_complete(rpc_server.wait_terminate())
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/asyncio/base_events.py", line 570, in run_until_complete
loop.run_forever()
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/asyncio/base_events.py", line 538, in run_forever
self.run_forever()
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/asyncio/base_events.py", line 538, in run_forever
self._run_once()
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/asyncio/base_events.py", line 1746, in _run_once
self._run_once()
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/asyncio/base_events.py", line 1746, in _run_once
event_list = self._selector.select(timeout)
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/selectors.py", line 468, in select
event_list = self._selector.select(timeout)
File "/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/python3.7/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
Traceback (most recent call last):
File "/nix/store/d2grsm7cs8j5ql8h9dhyikhqjydv5y74-python3-3.7.6-env/lib/python3.7/site-packages/quamash/_unix.py", line 121, in __on_read_activated
def __on_read_activated(self, fd):
KeyboardInterrupt
Traceback (most recent call last):
File "/nix/store/267axcb6ns9a879vd79rjx7hpgwcjvcw-python3.7-artiq-5.7139.a694d130/bin/.artiq_session-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/d2grsm7cs8j5ql8h9dhyikhqjydv5y74-python3-3.7.6-env/lib/python3.7/site-packages/artiq/frontend/artiq_session.py", line 50, in main
for line in iter(master.stdout.readline, ""):
KeyboardInterrupt
Just discovered this bug, and haven't had time to debug/isolate it fully. Running python -c "import artiq"
from the same shell works fine.
This is an issue to me because it also prevents other controllers from being started by artiq_ctlmgr
on the same machine.
See #5
On 398f6be, the controller manager prints these messages from time to time, in groups of 10:
ERROR:ctlmgr(hoa2mstr):asyncio:An open stream object is being garbage collected; call "stream.close()" explicitly.
Might be related to controllers exiting due to failure.
(Still need to properly debug this, of course.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.