Skip to content

2. Build Dorylus

JOHN THORPE edited this page Apr 2, 2021 · 1 revision

Chapter 2. Build Dorylus

Previous page: 1. Manage EC2 Clusters | Next page: 3. Prepare Input Dataset | Home: Home

Before building the system, make sure you have correctly setup the ec2man module (see 1. Manage EC2 Clusters).

Weight servers and data servers should have password-less SSH connection enabled among them respectively.

Put Source Code onto Machines

Put the source code repo dorylus/ onto all your remote machines with one command:

Local$ ./gnnman/send-source [--force]       # '--force' deletes the existing '~/dorylus' folder on remote machines first.

This utility uses rsync, so it will only send updated stuff instead of the whole repo. Remember to do a source code update whenever some part of the source code has been changed.

Install Dependencies

From your local shell, you can install the required dependencies with one command (Experimental). You might be prompted to enter the sudo password on remote machines:

Local$ ./gnnman/install-dep

Since the remote machines' configurations might be different, our scripts cannot handle all the situations. If the above utility throws some errors on certain machines, you can manually log in those machines and install the required dependencies. For the required dependencies, refer to these individual remote install scripts:

  • gnnman/helpers/graphserver.install
  • gnnman/helpers/weightserver.install

For graphservers and weightservers, you may also first setup one node only, and then clone that environment to create more nodes.

Setup Parameter Files

Dorylus needs several parameter files to run (for example the graph server needs the IP address of the weight servers, in wserverip)

First, setup the following parameter files in your local repo:

  • run/wserverport: Weight server open port, e.g., 55432
  • run/gserverport: Graph (data) server open port, e.g., 55431
  • run/dataport: Grpah server open port for internal data communications, e.g., 5000
  • run/ctrlport: Graph server open port for internal controlled communications, e.g., 7000
  • run/nodeport: Graph server open port for internal node managing communications, e.g., 6000
  • run/layerconfig: This one is related to your graph convolutional network dataset. Explained in 5. Run Dorylus.

Then, send them to remote machines' home directory by:

Local$ ./gnnman/setup-cluster

Build the System & Sync Executable

Build the system (only on master node in each context), and synchronize the executable to all other machines with one command:

Local$ ./gnnman/build-system [Context] [d]      # If you only wanna build one of the contexts instead of both

Options: [Context] can be 'graph' or 'weight'.
Options: [d] builds servers in debug mode

If you encounter unexpected errors doing the above command, you can also build the system manually on remote machines.

On graph server master node [0]:

# Building...
Graph$ cd dorylus/
Graph$ mkdir build && cd build
Graph$ cmake .. -DBUILD_GRAPH=yes [-DCMAKE_BUILD_TYPE=Debug] [-DBUILD_GPU=yes]        # If you want 'debug' mode or build GPU module.
Graph$ make
Graph$ mv graph-server/graphserver .

# Syncing...
Graph$ cd dorylus/
Graph$ ./gnnman/helpers/send-folder build #there are multiple .so files to send

# Shortcut
Graph$ ./gnnman/helpers/graphserver.bld
or 
Graph$ ./gnnman/helpers/graphserver.bld gpu # If building GPU based system
Graph$ ./gnnman/helpers/graphserver.bld cpu # If building CPU based system

On weight server master node [0]:

# Building...
Weight$ cd dorylus/
Weight$ mkdir build && cd build
Weight$ cmake .. -DBUILD_WEIGHT=yes [-DCMAKE_BUILD_TYPE=Debug]      # If you want 'debug' mode.
Weight$ make
Weight$ mv weight-server/weightserver .

# Syncing...
Weight$ cd dorylus/
Weight$ ./gnnman/helpers/send-file build/weightserver

# Shortcut
Weight$ ./gnnman/helpers/weightserver.bld

Previous page: 1. Manage EC2 Clusters | Next page: 3. Prepare Input Dataset | Home: Home