Skip to content

tutorial installation

Neil McGlohon edited this page Jun 13, 2022 · 4 revisions

Tutorial: CODES Installation

Dependencies

  1. gcc/g++ (7.3 tested)
  2. Autoconf --version >=2.67
  3. Automake --version >= 1.16
  4. libtool (2.4.6 tested)
  5. Bison (3.4 tested)
  6. Flex (2.5.35 tested)
  7. pkg-config (0.29.2 tested)
  8. MPI (Currently preferring OpenMPI 4.0)
  9. Cmake --version >= 3.5
  10. ROSS (latest master release*)

gcc/g++

ROSS is a C project, CODES is a C/C++ project. As such it is necessary to have the ability to compile C/C++ code in your development environment - preferably with gcc/g++. This is available on most package managers.

sudo apt-get install gcc g++

Autotools: Autoconf/Automake

CODES is currently built with the GNU autotools build system. It generates the makefile necessary to install CODES.

sudo apt-get install autoconf automake

libtool

Libtool is used by autotools as an interface to simplify library installation.

sudo apt-get install libtool

Bison/Flex

Bison and Flex are both required by codes as they provide certain file parsing and meta-programming-like abilities.

sudo apt-get install bison flex

pkg-config

CODES uses pkg-config to understand the ROSS library libROSS.a and linking information for it.

MPI

CODES and ROSS need MPI in order to run in parallel. Easy parallelization is a core feature of ROSS and CODES and so in order to use them to the fullest extent: MPI is required. We recommend the OpenMPI implementation currently.

There is a somewhat outdated instruction on how to install via apt-get as well as instructions for manual installation of the binaries via a .rpm file at: http://lsi.ugr.es/jmantas/pdp/ayuda/datos/instalaciones/Install_OpenMPI_en.pdf

CMake

ROSS, unlike CODES, is a CMake built project. It generates the makefile needed to install ROSS.

sudo apt-get install cmake-curses-gui

ROSS

*CODES master branch is designed to always be up to date with the latest master branch of ROSS - but this isn't a perfect system and CODES/ROSS release pairs are recommended unless you need the latest CODES version. Each CODES release will have a specific recommended ROSS version that is tested to work in the description of said release.

Installing ROSS

Detailed installation can be found here: https://ross-org.github.io/setup/installation.html

We recommend that you have some parent directory structure of some kind that holds all of the source and installation directories for things like ROSS and CODES. Let's assume that that directory is: ~/codes-dev.

A quick and dirty out-of-tree ROSS installation is found below:

    cd ~/codes-dev
    git clone http://github.com/ross-org/ROSS.git
    mkdir build-ross
    cd build-ross

    cmake -DCMAKE_INSTALL_PREFIX:path=`pwd` -DCMAKE_C_COMPILER=$(which mpicc) -DCMAKE_CXX_COMPILER=$(which mpicxx) ../ROSS

    make install

This will install ROSS into ~/codes-dev/build-ross/ and its CODES-required libraries in ~/codes-dev/build-ross/lib/.

If you already have a version of ROSS installed it is important that you execute git pull from the master branch and rebuild from that (or from the specific Git SHA from the CODES release you are using via git checkout <SHA>)

Installing CODES

Again, we recommend that you have some parent directory structure as mentioned in the previous section on installing ROSS. We'll assume that that folder exists on your machine and its path is: ~/codes-dev.

A standard installation of CODES, assuming that you have all of the dependencies installed, is pretty simple. We need the CODES repository, a build folder to install it and the location of the ROSS pkg-config directory which has information about the ROSS library necessary for running CODES. If you followed the above installation of ROSS then this directory is located at ~/codes-dev/build-ross/lib/pkgconfig. The build system that CODES uses requires absolute paths so ~ will have to be expanded to the absolute path to your home directory in this example.

Some guides for codes may expect an in-tree installation of CODES so if you're a complete beginner, that's generally recommended:

    cd ~/codes-dev
    git clone http://github.com/codes-org/codes.git
    cd codes
    ./prepare.sh
    mkdir build
    cd build
    ../configure --prefix=<PATH-TO-HOME>/codes-dev/codes/build PKG_CONFIG_PATH=<PATH-TO-HOME>/codes-dev/build-ross/lib/pkgconfig CC=mpicc CXX=mpicxx CFLAGS=-g CXXFLAGS=-g

If you know what you're doing, here's a quick and dirty out-of-tree installation of CODES:

    cd ~/codes-dev
    git clone http://github.com/codes-org/codes.git
    cd codes
    ./prepare.sh
    cd ~/codes-dev
    mkdir build-codes
    cd build-codes
    
    ../codes/configure --prefix=<PATH-TO-HOME>/codes-dev/build-codes PKG_CONFIG_PATH=<PATH-TO-HOME>/codes-dev/build-ross/lib/pkgconfig CC=mpicc CXX=mpicxx CFLAGS=-g CXXFLAGS=-g

    make install

Test Installation

It's probably a good idea at this point to make sure that the installation has been successful. An easy way to do that is to, in your CODES build directory, call make check. This will build the test suite for CODES and run a series of tests over various features and network models. Optimally, none of these tests should fail. We try to ensure that the master branch does not have any problems that would cause a test to fail but sometimes systems change and a test or two might fail.

Example final testing output:

PASS: tests/lp-io-test.sh
PASS: tests/workload/codes-workload-test.sh
PASS: tests/mapping_test.sh
PASS: tests/lsm-test.sh
PASS: tests/rc-stack-test
PASS: tests/resource-test.sh
PASS: tests/jobmap-test.sh
PASS: tests/map-ctx-test.sh
PASS: tests/modelnet-test.sh
PASS: tests/modelnet-test-torus.sh
PASS: tests/modelnet-test-loggp.sh
PASS: tests/modelnet-test-dragonfly.sh
PASS: tests/modelnet-test-em.sh
PASS: tests/modelnet-test-slimfly.sh
PASS: tests/modelnet-test-dragonfly-synthetic.sh
PASS: tests/modelnet-test-dragonfly-custom-synthetic.sh
PASS: tests/modelnet-test-dragonfly-plus-synthetic.sh
PASS: tests/modelnet-test-dragonfly-dally-synthetic.sh
PASS: tests/modelnet-test-fattree-synthetic.sh
PASS: tests/modelnet-test-slimfly-synthetic.sh
PASS: tests/modelnet-p2p-bw-loggp.sh
PASS: tests/modelnet-prio-sched-test.sh
============================================================================
Testsuite summary for codes 1.1.0
============================================================================
# TOTAL: 22
# PASS:  22
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

If a test fails, you can call cat ./test-suite.log from the build directory where you ran make check. This will give more detailed information about the tests that failed. If a lot of tests have failed, this is likely indicative of something going wrong in the installation process. If you cannot resolve the issue, please feel free to open a GitHub Issue on the repo about the problem (make sure to include the contents of ./test-suite.log!).

Next Up:

Clone this wiki locally