-
Notifications
You must be signed in to change notification settings - Fork 1
P2Rank setup
What are you going to learn:
- what you need in order to run p2rank
- where to download p2rank
- where to download datasets used to train and evaluate p2rank models
- how to install p2rank
- how to set memory and CPU limits
In order to run p2rank, you need Java version 8 or newer.
p2rank is distributed as a standalone application that does not require installation. In order to prepare p2rank and datasets just follow the steps below.
- create a new directory
- download and unpack the p2rank release into the directory (this wiki uses 2.1 if not stated otherwise)
- rename the p2rank release directory to
p2rank
- download datasets into the directory
- wename datasets folder to
datasets
- make sure you can run p2rank by using the following command in the directory:
.\p2rank\prank --version
If you got information about the p2rank version, congratulation you can run p2rank.
Some p2rank commands can take a longer time to execute and may require a substantial amount of operational memory (RAM) and lead to high CPU utilization.
In order to change the amount of memory that p2rank can edit .\p2rank\prank.bat
(Windows) or .\p2rank\prank
(Linux).
Change $JAVA_OPTS -Xmx2048m
to
-
$JAVA_OPTS -Xmx4G
or to -
$JAVA_OPTS -Xmx6G
if you have at least 8G of memory or to -
$JAVA_OPTS -Xmx8G
if you have more then 8G of memory available
You can also provide p2rank with more memory, but 8G is sufficient to run basic p2rank commands from this wiki.
By default, p2rank tries to employ all available CPU cores.
While this leads to the shortest execution times it makes the computer unavailable for other tasks.
For this reason, it may be a good idea to limit the number of threads (CPU cores) p2rank should use.
This can be done by using -threads
command-line argument followed up with the number of threads.
For the purpose of this tutorial, we will be using 4 threads i.e. -threads 4
, but feel free to
use more/less.