The new cmsMake!
You have to have some dependencies installed in order to use task-maker.
This is a python3 project, you need to have Python>=3.5 as default python
environment (running python --version), the easiest way to achieve this is
via virtualenv.
There are some python dependencies that can be installed either from PyPI or from the system package manager:
grpcio==1.9pytest==3.2.3PyYAML==3.12typing==3.6.4
Note that there is a requirements.txt file to install all the dependencies
with pip install -r requirements.txt.
On Archlinux the system package versions are new enough but not on Ubuntu 16.04.
After installing task-maker, run task-maker in the task folder to compile
and run everything. Specifying no option all the caches are active, the next
executions will be very fast, actually doing only what's needed.
If you really want to repeat the execution of something provide the --cache
option:
task-maker --cache=nothingPossible values of --cache are: all, generation (do not regenerate
inputs/outputs if not needed), nothing (disable all the cache).
Sometimes you only want to test only some solutions, speeding up the compilation and cleaning a bit the output:
task-maker sol1.cpp sol2.pyNote that you may or may not specify the folder of the solution (sol/ or solution/). You can specify only the prefix of the name of the solutions you want to check.
If you want to be extra sure about the timings you can disable multithreading, setting the number of core to 1:
task-maker --num-cores=1By default the task in the current directory is executed, if you want to change
the task without cd-ing away:
task-maker --task-dir ~/tasks/poldoAll the compiled files are kept in an internal folder but if you want to
use them, for example to debug a solution, passing --copy-exe all the
useful files are copied to the bin/ folder inside the task directory.
task-maker --copy-exeIf you want to clean everything, for example after the contest, simply run:
task-maker --cleanOne of the best feature of task-maker is the ability to execute a task remotely. The setup is really simple, you need to start some programs: a server and a group of workers. The server will accept connection from workers and clients, a worker is the program that executes a command, a client is you!
First start a server:
task-maker --run-server --logtostderrThen start a worker in each machine, specifying the server to connect to:
task-maker --run-worker --server server_ip:7070 --logtostderrTo run the execution remotely just pass:
task-maker --evaluate-on server_ip:7070Note that the TCP port 7070 is used, the connection has to be available, stable and reliable. A local network is suggested but it should work also via the Internet.
If something went wrong and you want to kill task-maker you have also to kill the manager, a daemon spawned by task-maker. You may find the pid of the process looking in /tmp/task-maker-manager-*.pid
If you want to compile tak-maker yourself you need the following dependencies:
g++ make cmake
You also need a compiler capable of compiling C++14.
To start the compilation simply run:
mkdir -p build
cd build
cmake ..
make
This will pull all the dependencies and compile everything. If you want to
speedup the compilation you may want to add -j X (with X the number of cores)
to make.
If you want to enable the optimization remember to put
-DCMAKE_BUILD_TYPE=Release to the cmake command.
If you are using Arch Linux you may want to install task-maker from the AUR: task-maker or task-maker-git.
We support build without Hunter (ie using system packages) only on Arch Linux, there are some dependencies to be installed:
community/gmockcommunity/gtestextra/protobufaur/cli11aur/grpcaur/nlohmann-jsonaur/plog
To compile the project issue:
mkdir -p build
cd build
cmake .. -DHUNTER_ENABLED=OFF
make