Skip to content

Italian contest exporter misconfigure some communication tasks #1195

Description

@MarcoUCM

Description:

The italian contest exporter does not adjust some properties properly when exporting communication tasks. When the exporter infers that the tasks is a "communication task" it automatically assumes that "Submissions are compiled into a stub" and that "User process read from and write to fifos, whose paths are given as arguments".

However IMHO that assumption should only be made when at least a stub is provided in the task description. If no one is provided then the task should be configured as "Submissions are self-sufficient" and "User processes read from stdin and write to stdout" as in regular batch tasks.

Steps to reproduce:

  1. Download the contest example (https://github.com/cms-dev/con_test)
  2. Remove con_test/communication/sol/stub* in order to simulate a communication problem without stubs. Obviously, the task is not valid anymore because the statement, solution and manager expect those stubs, but it is just a quick-and-dirty way of having a communication task that (apparently) communicates via stdin/stdout with the validator.
  3. Import the contest (using cmsImportContest -L italy_yaml)

Expected:

In the Dataset section of the task details communication in the front-end the configuration should be:

  • Task type = communication
  • Number of Processes = 1
  • Compilation: Submissions are self-sufficient
  • User I/O: User processes read from stdin and write to stdout

Actual:

The loaded configuration is

  • ✔️ Task type = communication
  • ✔️ Number of Processes = 1
  • ❌ Compilation: Submissions are compiled into a stub
  • ❌ User I/O: User process read from and write to fifos, whose paths are given as arguments

System Information

CMS version: tested in v1.4 (but the bug remains in master)
Was CMS installed: yes
Using a virtualenv: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions