-
Notifications
You must be signed in to change notification settings - Fork 24
Sample Contests
Every PC2v9 distribution contains a number of built-in sample contests that can be loaded. This makes it easy to try out the system without having to configure your own contest.
Each sample contest is stored in a subfolder beneath the samps/contests folder, in a set of files organized in a CDP format.
The following sample contests are defined in every PC2v9 distribution.
Location | Description |
---|---|
ccs1 | CLICS Sample One |
ccs2 | CLICS Sample Two |
mini | Mini Contest PC2 Style |
sumithello | sumit and hello-world problems |
sumitMTC | sumit with Multiple Test Case data |
Any sample contest can be loaded when a PC2v9 Server is first started. This is accomplished
by adding the option --load
to the Server startup command, followed by an indicator of which
sample contest should be loaded. (Note that the command line --load
option is only supported when
starting a PC2v9 Server -- although there are also ways to load sample contests via the PC2v9 Admin;
see below).
The --load
option will only load a contest configuration
when the server is first started. Once a configuration has been loaded into the Server,
any subsequent startup of the Server will ignore a --load
option. This allows you to use
the --load
option in a script or via the -F option
and --load
will not overwrite existing configuration information.
(If you want to reload a contest configuration and reset/overwrite the previously-loaded config
values, use the Admin "Load" feature.)
The --load
option accepts one of three argument forms to specify the location of the contest configuration
to be loaded:
--load DIR
--load SAMPLE_NAME
--load CONTEST_YAML_FILE
The meanings of the trailing argument forms are as follows.
Location | Description |
---|---|
DIR | path to the CDP directory which contains config/contest.yaml |
SAMPLE_NAME | directory name for sample contest, ex. sumithello |
CONTEST_YAML_FILE | the location of the contest.yaml file in a CDP |
Certain PC2v9 GUI displays contain a special tab titled Sample Contests. Selecting the Sample Contests
tab displays a grid containing each of the available sample contests (as listed in the table above).
Selecting a sample contest from the grid and then clicking the Load
button displays a summary of the
characteristics of the selected contest, and then allows loading the contest configuration (overriding any previously-loaded
contest settings).
Note: the Sample Contests display is under development, and therefore may not appear on any publicly-released GUIs.