Hwgroup list in configuration

master
Petr Stefan 8 years ago
parent 52f649d487
commit 83fa82110a

@ -4,7 +4,7 @@
**ReCodEx** is designed to be very modular and configurable. One such configuration is sketched in the following picture. There are two separate frontend instances with distinct databases sharing common backend part. This configuration may be suitable for MFF UK -- basic programming course and KSP competition. Note, that connections between components are not fully accurate.
![Overall Architecture](https://github.com/ReCodEx/wiki/blob/master/images/Overall_Architecture.png)
![Overall architecture](https://github.com/ReCodEx/wiki/blob/master/images/Overall_Architecture.png)
**Web app** is main part of whole project from user point of view. It provides nice user interface and it's the only part, that interacts with outside world directly. **Web API** contains almost all logic of the app including _user management and authentication_, _storing and versioning files_ (with help of **File server**), _counting and assigning points_ to users etc. Advanced users may connect to the API directly or may create custom frontends. **Broker** is essential part of whole architecture. It maintains list of available **Workers**, receives submissions from the **Web API** and routes them further and reports progress of evaluations back to the **Web app**. **Worker** securely runs each received job and evaluate it's results. **Monitor** resends evaluation progress messages to the **Web app** in order to be presented to users.
@ -13,7 +13,7 @@
Detailed communication inside the ReCodEx project is captured in the following image and described in sections below. Red connections are through ZeroMQ sockets, blue are through WebSockets and green are through HTTP(S). All ZeroMQ messages are sent as multipart with one string (command, option) per part, with no empty frames (unles explicitly specified otherwise).
![Communication Img](https://github.com/ReCodEx/wiki/raw/master/images/Backend_Connections.png)
![Communication schema](https://github.com/ReCodEx/wiki/raw/master/images/Backend_Connections.png)
### Broker - Worker communication
@ -22,60 +22,60 @@ Broker acts as server when communicating with worker. Listening IP address and p
#### Commands from broker to worker:
- **eval** - evaluate a job. Requires 3 message frames:
- `job_id` - identifier of the job (in ASCII representation -- we avoid
- **eval** -- evaluate a job. Requires 3 message frames:
- `job_id` -- identifier of the job (in ASCII representation -- we avoid
endianness issues and also support alphabetic ids)
- `job_url` - URL of the archive with job configuration and submitted source
- `job_url` -- URL of the archive with job configuration and submitted source
code
- `result_url` - URL where the results should be stored after evaluation
- **intro** - introduce yourself to the broker (with **init** command) - this is
- `result_url` -- URL where the results should be stored after evaluation
- **intro** -- introduce yourself to the broker (with **init** command) -- this is
required when the broker loses track of the worker who sent the command.
Possible reasons for such event are e.g. that one of the communicating sides
shut down and restarted without the other side noticing.
- **pong** - reply to **ping** command, no arguments
- **pong** -- reply to **ping** command, no arguments
#### Commands from worker to broker:
- **init** - introduce self to the broker. Useful on startup or after reestablishing lost connection. Requires at least 2 arguments:
- `hwgroup` - hardware group of this worker
- `header` - additional header describing worker capabilities. Format must
- **init** -- introduce self to the broker. Useful on startup or after reestablishing lost connection. Requires at least 2 arguments:
- `hwgroup` -- hardware group of this worker
- `header` -- additional header describing worker capabilities. Format must
be `header_name=value`, every header shall be in a separate message frame.
There is no limit on number of headers.
There is also an optional third argument - additional information. If
There is also an optional third argument -- additional information. If
present, it should be separated from the headers with an empty frame. The
format is the same as headers. Supported keys for additional information are:
- `description` - a human readable description of the worker for
- `description` -- a human readable description of the worker for
administrators (it will show up in broker logs)
- `current_job` - an identifier of a job the worker is now processing. This
- `current_job` -- an identifier of a job the worker is now processing. This
is useful when we're reassembling a connection to the broker and need it
to know the worker won't accept a new job.
- **done** - notifying of finished job. Contains following message frames:
- `job_id` - identifier of finished job
- `result` - response result, possible values are:
- OK - evaluation finished successfully
- FAILED - job failed and cannot be reassigned to another worker (e.g.
- **done** -- notifying of finished job. Contains following message frames:
- `job_id` -- identifier of finished job
- `result` -- response result, possible values are:
- OK -- evaluation finished successfully
- FAILED -- job failed and cannot be reassigned to another worker (e.g.
due to error in configuration)
- INTERNAL_ERROR - job failed due to internal worker error, but another
- INTERNAL_ERROR -- job failed due to internal worker error, but another
worker might be able to process it (e.g. downloading a file failed)
- `message` - a human readable error message
- **progress** - notice about current evaluation progress. Contains following message frames:
- `job_id` - identifier of current job
- `state` - what is happening now.
- DOWNLOADED - submission successfuly fetched from fileserver
- FAILED - something bad happened and job was not executed at all
- UPLOADED - results are uploaded to fileserver
- STARTED - evaluation of tasks started
- ENDED - evaluation of tasks is finished
- ABORTED - evaluation of job encountered internal error, job will be rescheduled to another worker
- FINISHED - whole execution is finished and worker ready for another job execution
- TASK - task state changed - see below
- `task_id` - only present for "TASK" state - identifier of task in current job
- `task_state` - only present for "TASK" state - result of task evaluation. One of:
- COMPLETED - task was successfully executed without any error, subsequent task will be executed
- FAILED - task ended up with some error, subsequent task will be skipped
- SKIPPED - some of the previous dependencies failed to execute, so this task won't be executed at all
- **ping** - tell broker I'm alive, no arguments
- `message` -- a human readable error message
- **progress** -- notice about current evaluation progress. Contains following message frames:
- `job_id` -- identifier of current job
- `state` -- what is happening now.
- DOWNLOADED -- submission successfuly fetched from fileserver
- FAILED -- something bad happened and job was not executed at all
- UPLOADED -- results are uploaded to fileserver
- STARTED -- evaluation of tasks started
- ENDED -- evaluation of tasks is finished
- ABORTED -- evaluation of job encountered internal error, job will be rescheduled to another worker
- FINISHED -- whole execution is finished and worker ready for another job execution
- TASK -- task state changed -- see below
- `task_id` -- only present for "TASK" state -- identifier of task in current job
- `task_state` -- only present for "TASK" state -- result of task evaluation. One of:
- COMPLETED -- task was successfully executed without any error, subsequent task will be executed
- FAILED -- task ended up with some error, subsequent task will be skipped
- SKIPPED -- some of the previous dependencies failed to execute, so this task won't be executed at all
- **ping** -- tell broker I'm alive, no arguments
#### Heartbeating
@ -84,7 +84,7 @@ It is important for the broker and workers to know if the other side is still
working (and connected). This is achieved with a simple heartbeating protocol.
The protocol requires the workers to send a **ping** command regularly (the
interval is configurable on both sides - future releases might let the worker
interval is configurable on both sides -- future releases might let the worker
send its ping interval with the **init** command). Upon receiving a **ping**
command, the broker responds with **pong**.
@ -107,18 +107,18 @@ Worker is communicating with file server only from _execution thread_ (see pictu
#### Worker side
Worker is cabable of 2 things - download file and upload file. Internally, worker is using libcurl C library with very similar setup. In both cases it can verify HTTPS certificate (on Linux against system cert list, on Windows against downloaded one from CURL website during installation), support basic HTTP authentication, offer HTTP/2 with fallback to HTTP/1.1 and fail on error (returned HTTP status code is >= 400). Worker have list of credentials to all available file servers in its config file.
Worker is cabable of 2 things -- download file and upload file. Internally, worker is using libcurl C library with very similar setup. In both cases it can verify HTTPS certificate (on Linux against system cert list, on Windows against downloaded one from CURL website during installation), support basic HTTP authentication, offer HTTP/2 with fallback to HTTP/1.1 and fail on error (returned HTTP status code is >= 400). Worker have list of credentials to all available file servers in its config file.
- download file - standard HTTP GET request to given URL expecting file content as response
- upload file - standard HTTP PUT request to given URL with file data as body - same as command line tool `curl` with option `--upload-file`
- download file -- standard HTTP GET request to given URL expecting file content as response
- upload file -- standard HTTP PUT request to given URL with file data as body -- same as command line tool `curl` with option `--upload-file`
#### File server side
File server has its own internal directory structure, where all the files are stored. It provides simple REST API to get them or create new ones. File server doesn't provide authentication or secured connection by itself, but it's supposed to run file server as WSGI script inside a web server (like Apache) with proper configuration. Relevant commands for communication with workers:
- **GET /submission_archives/\<id\>.\<ext\>** - gets an archive with submitted source code and corresponding configuration of this job evaluation
- **GET /tasks/\<hash\>** - gets a file, common usage is for input files or reference result files
- **PUT /results/\<id\>.\<ext\>** - upload archive with evaluation results under specified name (should be same _id_ as name of submission archive). On successful upload returns JSON `{ "result": "OK" }` as body of returned page.
- **GET /submission_archives/\<id\>.\<ext\>** -- gets an archive with submitted source code and corresponding configuration of this job evaluation
- **GET /tasks/\<hash\>** -- gets a file, common usage is for input files or reference result files
- **PUT /results/\<id\>.\<ext\>** -- upload archive with evaluation results under specified name (should be same _id_ as name of submission archive). On successful upload returns JSON `{ "result": "OK" }` as body of returned page.
If not specified otherwise, `zip` format of archives is used. Symbol `/` in API description is root of file server's domain. If the domain is for example `fs.recodex.org` with SSL support, getting input file for one task could look as GET request to `https://fs.recodex.org/tasks/8b31e12787bdae1b5766ebb8534b0adc10a1c34c`.
@ -129,7 +129,7 @@ Broker communicates with monitor also through ZeroMQ over TCP protocol. Type of
socket is same on both sides, ROUTER. Monitor is set to act as server in this
communication, its IP address and port are configurable in monitor's config
file. ZeroMQ socket ID (set on monitor's side) is "recodex-monitor" and must be
sent as first frame of every multipart message - see ZeroMQ ROUTER socket
sent as first frame of every multipart message -- see ZeroMQ ROUTER socket
documentation for more info.
Note that the monitor is designed so that it can receive data both from the
@ -147,7 +147,7 @@ discarded.
Commands from broker to monitor:
- **progress** - notification about progress with job evaluation. See [Progress callback](#progress-callback) section for more info.
- **progress** -- notification about progress with job evaluation. See [Progress callback](#progress-callback) section for more info.
### Broker - Web API communication
@ -158,18 +158,18 @@ server, its IP address and port is configurable in the API.
#### Commands from API to broker:
- **eval** - evaluate a job. Requires at least 4 frames:
- `job_id` - identifier of this job (in ASCII representation -- we avoid endianness issues and also support alphabetic ids)
- `header` - additional header describing worker capabilities. Format must be `header_name=value`, every header shall be in a separate message frame. There is no maximum limit on number of headers. There may be also no headers at all.
- **eval** -- evaluate a job. Requires at least 4 frames:
- `job_id` -- identifier of this job (in ASCII representation -- we avoid endianness issues and also support alphabetic ids)
- `header` -- additional header describing worker capabilities. Format must be `header_name=value`, every header shall be in a separate message frame. There is no maximum limit on number of headers. There may be also no headers at all.
- empty frame (with empty string)
- `job_url` - URI location of archive with job configuration and submitted source code
- `result_url` - remote URI where results will be pushed to
- `job_url` -- URI location of archive with job configuration and submitted source code
- `result_url` -- remote URI where results will be pushed to
#### Commands from broker to API (all are responses to **eval** command):
- **ack** - this is first message which is sent back to frontend right after eval command arrives, basically it means "Hi, I am all right and am capable of receiving job requests", after sending this broker will try to find acceptable worker for arrived request
- **accept** - broker is capable of routing request to a worker
- **reject** - broker can't handle this job (for example when the requirements
- **ack** -- this is first message which is sent back to frontend right after eval command arrives, basically it means "Hi, I am all right and am capable of receiving job requests", after sending this broker will try to find acceptable worker for arrived request
- **accept** -- broker is capable of routing request to a worker
- **reject** -- broker can't handle this job (for example when the requirements
specified by the headers cannot be met). There are (rare) cases when the
broker finds that it cannot handle the job after it's been confirmed. In such
cases it uses the frontend REST API to mark the job as failed.
@ -179,9 +179,9 @@ server, its IP address and port is configurable in the API.
File server has a REST API for interaction with other parts of ReCodEx. Description of communication with workers is in [File server side](#file-server-side) section. On top of that, there are other commands for interaction with the API:
- **GET /results/\<id\>.\<ext\>** - download archive with evaluated results of job _id_
- **POST /submissions/\<id\>** - upload new submission with identifier _id_. Expects that the body of the POST request uses file paths as keys and the content of the files as values. On successful upload returns JSON `{ "archive_path": <archive_url>, "result_path": <result_url> }` in response body. From _archive_path_ the submission can be downloaded (by worker) and corresponding evaluation results should be uploaded to _result_path_.
- **POST /tasks** - upload new files, which will be available by names equal to `sha1sum` of their content. There can be uploaded more files at once. On successful upload returns JSON `{ "result": "OK", "files": <file_list> }` in response body, where _file_list_ is dictionary of original file name as key and new URL with already hashed name as value.
- **GET /results/\<id\>.\<ext\>** -- download archive with evaluated results of job _id_
- **POST /submissions/\<id\>** -- upload new submission with identifier _id_. Expects that the body of the POST request uses file paths as keys and the content of the files as values. On successful upload returns JSON `{ "archive_path": <archive_url>, "result_path": <result_url> }` in response body. From _archive_path_ the submission can be downloaded (by worker) and corresponding evaluation results should be uploaded to _result_path_.
- **POST /tasks** -- upload new files, which will be available by names equal to `sha1sum` of their content. There can be uploaded more files at once. On successful upload returns JSON `{ "result": "OK", "files": <file_list> }` in response body, where _file_list_ is dictionary of original file name as key and new URL with already hashed name as value.
There are no plans yet to support deleting files from this API. This may change in time.
@ -194,25 +194,25 @@ Monitor interacts with web application through WebSocket connection. Monitor act
When monitor receives **progress** message from broker there are two options:
- there is no WebSocket connection for listed channel (job id) - message is dropped
- there is active WebSocket connection for listed channel - message is parsed into JSON format (see below) and send as string to that established channel. Messages for active connections are queued, so no messages are discarded even on heavy workload.
- there is no WebSocket connection for listed channel (job id) -- message is dropped
- there is active WebSocket connection for listed channel -- message is parsed into JSON format (see below) and send as string to that established channel. Messages for active connections are queued, so no messages are discarded even on heavy workload.
Message JSON format is dictionary (associative array) with keys:
- **command** - type of progress, one of:
- DOWNLOADED - submission successfuly fetched from fileserver
- FAILED - something bad happened and job was not executed at all
- UPLOADED - results are uploaded to fileserver
- STARTED - evaluation of tasks started
- ENDED - evaluation of tasks is finished
- ABORTED - evaluation of job encountered internal error, job will be rescheduled to another worker
- FINISHED - whole execution is finished and worker ready for another job execution
- TASK - task state changed - see below
- **task_id** - id of currently evaluated task. Present only if **command** is "TASK".
- **task_state** - state of task with id **task_id**. Present only if **command** is "TASK". Value is one of "COMPLETED", "FAILED" and "SKIPPED".
- COMPLETED - task was successfully executed without any error, subsequent task will be executed
- FAILED - task ended up with some error, subsequent task will be skipped
- SKIPPED - some of the previous dependencies failed to execute, so this task won't be executed at all
- **command** -- type of progress, one of:
- DOWNLOADED -- submission successfuly fetched from fileserver
- FAILED -- something bad happened and job was not executed at all
- UPLOADED -- results are uploaded to fileserver
- STARTED -- evaluation of tasks started
- ENDED -- evaluation of tasks is finished
- ABORTED -- evaluation of job encountered internal error, job will be rescheduled to another worker
- FINISHED -- whole execution is finished and worker ready for another job execution
- TASK -- task state changed -- see below
- **task_id** -- id of currently evaluated task. Present only if **command** is "TASK".
- **task_state** -- state of task with id **task_id**. Present only if **command** is "TASK". Value is one of "COMPLETED", "FAILED" and "SKIPPED".
- COMPLETED -- task was successfully executed without any error, subsequent task will be executed
- FAILED -- task ended up with some error, subsequent task will be skipped
- SKIPPED -- some of the previous dependencies failed to execute, so this task won't be executed at all
### Web app - Web API communication
@ -230,7 +230,7 @@ Job is a set/list of tasks (it is generally a set, but order of tasks have some
Tasks are executed sequentially -- by the linear ordering of the task graph. Parallel tasks (tasks, which are not directly dependent and thus their linear ordering may be arbitrary) are ordered first by their priority (higher number means higher priority) and secondly by their order in the configuration file. Priority is important for specifying evaluation flow. See sample picture for better understanding.
![Picture of task serialization](https://github.com/ReCodEx/wiki/raw/master/images/Assignment_overview.png)
![Task serialization](https://github.com/ReCodEx/wiki/raw/master/images/Assignment_overview.png)
Each task has a unique ID (alphanum string like _CompileA_, _RunAA_, or _JudgeAB_ in the picture). These IDs are used to identify tasks (for dependency references, in the log, ...). Numbers in bottom right corner are priorities of each task. Higher number means greater priority. It means, that if task _RunAA_ is done, next must be _JudgeAA_ and not _RunAB_ (that will be also valid linear ordering, but _RunAB_ has lower priority).
@ -288,9 +288,9 @@ Even though the internal operations may be handled by external executables (`mv`
External tasks are arbitrary executables, typically ran inside isolate (with given parameters) and the worker waits until they finish. The exit code determines, whether the task succeeded (0) or failed (anything else). A task may be marked as essential; in such case, failure will immediately cause termination of the whole job.
- **stdin** - can be configured to read from existing file or from `/dev/null`.
- **stdout** and **stderr** - can be individually redirected to a file or discarded. If this output options are specified, than it's possible to upload output files with results by copying them into result directory.
- **limits** - task has time and memory limits; if these limits are exceeded, the task is failed.
- **stdin** -- can be configured to read from existing file or from `/dev/null`.
- **stdout** and **stderr** -- can be individually redirected to a file or discarded. If this output options are specified, than it's possible to upload output files with results by copying them into result directory.
- **limits** -- task has time and memory limits; if these limits are exceeded, the task is failed.
The task results (exit code, time, and memory consumption, etc.) are saved into result yaml file and sent back to frontend application to address which was specified on input.
@ -357,39 +357,40 @@ Configuration of the job which is passed to worker is generated on demand by web
Here is the list with description of allowed options. Mandatory items are bold, optional italic.
- **submission** - information about this particular submission
- **job-id** - textual ID which should be unique in whole recodex
- **language** - no specific function, just for debugging and clarity
- **file-collector** - address from which fetch tasks will download data
- _log_ - default is false, can be omitted, determines whether job execution will be logged into one shared log
- **tasks** - list (not map) of individual tasks
- **task-id** - unique identifier of task in scope of one submission
- **priority** - higher number, higher priority
- **fatal-failure** - if true, than execution of whole job will be stopped after failing of this one
- _dependencies_ - list of dependencies which have to be fulfilled before this task, can be omitted if there is no dependencies
- **cmd** - description of command which will be executed
- **bin** - the binary itself (full path of external command or name of internal task)
- _args_ - list of arguments which will be sent into execution unit
- _test-id_ - ID of the test this task is part of - must be specified for tasks which the particular test's result depends on
- _type_ - type of the task, can be omitted, default value is _inner_ - possible values are: _inner_, _initiation_, _execution_, _evaluation_
- _sandbox_ - wrapper for external tasks which will run in sandbox, if defined task is automatically external
- **name** - name of used sandbox
- _stdin_ - file to which standard input will be redirected, can be omitted
- _stdout_ - file to which standard output will be redirected, can be omitted
- _stderr_ - file to which error output will be redirected, can be omitted
- **limits** - list of limits which can be passed to sandbox
- **hw-group-id** - determines specific limits for specific machines
- _time_ - time of execution in second
- _wall-time_ - wall time in seconds
- _extra-time_ - extra time which will be added to execution
- _stack-size_ - size of stack of executed program in kilobytes
- _memory_ - overall memory limit for application in kilobytes
- _parallel_ - integral number of processes which can run simultaneously, time and memory limits are merged from all potential processes/threads
- _disk-size_ - size of all IO operations from/to files in kilobytes
- _disk-files_ - number of files which can be opened
- _environ-variable_ - wrapper for map of environmental variables, union with default worker configuration
- _chdir_ - this will be working directory of executed application
- _bound-directories_ - list of structures representing directories which will be visible inside sandbox, union with default worker configuration. Contains 3 suboptions: **src** - source pointing to actual system directory, **dst** - destination inside sandbox which can have its own filesystem binding and **mode** - determines connection mode of specified directory, one of values: RW, NOEXEC, FS, MAYBE, DEV
- **submission** -- information about this particular submission
- **job-id** -- textual ID which should be unique in whole recodex
- **language** -- no specific function, just for debugging and clarity
- **file-collector** -- address from which fetch tasks will download data
- _log_ -- default is false, can be omitted, determines whether job execution will be logged into one shared log
- **hw-groups** -- list of hardware groups for which are specified limits in this configuration
- **tasks** -- list (not map) of individual tasks
- **task-id** -- unique identifier of task in scope of one submission
- **priority** -- higher number, higher priority
- **fatal-failure** -- if true, than execution of whole job will be stopped after failing of this one
- _dependencies_ -- list of dependencies which have to be fulfilled before this task, can be omitted if there is no dependencies
- **cmd** -- description of command which will be executed
- **bin** -- the binary itself (full path of external command or name of internal task)
- _args_ -- list of arguments which will be sent into execution unit
- _test-id_ -- ID of the test this task is part of -- must be specified for tasks which the particular test's result depends on
- _type_ -- type of the task, can be omitted, default value is _inner_ -- possible values are: _inner_, _initiation_, _execution_, _evaluation_
- _sandbox_ -- wrapper for external tasks which will run in sandbox, if defined task is automatically external
- **name** -- name of used sandbox
- _stdin_ -- file to which standard input will be redirected, can be omitted
- _stdout_ -- file to which standard output will be redirected, can be omitted
- _stderr_ -- file to which error output will be redirected, can be omitted
- **limits** -- list of limits which can be passed to sandbox
- **hw-group-id** -- determines specific limits for specific machines
- _time_ -- time of execution in second
- _wall-time_ -- wall time in seconds
- _extra-time_ -- extra time which will be added to execution
- _stack-size_ -- size of stack of executed program in kilobytes
- _memory_ -- overall memory limit for application in kilobytes
- _parallel_ -- integral number of processes which can run simultaneously, time and memory limits are merged from all potential processes/threads
- _disk-size_ -- size of all IO operations from/to files in kilobytes
- _disk-files_ -- number of files which can be opened
- _environ-variable_ -- wrapper for map of environmental variables, union with default worker configuration
- _chdir_ -- this will be working directory of executed application
- _bound-directories_ -- list of structures representing directories which will be visible inside sandbox, union with default worker configuration. Contains 3 suboptions: **src** -- source pointing to actual system directory, **dst** -- destination inside sandbox which can have its own filesystem binding and **mode** -- determines connection mode of specified directory, one of values: RW, NOEXEC, FS, MAYBE, DEV
#### Configuration example
@ -403,6 +404,8 @@ submission: # happy hippoes fence
language: c
file-collector: http://localhost:9999/tasks
log: true
hw-groups:
- group1
tasks:
- task-id: "compilation"
priority: 2
@ -504,13 +507,13 @@ Usage of variables in configuration is simple and kind of shell-like. Name of va
List of usable variables in job configuration:
- **WORKER_ID** - integral identification of worker, unique on server
- **JOB_ID** - identification of this job
- **SOURCE_DIR** - directory where source codes of job are stored
- **EVAL_DIR** - evaluation directory which should point inside sandbox. Note, that some existing directory must be bound inside sanbox under **EVAL_DIR** name using _bound-directories_ directive inside limits section.
- **RESULT_DIR** - results from job can be copied here, but only with internal task
- **TEMP_DIR** - general temp directory which is not dependent on operating system
- **JUDGES_DIR** - directory in which judges are stored (outside sandbox)
- **WORKER_ID** -- integral identification of worker, unique on server
- **JOB_ID** -- identification of this job
- **SOURCE_DIR** -- directory where source codes of job are stored
- **EVAL_DIR** -- evaluation directory which should point inside sandbox. Note, that some existing directory must be bound inside sanbox under **EVAL_DIR** name using _bound-directories_ directive inside limits section.
- **RESULT_DIR** -- results from job can be copied here, but only with internal task
- **TEMP_DIR** -- general temp directory which is not dependent on operating system
- **JUDGES_DIR** -- directory in which judges are stored (outside sandbox)
### Directories and Files
@ -533,22 +536,22 @@ Results of tasks are sent back in YAML format compressed into archive. This arch
List of items from results file. Mandatory items are bold, optional ones italic.
- **job-id** - identification of job to which this results belongs
- _error_message_ - present only if whole execution failed and none of tasks were executed
- **results** - list of tasks results
- **task-id** - unique identification of task in scope of this job
- **status** - three states: OK, FAILED, SKIPPED
- _error_message_ - defined only in internal tasks on failure
- _sandbox_results_ - if defined than this task was external and was run in sandbox
- **exitcode** - integer which executed program gave on exit
- **time** - time in seconds in which program exited
- **wall-time** - wall time in seconds
- **memory** - how much memory program used in kilobytes
- **max-rss** - maximum resident set size used in kilobytes
- **status** - two letter status code: OK, RE, SG, TO, XX
- **exitsig** - description of exit signal
- **killed** - boolean determining if program exited correctly or was killed
- **message** - status message on failure
- **job-id** -- identification of job to which this results belongs
- _error_message_ -- present only if whole execution failed and none of tasks were executed
- **results** -- list of tasks results
- **task-id** -- unique identification of task in scope of this job
- **status** -- three states: OK, FAILED, SKIPPED
- _error_message_ -- defined only in internal tasks on failure
- _sandbox_results_ -- if defined than this task was external and was run in sandbox
- **exitcode** -- integer which executed program gave on exit
- **time** -- time in seconds in which program exited
- **wall-time** -- wall time in seconds
- **memory** -- how much memory program used in kilobytes
- **max-rss** -- maximum resident set size used in kilobytes
- **status** -- two letter status code: OK, RE, SG, TO, XX
- **exitsig** -- description of exit signal
- **killed** -- boolean determining if program exited correctly or was killed
- **message** -- status message on failure
#### Example result file
@ -579,9 +582,9 @@ results:
### Scoring
Every assignment consists of tasks. Only some tasks however are part of the evaluation. Those tasks are grouped into **tests**. Each task might have assigned a _test-id_ parameter, as described above. Every test must consist of at least two tasks: execution and evaluation by a judge. The former retrieves information about the execution such as elapsed time and memory consumed, the latter result with a score - float between 0 and 1. There may be more than one execution tasks, but evaluation task must be exactly one.
Every assignment consists of tasks. Only some tasks however are part of the evaluation. Those tasks are grouped into **tests**. Each task might have assigned a _test-id_ parameter, as described above. Every test must consist of at least two tasks: execution and evaluation by a judge. The former retrieves information about the execution such as elapsed time and memory consumed, the latter result with a score -- float between 0 and 1. There may be more than one execution tasks, but evaluation task must be exactly one.
Total resulting score of the assignment submission is then calculated according to a supplied score config (described below). Total score is also a float between 0 and 1. This number is then multiplied by the maximum of points awarded for the assignment by the teacher assigning the exercise - not the exercise author.
Total resulting score of the assignment submission is then calculated according to a supplied score config (described below). Total score is also a float between 0 and 1. This number is then multiplied by the maximum of points awarded for the assignment by the teacher assigning the exercise -- not the exercise author.
#### Simple score calculation
@ -629,10 +632,10 @@ the test inputs to its standard input. Outputs are compared with the default jud
#### Compiler principles
This course uses multiple tools in a pipeline-like fashion - for example `flex`
This course uses multiple tools in a pipeline-like fashion -- for example `flex`
and `bison`.
We create a stage for each of the steps of this pipeline - we run flex and test
We create a stage for each of the steps of this pipeline -- we run flex and test
the output, then we run bison on top of previous stage results and do the same. This is more advanced configuration and ReCodEx is specifically designed to support such evaluation pipeline.
#### XML technologies

Loading…
Cancel
Save