End User FAQ


Features

Can my program operate on files and directories?

YES - the Sphere Engine service allows you to perform disk operations within an isolated workspace dedicated for a single submission. read more

Which data streams and for what purpose are used when processing the submission?

During execution, the program has access to standard data streams.

stdin
A standard input stream used to transmit input data to the program. For Sphere Engine Compilers, the content of the stream can be specified by the user. In the case of Sphere Engine Problems, the stream content comes from the test case data.

For example, in C++, input data can be retrieved using the cin object which is a part of the iostream library.

Important: The stdin stream and command-line arguments are two different methods of passing data to the program. Input data will be passed to the stdin stream, not as the command-line arguments.

stdout A standard output stream used to print data when the program is being executed.

For example, in C++, input data can be retrieved using the cout object which is a part of the iostream library.

stderr
Standard runtime errors stream. By default, it contains all information about errors that occurred when the program was executed. The users have the option of using the stderr stream to print their own error messages.

For example, in C++, input data can be retrieved using the cerr object which is a part of the iostream library.

cmpinfo
It contains information about errors and warnings which appeared during the compilation of the program.

Note: The program compilation information is included in this stream only for compiled languages ​​(e.g. C, C++, Java, Python). For interpreted languages ​​(e.g. PHP, Perl) data about the parsing process and interpreting the source code (e.g. information about syntax errors) can be found in the stderr stream.

What happens after I send my submission?

After sending the submission it goes to the so-called queue of submissions waiting to be executed by the checker server (i.e. the server responsible for executing the programs).

Then the checker server processes the submission by going through the following steps:

  • for compiled languages ​​(e.g. C++) the program is compiled,
  • the program is executed (in the case of the Problems module many times - independently for each test case)
  • (only the Problems module) the results of execution after each test case are verified by the so-called test case judge,
  • (only the Problems module) the results of executing all test cases are summarized by the so-called master judge

After processing the submission, the Sphere Engine system provides the results of the execution (including execution time, memory usage, data streams).

Note: The status of the submission is being updated live during execution.

Can my program connect to the Internet?

By default, the executed program does not have Internet access. However, it can be enabled for commercial customers.

Where can I find sample source code files available for programming languages ​​supported by the Sphere Engine system?

Sample source code files are available in the languages folder in the public GitHub repository maintained by Sphere Engine team.

Limitations

What is the size limit of the source code?

The maximum size of uploaded source files as part of a single submission is:

  • 256kB for the Sphere Engine Compilers module,
  • 2MB for the Sphere Engine Problems module.

Additionally, in the case of integration through Sphere Engine Problems Widget or Sphere Engine for Education, the restriction can be modified (more precisely: reduced) by the author of the problem.

What is the size limit of input data in Sphere Engine Compilers?

The maximum size of the input data file in the Sphere Engine Compilers service is 64kB.

What is the size limit of the data streams generated when executing the submission?

Data generated when a submission is being executed (e.g. the "stdout", "stderr" streams) is shortened to the maximum size if the limit is exceeded.

For the Sphere Engine Compilers module, the maximum stream size is 10MB.

For the Sphere Engine Problems module, the maximum stream size is 10MB.

What is the program execution time limit?

In the case of the Sphere Engine Compilers module, the limitation for the program execution time depends on the configuration and can range from 1 to 60 seconds.

In the Sphere Engine Problems module, the program execution time limit results from the test case parameters and can also range from 1 to 60 seconds.

Note: The limit value for execution time applies only to running the program. Each time the submission is executed, a number of routine operations are also performed (e.g. program compilation and preparation of the runtime environment), which affect the total time required to run the submission, but are not taken into account in the program's execution time limit.

What is the operational memory (RAM) limit for running the program?

The program launched in the Sphere Engine service has access to 1.5GB of random-access memory (RAM). If the limit is exceeded, the execution of the program is interrupted.

In addition - in the case of integration through the API - the Sphere Engine Compilers module offers the ability to set the memory limit.

The results of executing submissions

Why doesn't a submission sent to the Sphere Engine Problems receive the maximum number of points?

There are many reasons why a seemingly correct solution may not get the maximum result. First, it is worth verifying the following aspects of the solution:

  • the correctness of handling edge cases,
  • program's performance for large input data,
  • the correctness of the program for atypical input data,
  • the correctness of the program for input data realizing maximum ranges for variables occurring in input data.

Why does the submission not execute correctly?

There are many reasons why a program sent to Sphere Engine does not run correctly. After executing the submission, information that can help identify the right reason is available:

  • the status of the submission (e.g. "compilation error", "run-time error", "wrong answer"),
  • the content of data streams (e.g. compilation errors and run-time errors).

Why do I receive a compilation error indicating a lack of function/module/class/procedure?

Some of the languages ​​supported by Sphere Engine require specific naming or structure. For example, a Java application should contain a public class named Main (or a private class named anything you like).

Familiarizing yourself with sample source code files for the selected programming language (available in the GitHub repository) may be useful in identifying the reason for the error.

Why does the processing of a submission finish with the "Compilation Error" (CE) status?

Data regarding compilation errors can be found in the stream containing the compilation errors.

Why does the processing of a submission finish with the "Time Limit Exceeded" (TLE) status?

If the program has been running for too long (i.e. longer than the execution time limit), its execution was interrupted by the system. In this situation, the submission (or a single test case in the case of the Problems module) receives the TLE status.

Examples of reasons why a program might be executing for a long time:

  • the occurrence of infinite loops,
  • high computational complexity of the algorithm used in the program,
  • a large amount of data processed by the program.

Why does the processing of a submission finish with the "Wrong Answer" (WA) status?

The most common reason is an error in solving the problem. First of all, it is worth checking the correctness of handling edge cases and tricky, rare or specific data. Next, it is recommended to read the description of the problem again.

Why does the processing of a submission finish with the "Runtime Error" (RE) status?

There are many reasons why the processing of a submission may be interrupted with an error. The following merit special mention:

  • arithmetic errors (e.g. dividing by zero),
  • unauthorized memory access,
  • allocation of too many resources.

More information on runtime errors can be found, for example, on Wikipedia