YAML Contest Configuration - pc2ccs/pc2v9 GitHub Wiki

Overview

Configuring a contest normally involves a series of steps:

  • Creating accounts for teams, judges, administrators, scoreboards, etc.
  • Defining the programming languages supported (allowed) in the contest.
  • Defining the contest problems.
  • Configuring additional settings such as the contest name, start-time, duration, judging methods, etc.

As described in the PC2v9 Contest Administrator's Guide (available in the doc folder in every PC² download), PC² can be configured either interactively via the Administrator's Configure Contest screen, or by using YAML files. Typically, configuration via YAML is done by loading one or more YAML configuration files, which can either be done using the --load option when starting the PC² server or via the Import Config tab on the PC² Admin.

YAML configuration files are normally stored in a CLICS Contest Data Package (CDP). A typical CDP includes a folder named config containing a YAML file named contest.yaml which holds overall contest configuration data. The CDP config folder also contains one subfolder for each contest problem; each contest problem subfolder contains a file named problem.yaml containing configuration details for that specific problem.

Note: the organization and format of YAML configuration files for PC² is based on the CLICS Contest Control System Requirements Specification for input files. In particular, that specification provides for multiple different YAML files, including contest.yaml, system.yaml, problemset.yaml, and problem.yaml. PC² supports separating YAML configuration into these separate files, along with an additional YAML file system.p2.yaml containing PC²-specific configuration values. However, PC² also supports merging the contents of all YAML configuration information into just two types of files: contest.yaml and one problem.yaml file for each problem.

YAML File Structure

YAML files consist of entries called mappings. One form of YAML mapping consists of lines containing colon-separated key:value pairs. For example, a contest.yaml file might contain the following lines:

name: ICPC 2022 World Finals
short-name: 2022 Finals
start-time: 2022-06-01T10:00:00Z-08
duration: 5:00:00
scoreboard-freeze-length: 1:00:00
penalty-time: 20

This specifies that the name of the contest is "ICPC 2022 World Finals", that an acceptable "short name" for the contest (used for example where display space is limited) is "2022 Finals", that the contest starts on June 1st, 2022 at 10am Pacific Standard Time (GMT-8), that the contest lasts five hours, that the scoreboard will be frozen with one hour remaining in the contest, and that the penalty for an incorrect submission is 20 points (minutes). When PC² loads a YAML file containing these entries it will set the corresponding PC² attributes to match the specified values.

Another form of YAML mapping is a list mapping, which consists of a keyword followed by a colon and then a list of items, with each new item indented on a new line and starting with a dash. Whitespace (but not including tab characters) is used to indicate nested (indented) structure. For example, a contest.yaml file might include the following list mapping:

languages:
  - name: Java
    active: true

  - name: Perl
    active: false

  - name: GNU C++
    active: true

This specifies that there are three languages defined in the contest: Java, Perl, and C++, but that only Java and C++ are "active" (languages which are not active will not be displayed).

As another list example, the following YAML mapping specifies that there are two problems in the contest: one designated by the letter 'A', with short name "hello", balloon color "red", and balloon RGB value hex "FF0000"; the other designated by the letter 'B', with short name "sumit", balloon color "yellow", and balloon RGB value hex "FFFF00":

problemset:
  - letter: A
    short-name: hello
    color: red
    rgb: "#FF0000"

  - letter: B
    short-name: sumit
    color: yellow
    rgb: "#FFFF00"

The "short name" associated with a problem is taken to be the name of the folder beneath the config folder where the problem-specific details for the problem are found. Note also the use of quotes around the balloon RGB color values; the quotes are necessary because the "hexadecimal" indicator (#) will be misinterpreted by the YAML parser if it is not inside a quoted literal.

Each list mapping causes PC² to create a set of PC² attributes -- one attribute for each list item. For example, the languages mapping shown above will create three language definitions in PC² and the problemset mapping will create two problem definitions in PC² (including that it will search for and load a problem.yaml configuration file from the corresponding problem short-name folder and use the values in that file to set the corresponding problem attributes).

YAML Keywords

The format of YAML configuration files for PC², and in particular the set of recognized YAML keywords, is based on the CLICS Contest Control System Requirements Specification for Contest Control System (CCS) input files. PC² supports (nearly) all of the CLICS YAML keywords, as well as a number of additional PC²-specific keywords.

The following tables list the YAML keywords recognized by PC². Note that the Value field of most keywords can contain PC² Substitution Variables. (Note also that the table formatting may break some keywords into multiple lines; all keywords are single-line character strings with no imbedded spaces.)

Keywords Supported in contest.yaml Files

Keyword Value Notes
accounts A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the accounts table, below. Note that accounts in PC2 are site-specific; for example, account team1 at Site 1 is different from account team1 at Site 2. Caution: if TEAM accounts are defined in the contest.yaml file these will override (replace) any correspondingly-numbered team accounts which are loaded from a teams.tsv file.
auto-judging A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the auto-judging table, below. Used to specify what problems are to be "Auto-Judged" by what Judge accounts at which sites.
auto-stop-clock-at-end String, either "true" or "false". Indicates whether PC² should automatically stop the contest (stop accepting submissions) when the Contest Clock reaches zero.
computer-judged A Boolean string ("true" or "false") indicating whether a contest problem is to be automatically judged by a "Validator" (also referred to as "AutoJudging"). If this keyword appears at the outer YAML contest.yaml file level, it applies to ALL problems; if it appears within a problem.yaml file, it applies only to that problem. The default if not specified is true. See also: manual-review.
duration Contest length in HH:MM:SS format. Contest clock time, not wall-clock; if the Admin pauses the Contest Clock, the time which elapses during the pause is not counted as part of duration.
judge-config-path Path to the "contest data package" containing the judge's data files. Full path on the JUDGE machines; for example, /home/pc2/currentContest/cdp/config. See also load-data-files.
languages A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the languages table, below.
load-data-files A Boolean string ("true" or "false") indicating whether data files should be loaded internally into PC2. By default, PC2 stores all data files on the PC2 server; this is known as storing "internally". This can cause significant network overhead when large data files are transferred to each judge for each submission execution. The alternative is to not store files on the PC2 server, but to instead store them "externally" (outside of PC2) on each judge machine. Setting this value to false indicates data files are not to be stored internally. See also judge-config-path.
manual-review A Boolean string ("true" or "false") indicating whether a contest problem is to be manually reviewed by human judges. If this keyword appears at the outer YAML contest.yaml file level, it applies to ALL problems; if it appears within a problem.yaml file, it applies only to that problem. The default if not specified is false. See also: computer-judged; note that it IS legal to specify both computer-judged:true AND manual-review:true. Note also that the concept of manual-review only applies when computer-judged is true; to do ONLY manual judging, specify computer-judged:false (which automatically enables manual judging).
max-output-size-K A decimal number giving the maximum output, in Kilobytes, a team program is allowed to produce before it is terminated.
name Formal (full) name of the contest. See also short-name.
output-private-score-dir The directory where the unfrozen (current, live) scoreboard is to be written. Updated whenever a score-changing event occurs.
output-public-score-dir The directory where the frozen scoreboard is to be written. If a scoreboard "freeze" has been configured (see scoreboard-freeze-length), submissions during the freeze period will be shown on this scoreboard as "Pending".
penalty-time Penalty minutes for rejected submission. Defaults to 20 if not present.
permissions A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the permissions keywords table, below.
problemset A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the problems table, below.
problems An alias for the problemset YAML list mapping.
scoreboard-freeze-length Amount of time before end of contest when scoreboard will be frozen, in HH:MM:SS format. An accepted synonym is scoreboard-freeze. Note: always specify time components as two digits (e.g. 01:00:00). In particular note the (required) leading zero on the HH field.
sites A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the sites table, below.
send-prelim-judgement A Boolean string ("true" or "false") indicating whether, when BOTH computer-judging AND manual-review are specified, teams should be sent a "Preliminary Judgement" (containing the Validator response from computer-judging, marked as "Preliminary") while manual-review is in progress. Ignored unless both computer-judging AND manual-review are specified.
short-name Short name of contest. Used where display space is limited.
start-time Scheduled wall-clock start time for the contest. Must be in ISO 8601 format.
stop-on-first-failed-test-case A Boolean string ("true" or "false") indicating whether AutoJudges should stop processing test cases when the first failed test cases is encountered. Defaults to false if not present (that is, the default is to process ALL test cases).
team-scoreboard-display-format-string A string allowing use of substitution variables to describe the format in which team names should displayed on the scoreboard. Example: the mapping value Team {:clientnumber} : {:teamname} ( {:shortschoolname} ) could display as Team 3 : The Awesome Coders ( Cal State Sacramento ). Note the added (literal) colon and parentheses.
timeout An integer giving the global time limit (in seconds) which should be applied to all problems. Can be overridden for specific problems in the problem.yaml file for the problem.
validator A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the Validators keywords table, below.

The preceding table is currently incomplete (like many projects, the documentation lags behind the code). Some additional keywords which are supported (but not documented in the above table) include keywords to control "Shadow Mode" ( shadow-mode; ccs-url; ccs-login; ccs-password; ccs-last-event-id; ccs-test-mode; team-proxy-accounts); keywords to control the PC2 contest clock ( elapsed; remaining; running); keywords to manage problem data files ( load-data-files); keywords to specify judging parameters ( judgements; accepted-judgement; judging-type); and keywords to manage the Web Team Interface (WTI) configuration ( allow-multiple-team-logins).

Keywords Supported in problem.yaml Files

Many of the YAML keywords listed above under contest.yaml files can also appear in problem.yaml files (in which case they apply only to the corresponding problem). Among the keywords which can appear in either type of file are computer-judged, load-data-files, manual-review, max-output-size-K, send-prelim-judgement, stop-on-first-failed-test-case, timeout, and validator. The following additional keywords may also appear in a problem.yaml file used to describe an individual contest problem.

Keyword Value Notes
author A string identifying the author of the problem.
groups A single quoted string consisting of semi-colon or comma-delimited group names indicating the contest groups for which this problem should be visible. The group names listed in this entry must precisely match the groups defined in the groups.tsv file.
input A YAML list with a single list item readFromSTDIN having a value either true or false. Specifies whether the problem statement instructs teams to write their program to read from stdin (true) or from a file (false).
license The license associated with the problem, if any.
limits A YAML list mapping containing one or more list items, where each list item can contain mappings as shown in the limits keywords table, below. Values appearing in the limits section of a problem.yaml file override, for this problem, any limits specified elsewhere.
memory-limit-in-Meg The memory limit to be imposed on submissions for the problem. This attribute may only be specified when running on platforms where sandboxing is supported in PC2 (see the PC2 Contest Administrator's Guide for details).
name The display name of the problem.
rights_owner The person or entity that owns the rights to the problem.
source Where the problem was first used. Example: Greater New York Regional Contest 2023

Example problem.yaml file:

name: Hello World
max-output-size-K: 128
limits: 
   timeout: 5
   output:  10     #10KB; overrides max-output-size-K, above
validator: 
   validatorProg: pc2.jar edu.csus.ecs.pc2.validator.Validator
   validatorCmd: '{:validator} {:infile} {:outfile} {:ansfile} {:resfile}  -pc2 1 false'
   usingInternal: true
   validatorOption: 1
input: 
   readFromSTDIN: true
groups: 'British Columbia D1, Washington D1, Oregon D1, California D1, Hawaii D1'

Additional information on YAML keywords supported by PC² can be found on our older Wiki pages (although those pages are not maintained and may be out of date); see Contest.yaml, CCS_Enhancements, System.yaml, and System.pc2.yaml.

Accounts Keywords

The following keywords may appear within each accounts item in a list of PC2 accounts to be generated for a contest. The appearance of an accounts list in a contest.yaml file has the same effect as generating the specified accounts using the interactive Generate Accounts feature in the PC2 Admin.

Keyword Value Notes
account A string identifying the type of account(s) to be generated. Examples: TEAM, JUDGE, SCOREBOARD. Caution: if TEAM accounts are defined in the contest.yaml file these will override (replace) any correspondingly-numbered team accounts which are loaded from a teams.tsv file.
site An integer specifying the number of the site for which accounts are to be generated. PC2 accounts are site-specific; there exists for example a "team1" account at each site. Defaults to 1 if omitted.
start An integer giving the starting account number for count new accounts to be created. PC2 will generate "count" accounts of the specified type, with the new account numbers starting at the specified start value and increasing from there. Any existing accounts in the range (start:start+count-1) will be skipped (that is, existing accounts will not be overwritten or affected), with new accounts assigned higher numbers as necessary. Defaults to 1 if omitted.
count An integer specifying the number of accounts of the specified type to be generated. Example: 10. Defaults to 1 if omitted.

Example:

accounts:
 - account: TEAM
     site: 1
    start: 100
    count: 10
 
 - account: TEAM
     site: 2
    start: 200
    count: 10

- account: JUDGE
     site: 4
    count: 20

 - account: SCOREBOARD
     site: 4
    count: 1

Auto-Judging Keywords

The following keywords may appear within each auto-judging item in a list of PC2 accounts to be used for Auto-Judging. The assignment of Judge accounts in an auto-judging section in a contest.yaml file has the same effect as assigning Auto-Judges in the PC2 Admin.

Keyword Value Notes
account A string identifying the type of account to be selected for Auto-Judging; should always be JUDGE.
site An integer specifying the number of the site for which Auto-Judge accounts are to be enabled. PC2 accounts are site-specific; there can exist for example a "judge1" account at each site. Defaults to Site 1 if not specified.
number An integer specifying the number of the Judge account which is to perform Auto-Judging. Example: 2. The keyword all can be used to specify all judge accounts at the site.
letters A list of comma-separated letters identifying the problems which the specified judge account is to Auto-Judge Examples: A, B,D,F. The keyword all can be used to indicate that the specified judge account(s) are to Auto-Judge all problems.
enabled A string yes or no indicating whether the specified Judge account(s) are to be enabled Auto-Judging. Defaults to yes if not present.

Example:

auto-judging:
  - account: JUDGE
     site: 1
     number: 2
     letters: A
     enabled: yes

  - account: JUDGE
     number: 4,5,6
     letters: B,C,D

  - account: JUDGE
     site: 2
     number: all
     letters: B,C,D

  - account: JUDGE
     site: 1
     number: 1,3
     letters: F
     enabled: no

Languages Keywords

The following keywords may appear within each language item in a list of languages:

Keyword Value Notes
name A string giving the "display name" of the language (the name which will appear on Team and Judge GUIs).
compiler The name of the compiler to be invoked (that is, the command used to invoke the compiler). Example: for a language with name:GNU C the compiler value would probably be gcc. The compiler keyword is present to support CLICS compatibility; if present, PC² uses the concatenation of compiler and compiler-args to invoke the compiler. See also compilerCmd.
compiler-args A string containing the arguments to be passed to the compiler.
compilerCmd The command used to invoke the compiler, including any compiler arguments. If the CLICS compiler keyword is present, PC² uses that instead of compilerCmd.
execCmd The command used to execute the compiled program, including any arguments. If the CLICS compiler keyword is present, PC² uses the value of runner to execute the program instead of execCmd.
exemask The name (or more properly, the form of the name) of the executable file generated by the compiler. Examples: "a.out", "{:basename}.class"
judge-exec-cmd The (form of the) command line required to execute the compiled program on Judge machines. It is only necessary to specify this attribute if the form of the execution command is different on Judge machines than it is on Team machines. Example: '/usr/bin/wrapper_c {:timelimit}'
runner-args A string containing the arguments to be passed to the specified runner. Only used if the CLICS keyword compiler is present.
use-judge-cmd A boolean string, either "true" or "false", indicating whether the judge-exec-cmd should be used to run the program on Judge machines. If the value is false (or the attribute is not present), the value of execCmd is used to run the program.

Language example using CLICS format:

languages:
  - name: C++
    compiler: /usr/bin/g++  
    compiler-args: -O2 -Wall -o a.out -static {files} 

  - name: Java
    compiler: /usr/bin/javac
    compiler-args: -O {files}
    runner: /usr/bin/java
    runner-args: 

Language example using PC² format:

languages:
  - name: 'C++'
    active: true
    compilerCmd: 'g++ -g -O2 -static -std=gnu++11 {:mainfile}'
    exemask: 'a.out'
    execCmd: './a.out'

  - name: 'Java'
    active: true
    compilerCmd: 'javac -encoding UTF-8 -sourcepath . -d . {:mainfile}'
    exemask: '{:basename}.class'
    execCmd: 'java -Xss8m -Xmx1024m {:basename}'
    use-judge-cmd: true
    judge-exec-cmd: '/usr/bin/wrapper_java {:timelimit} {:basename}'

Limits Keywords

The following keywords may appear within each limits item in a list of limits settings.

Keyword Value Notes
memory ??. ??.
output ??. ??.
timeout ??. ??.

Example:

limits:
  timeout: 5
  memory: 1024    # 1MB 
  output: 10      # 10KB

Permissions Keywords

The following keywords may appear within each permissions item in a list of permissions settings for PC2 accounts. The assignment of permissions in a permissions section in a contest.yaml file has the same effect as assigning account permissions in the PC2 Admin "Edit Account" screen.

Keyword Value Notes
account A string identifying the type of account whose permissions are to be updated. Examples: TEAM, ADMINISTRATOR, JUDGE, FEEDER
number A list of comma-separated integers and/or integer ranges specifying the number(s) of the accounts whose permissions are to be updated. The string "all" is also recognized. Applies only to accounts on the site being loaded (PC2 accounts are site-specific; there can exist for example a "judge1" account at each site).
enable A comma-separated list of account permissions, chosen from the list of permissions given below, which are to be enabled for the specified account(s). Example: SHADOW_PROXY_TEAM, EDIT_RUN.
disable A comma-separated list of account permissions, chosen from the list of permissions given below, which are to be disabled for the specified account(s). Example: VIEW_SECURITY_ALERTS, DISPLAY_ON_SCOREBOARD.

Example:

permissions:
  - account: TEAM
     number: 69,72, 80-89
     disable: DISPLAY_ON_SCOREBOARD

  - account: FEEDER
     number: 2-4
     enable: SHADOW_PROXY_TEAM, EDIT_RUN

Permissions

The permissions which can be enabled/disabled are:

ADD_ACCOUNT, ADD_CATEGORY, ADD_GROUPS, ADD_JUDGEMENTS, ADD_LANGUAGE, ADD_NOTIFICATIONS, ADD_PROBLEM, ADD_SETTINGS, ADD_SITE, ALLOWED_TO_AUTO_JUDGE, ALLOWED_TO_FETCH_RUN, ALLOWED_TO_RECONNECT_SERVER, ANSWER_CLARIFICATION, BALLOON_EMAIL, BALLOON_OUTPUT_SHUTOFF, BALLOON_PRINT, CHANGE_PASSWORD, CLONE_PROFILE, DISPLAY_ON_SCOREBOARD, EDIT_ACCOUNT, EDIT_AJ_SETTINGS, EDIT_CATEGORY, EDIT_CLARIFICATION, EDIT_CONTEST_CLOCK, EDIT_EVENT_FEED, EDIT_GROUPS, EDIT_JUDGEMENTS, EDIT_LANGUAGE, EDIT_NOTIFICATIONS, EDIT_PERMISSIONS, EDIT_PLAYBACK, EDIT_PROBLEM, EDIT_RUN, EDIT_SITE, EXECUTE_RUN, EXPORT_PROFILE, EXTRACT_RUNS, FORCE_LOGOFF_CLIENT, FORCE_LOGOFF_SERVER, GENERATE_NEW_CLARIFICATION, GIVE_CLARIFICATION, GIVE_RUN, JUDGE_RUN, LOGIN, REJUDGE_RUN, RESET_CONTEST, RESPECT_EOC_SUPPRESSION, RESPECT_NOTIFY_TEAM_SETTING, SHADOW_PROXY_TEAM, SHUTDOWN_ALL_SERVERS, SHUTDOWN_SERVER, START_CONTEST_CLOCK, START_PLAYBACK, STOP_CONTEST_CLOCK, STOP_PLAYBACK, SUBMIT_CLARIFICATION, SUBMIT_RUN, SWITCH_PROFILE, TAKE_CLARIFICATION, TAKE_RUN, TEST_RUN, VIEW_ALL_JUDGEMENTS, VIEW_CLARIFICATIONS, VIEW_DELETED_RUNS, VIEW_EVENT_FEED, VIEW_PASSWORDS, VIEW_RUN_JUDGEMENT_HISTORIES, VIEW_RUNS, VIEW_SECURITY_ALERTS, VIEW_STANDINGS, VIEW_SUMMARY_ATTEMPTS_GRID.

The "Account Permissions Report" (available on the "Reports" tab in both the PC2 Server and the PC2 Admin) lists all of the current permissions for all accounts, showing both the permission name and a brief description of what that permission allows. The following is a sample (excerpt) from an Account Permissions Report:

** Account Permissions Report

Type: TEAM
  team1 (site 1) 
    1 LOGIN Login
    2 DISPLAY_ON_SCOREBOARD Shown on scoreboard displays
    3 TEST_RUN Test run
    4 VIEW_CLARIFICATIONS View Clarifications
    5 VIEW_RUNS View Runs
    6 SUBMIT_CLARIFICATION Submit a clarification
    7 SUBMIT_RUN Submit a run

Problemset Keywords

The following keywords may appear within each problemset item in a list of problems. The short-name keyword is required; all others are optional.

Keyword Value Notes
letter A one- or two-character string giving the "letter" associated with the problem. Problem letters for the first 26 problems should be A, B, C, ... Z; problems following Z should be assigned two-character sequences AA, AB, AC, etc.
short-name The name of the folder containing the problem details, including the problem.yaml file, for the problem. Examples: apl, blitz.
title A string giving the problem title used whenever the problem name is displayed. Examples: APL is the Best!; BlitzKrieg Computations. If the problem.yaml file for this problem contains a CLICS-compatible problem.tex or problem.en.tex file then the title specified therein overrides this entry. If not, and if this entry is omitted, short-name is used instead.
color A string giving the human-interpretable name of the "color" associated with the problem (for example, the balloon color for the problem). Examples: Red, Green, Light Blue, Mauve, Dark Green.
rgb A YAML-formatted hexadecimal RGB value for the problem color; should be consistent with the name given in the color keyword. Examples: '#000000' (Black); '#FF0000' (Red); '#3a9956' (Dark Green). Note the leading # (indicating a hex value) and the surrounding single-quote marks ('...'); both are required.
timeout The runtime limit for the problem, in whole seconds. If the problem.yaml file for the problem also contains a timeout value then that value is used instead of the one specified in the problemset list. If NEITHER location specifies a timeout value then any global time limit set in the contest.yaml file is used; or if none is given there then a system-defined default is used.
max-output-size-K The maximum output allowed for submissions on this problem, in KB. If the problem.yaml file for the problem also contains a max-output-size-K value then that value is used instead of the one specified in the problemset list. If NEITHER location specifies a max-output-size-K value then any global output limit set in the contest.yaml file is used; or if none is given there then a system-defined default is used.

Problemset example:

problemset:
  - letter:     A
    short-name: hello
    color:      Black
    rgb:        '#000000'

  - letter:     B
    short-name: sumit
    color:      White
    rgb:        '#FFFFFF'

  - letter:     C
    short-name: qanat
    color:      Cherry Red
    rgb:        '#df1328'

  - letter:     D
    short-name: microbus
    color:      Dark blue
    rgb:        '#0967db'

Shadow support Keywords

# Example to set FEEDER1 as team proxy (for use when using Shadow feature)
# set feeder1 as proxy
team-proxy-accounts:
  - account: FEEDER
    number: 1
# Shadow settings 
shadow-mode: true

ccs-url: https://open.kattis.com/clics-api/contests/nac22practice4/
ccs-login: INSERT_REMOTE_CCS_ACCOUNT_HERE
ccs-password: INSERT_PASSWORD_HERE
ccs-last-event-id:

# required to allow override of run id and elapsed time
ccs-test-mode: true

Sites Keywords

The following keywords may appear within each sites item in a list of sites in a multi-site contest:

Keyword Value Notes
number An integer giving the number of the site. Example: 2
name A string giving the name of the site. Examples: Site 2; Hawaii Site
IP A set of four octets giving the IP address of the PC2 server at the site. Example: 198.51.100.0
port An integer giving the port number for the PC2 server at the site. Example: 50002
password A string giving the password for connecting to the site. Optional if the site doesn't restrict conections.

Example:

sites:
 - number: 1
     name: Site 1
       IP: 203.0.113.0
     port: 50002
 password: siteone

 - number: 2
     name: Hawaii
       IP: 198.51.100.0
     port: 50002

Validators Keywords

The following keywords may appear within each validator item in a list of validator settings:

Keyword Value Notes
validatorProg The name of a custom validator program to be invoked during the validation stage of a test case run. Can be program basename, a relative path to the program, or an absolute path to the program.
validatorCmd The form of the command used to invoke a custom validator program, including arguments to be passed to the program. Substitution variables are allowed. Example substitution variables: {:validator}, {:infilename}, {:ansfilename}, and {:feedbackdir}.
usingInternal A boolean string ("true" or "false") indicating whether the validator should expect that data files are internal to PC2 or stored externally in the file system. Example: usingInternal: false
validatorOption The PC2 validator option to be selected. Example: validatorOption:1. Only useful when the selected validator is the PC2 "internal" validator (see below).
validator_flags The CLICS validator option flags to be selected. Options are case_sensitive (defaults to non-case-sensitive when absent); space_change_sensitive (defaults to non-space-change-sensitive, i.e. ignore whitespace, when absent); float_absolute_tolerance <value>, and float_relative_tolerance <value>. Only useful when the selected validator is the PC2 "CLICS" validator (see below).
use-internal-validator A boolean string ("true" or "false") indicating whether the PC2 internal validator should be used. Mutually exclusive with the next two keywords.
use-clics-validator A boolean string ("true" or "false") indicating whether the CLICS (ICPC standard default) validator should be used. Mutually exclusive with the preceding and following keywords.
use-custom-validator A boolean string ("true" or "false") indicating whether a custom validator should be used. Mutually exclusive with the two preceding keywords.
use-clics-custom-validator-interface A boolean string ("true" or "false") indicating whether the CLICS validator interface should be used by a custom validator. Setting true (which is the default if this keyword is not specified) indicates the validator will conform to the CLICS interface; setting false indicates the validator should use the legacy PC2 validator interface.

Examples:

# select the CLICS validator with the default options
validator:
   use-clics-validator: true
# select the CLICS validator, with the specified options
validator:
   use-clics-validator: true
   validatorCmd: '{:validator} {:infilename} {:ansfilename} {:feedbackdir}'
   validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 4.0011122 float_relative_tolerance 4.0042354
# select the PC2 "internal validator", specifying option 4: ignore white space on lines
validator:
   use-internal-validator: true
   validatorOption: 4
# for problem 'sumit' this will attempt to load the validator file at sumit/output_validators/customValidatorProgram003
validator: 
    validatorProg: 'customValidatorProgram003'
# for problem 'sumit' this will attempt to load the validator file at sumit/output_validators/try3/customValidatorProgram003
validator: 
    validatorProg: 'sumit/output_validators/try3/customValidatorProgram003'
# for problem 'sumit' this will attempt to load the validator file at /home/ubuntu/current/sumit/output_validators/try3/customValidatorProgram003
validator: 
    validatorProg: '/home/ubuntu/current/sumit/output_validators/try3/customValidatorProgram003'
# for problem 'bells' this will attempt to load a CLCIS-compatible custom validator program named 'validator' from the 'output_validators/bells_validator' folder
validator:
    validatorProg: 'config/bells/output_validators/bells_validator/validator'
    validatorCmd: '{:validator} {:infilename} {:ansfilename} {:feedbackdir} '
    usingInternal: false
    use-internal-validator: false
    use-clics-validator: false
    use-custom-validator: true
    use-clics-custom-validator-interface: true
⚠️ **GitHub.com Fallback** ⚠️