Compilation Details
Processing Server Specifications
Setup Local Environment Similar to Tester Machine
Download/Access Submissions
Example Test Case Scores, Run Time, Standard Output and Standard Error
Submission Queue
Notification Emails
Multithreading
Your code will be built and executed with the fixed set of commands as mentioned below:
C++
1
2
g++ - std = gnu++11 - O3 / workdir / <FileName>.cpp -o /workdir/<FileName>.cpp
/workdir/<FileName>
JAVA
1 2 3 4 5 6 7
javac / workdir / <FileName>.java java -Xms1G -Xmx1G -cp /workdir <FileName> __C#__ ```c# csc /workdir/ContestOrganizer.cs /out:/workdir/<FileName>.exe mono /workdir/<FileName>.exe
Python3.6
1
python3 .6 / workdir / <FileName>.py
The solutions are executed at Amazon EC2 c3.large inside a Docker Container with the following configuration:
OS: http://releases.ubuntu.com/18.04/
Download the Docker Base Image here.
1 2 3 4 5 6 7 8 9
Using built - in specs. COLLECT_GCC = gcc COLLECT_LTO_WRAPPER = /usr/lib / gcc / x86_64 - linux - gnu / 7 / lto - wrapper OFFLOAD_TARGET_NAMES = nvptx - none OFFLOAD_TARGET_DEFAULT = 1 Target: x86_64 - linux - gnu Configured with: .. / src / configure - v--with - pkgversion = 'Ubuntu 7.4.0-1ubuntu1~18.04'--with - bugurl = file: ///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.4 .0(Ubuntu 7.4 .0 - 1 ubuntu1~18.04)
1 2 3 4 5 6 7 8 9 10 11 12 13
Mono JIT compiler version 5.20 .1 .19(tarball Thu Apr 11 09: 02: 17 UTC 2019) Copyright(C) 2002 - 2014 Novell, Inc, Xamarin Inc and Contributors.www.mono - project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug Interpreter: yes LLVM: yes(600) Suspend: hybrid GC: sgen(concurrent by default)
1 2 3
openjdk version "1.8.0_212" OpenJDK Runtime Environment(build 1.8 .0_212 - 8 u212 - b03 - 0 ubuntu1 .18 .04 .1 - b03) OpenJDK 64 - Bit Server VM(build 25.212 - b03, mixed mode)
1
Python3 .6 .8 - https: //docs.python.org/3.6/whatsnew/changelog.html#python-3-6-8-final
You would require prior knowledge of docker to setup an environment similar to Topcoder ‘s production environment on which your code is executed.
Install Docker:
Windows User: https://docs.docker.com/docker-for-windows/
Mac Users: https://docs.docker.com/docker-for-mac/
Linux Users: https://www.tutorialspoint.com/docker/installing_docker_on_linux.htm
Create a Project Directory
In your project directory, create a file named Dockerfile and paste the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu: 18.04
# Install General Requirements
RUN apt - get update && \
apt - get install - y--no - install - recommends\
apt - utils\
build - essential\
software - properties - common
# Install Mono
RUN apt - get install gnupg ca - certificates - y\ &&
apt - key adv--keyserver hkp: //keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
&&
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | tee / etc / apt / sources.list.d / mono - official - stable.list\ &&
apt update\ &&
apt install mono - devel - y
# Install gcc
RUN apt - get - y install gcc
RUN apt - get update && \
apt - get install - y openjdk - 8 - jdk && \
apt - get clean && \
rm - rf /
var / lib / apt / lists
/* && \
rm -rf /var/cache/oracle-jdk8-installer;
# Fix certificate issues, found as of
# https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/983302
RUN apt-get update && \
apt-get install -y ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer;
# Setup JAVA_HOME, this is useful for docker commandline
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv maven
# update pip
RUN python3.6 -m pip install pip --upgrade
In the same folder where you have your docker file, create a folder structure ./tester/target/
Inside target add the local tester jar provided to you and the submission source code you want to test
Execute the following command:
In the below command you can give your own <docker_image_name>
1 2 3 4 5
$ docker build - t < docker_image_name > -f Dockerfile. $ docker run - it - v tester: /tester <docker_image_name> /bin / bash cd / tester / target / java - jar Tester.jar - exec "<command>" - seed < seed >
Here, <command>
is the command to execute your program, and <seed>
is seed for test case generation. If your compiled solution is an executable file, the command will be the full path to it, for example, “C:\TopCoder\solution.exe” or “~/topcoder/solution”. In case your compiled solution is to be run with the help of an interpreter, for example, if you program in Java, the command will be something like “java -cp C:\TopCoder Solution”.
Finally, you can print any debug information of your solution to standard error, and it will be forwarded to the standard out of the tester.
When you execute this, you will see an exception because some of the modules will not be able to do their job as they do on the system. But your individual scores will be added to output.txt in the workdir
.
Navigate to https://submission-review.topcoder.com/
Select the Match
In the new submission review portal you can click on the challenge for which want to look at your previous submissions
Click on the submission to see the submission details. You will see the following screen
You can click on the download icon button next to the submission to download your submission
After the match is over, you can access others submissions. In the submission-review app you will be able to see others scores and submissions.
In the old platform, members had an option to submit only for example test cases to get quick feedback on their submission rather than waiting for the submission to run on all the provisional test cases.
To achieve a similar experience in the new platform: Now whenever you make a submission your submission will first run only on example test cases on a machine that is only dedicated for the same. Thus avoiding a long delay because of the queue which was earlier created when multiple submissions are submitted and members had to wait for a long time for their submissions to run on all the provisional test cases before seeing the example test case output.
Later your submission will be added to the queue on a machine dedicated for running submissions
on provisional test cases.
You will receive an email with the text:
1
2
3
The following review(s) were performed:
Marathon Match Review - Example
The score applied to your submission is 1.
Here score of 1.0 indicates a successful run of submission on example test cases. The match
leaderboard will also show your score as 1.0 for the time your score on the provisional test cases is returned. As shown here.
In the submission review app you will see the example test case run output as soon as the testing on example test cases is complete. You see your scores, runtime and stdout/stderr in the output.txt as soon as the run on example test cases is complete.As shown here
Unzip the downloaded artifacts file and you will find a file named output.txt
In the old platform members could see a queue to get an idea around the time it will take to have their scores updated.
To achieve a similar experience in the new platform: Now as mentioned in the update above
your submission will first run on a separate machine getting the example test case output to you
asap. Here the leaderboard will show you score as 1.0.
On main leaderboard score = 1 will mean, submission is in queue, which also means the example test case has been executed and we now have the provisional test cases running. Thus, If on ain leaderboard if you can see 5 members with score = 1, it means 5 submissions are in
queue. After the completion of the test execution of provisional phase, score = 1 will replaced
by the actual score As shown here
Currently the system can only support scores between 1-100. However we are
working on making this score (1.0) returned on example test cases to something else like -999 or another number which is not achievable to avoid any confusion. As 1.0 is not the best option because a member can actually achieve this score making it confusing for others that his submission is in queue.
You will receive three emails
Virus Scan - Review Score
A score of 100 means your submission has no viruses or any files with potential threat and is now being forwarded to run on Example Test Cases.
Example Test Case Scoring
A score of 1.0 means your submission has been executed on the example test cases and now has moved to the queue for running on provisional test cases.
Provisional Test Case Scoring
Once your submission has run on all the provisional test cases, you will receive an email with the relative score you have received.
The docker container is restricted to use 1 core for each submission, thus multithreading might not help much.