Commit Graph

58 Commits

Author SHA1 Message Date
84f4725015 cache source on import of modules that may contain kernels. Closes #416 2016-08-06 12:01:49 +08:00
03a69ec5b7 scheduler: add check_pause function 2016-06-27 14:37:29 +08:00
whitequark
640022122b embedding: refactor some more. 2016-05-16 14:38:09 +00:00
3cfef4264b frontend: upper-case positional arguments in help messages 2016-04-22 16:33:44 +08:00
caf774579a environment: refactor 2016-04-16 19:31:07 +08:00
0cca2bbef6 artiq_run: style 2016-04-12 15:16:48 +08:00
whitequark
914bc9f360 artiq_run: allow running LLVM IR/bitcode files, even with trivial RPCs. 2016-02-24 22:50:45 +00:00
c3cdce9d02 style 2016-02-25 01:22:43 +08:00
f4c7f02127 CoreException: store at 'py_exn.artiq_core_exception'
... and fix a few imports
2016-01-25 17:24:00 -07:00
2beaf23e6c language...ARTIQException -> coredevice...CoreException
gets rid of a cross import
is only used there
2016-01-25 17:24:00 -07:00
whitequark
e0d5b77e27 Commit missing parts of 127b117. 2016-01-15 17:11:26 +00:00
whitequark
127b117113 Add @host_only function decorator (#172). 2016-01-15 16:42:08 +00:00
whitequark
03dd1c3a43 Refactor the logic of printing diagnostics to solely rely on Engine. 2016-01-04 22:11:54 +08:00
whitequark
8aa34ee952 compiler: don't require exceptions to inherit ARTIQException. 2015-12-31 21:54:54 +08:00
whitequark
28fa68730a Merge branch 'master' into new-py2llvm 2015-11-20 15:55:29 +08:00
whitequark
51f04f6311 Explicitly use the python3.5 binary everywhere. 2015-11-07 13:39:39 +03:00
whitequark
da622937f6 Merge commit 'd0b5c3ba7fb' into new-py2llvm 2015-11-07 09:41:34 +03:00
2c77c80b4f master: expose more scheduler APIs to the experiments 2015-10-30 13:41:18 +08:00
whitequark
bd5b324fc2 Merge branch 'master' into new-py2llvm 2015-10-13 19:24:45 +03:00
97accd2540 merge parameters and results into datasets 2015-10-12 17:18:23 +08:00
b3584bc190 language,master,run: support raw access to DDB from experiments. Closes #123 2015-10-04 18:29:39 +08:00
50a5a3baf0 environment: attr_* -> setattr_* 2015-10-04 00:18:21 +08:00
whitequark
3e1348a084 Merge branch 'master' of github.com:m-labs/artiq into new-py2llvm 2015-09-27 18:22:28 +03:00
01416bb0be copyright: claim contributions
These are contributions of >= 30% or >= 20 lines (half-automated).

I hereby resubmit all my previous contributions to the ARTIQ project
under the following terms:

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Closes #130

Signed-off-by: Robert Jordens <jordens@gmail.com>
2015-09-06 16:08:57 -06:00
whitequark
2df8b946f9 Factor out the code to pretty-print diagnostics. 2015-08-31 22:52:39 -06:00
whitequark
6b8ef8c490 artiq_run: use "artiq_run_" as user code module prefix, not "file_import_". 2015-08-28 02:22:59 -05:00
whitequark
ed236eb7f2 artiq_run: pretty-print diagnostics. 2015-08-28 01:54:51 -05:00
whitequark
d473d58b41 artiq_{compile,run}: adapt to new compiler. 2015-08-28 01:43:46 -05:00
34a9c8c12d artiq_run: add dummy pause method (closes #100) 2015-08-15 09:16:00 +08:00
d14a31f443 artiq_run: fix ELF running 2015-07-25 15:52:38 +08:00
32d141f5ac refactor ddb/pdb/rdb 2015-07-13 22:21:32 +02:00
0e92cfe053 artiq_run: remove support for stale watchdog API 2015-07-11 22:26:37 +02:00
4a7c6954c3 artiq_run: implement mockups of new scheduler API 2015-05-28 17:24:47 +08:00
4048568d8e support kernel handover with coherent time 2015-05-02 23:41:49 +08:00
8a796a6818 artiq_run/ELFRunner: create a core device object (necessary for runtime exception processing) 2015-04-30 10:16:24 +08:00
5e046dc5ce artiq_run: move parse_arguments and get_experiment to tools 2015-04-07 13:04:47 +08:00
9b46bc623a dbhub: do not use as context manager, turn close exceptions into warnings, do not close devices early in worker 2015-04-05 17:49:41 +08:00
0ec7e9a98c artiq_run: fix get_argparser() 2015-04-04 21:17:24 -06:00
1a1afd5410 artiq_run: refactor, support use from within experiments
You can always (under posix) use #!/usr/bin/env artiq_run as
shebang for experiments and make them executable.
Now, you can also do this (portable):

if __name__ == "__main__":
    from artiq.frontend.artiq_run import run
    run()

to make an experiment executable. The CLI options are all inherited.
Also:

* removed --elf: can be inferred from filename
* did some refactoring and cleanup
* use logging for all messages, except the result printing (use -v to get
parameter changes and dummy scheduler actions)
2015-04-04 20:51:48 -06:00
200e20fb39 worker: close devices immediately after run and before analyze 2015-03-20 12:01:34 +01:00
2b3641ac0a db,worker: fix realtime result initialization 2015-03-13 15:12:55 +01:00
d5795fd619 master: watchdog support
Introduces a watchdog context manager to use in the experiment code that
terminates the process with an error if it times out. The syntax is:

with self.scheduler.watchdog(20*s):
   ...

Watchdogs timers are implemented by the master process (and the worker
communicates the necessary information about them) so that they can be
enforced even if the worker crashes. They can be nested arbitrarily.
During yields, all watchdog timers for the yielding worker are
suspended [TODO]. Setting up watchdogs is not supported in kernels,
however, a kernel can be called within watchdog contexts (and terminating
the worker will terminate the kernel [TODO]).

It is possible to implement a heartbeat mechanism using a watchdog, e.g.:

for i in range(...):
    with self.scheduler.watchdog(...):
        ....

Crashes/freezes within the iterator or the loop management would not be
detected, but they should be rare enough.
2015-03-11 16:43:14 +01:00
ec1d082730 remove timeout from run_params (to be replaced by a better mechanism) 2015-03-09 10:51:32 +01:00
d95a9cac9a move realtime result registration into dbh, simplify syntax 2015-03-08 17:27:27 +01:00
f2e3dfb848 Experiment base class, replace __artiq_unit__ with docstring 2015-03-08 15:55:30 +01:00
0f007cb1a7 language/db: remove implicit_core 2015-03-08 11:37:53 +01:00
4267e0deab master,artiq_run: simplify unit autodetection 2015-02-21 20:26:58 -07:00
387de11e56 artiq_run: fix import 2015-02-21 20:09:46 -07:00
65555a3a09 artiq_run,master: introduce __artiq_unit__ attribute to mark and name experiments 2015-02-20 14:01:34 -07:00
0dd5692c32 master,run: pass run_params to experiment 2015-02-19 20:05:12 -07:00