Skip to content

Repository files navigation

Cologra

Links

STCE Chair Software Lab Description

Zotero Group

Installation

You need to have CMake and OpenMPI installed. If you want to format the code, you also need to have ClangFormat installed. For testing, we use Google Test, but you don't need to install it.

sudo apt-get install cmake
sudo apt-get install openmpi-bin openmpi-common libopenmpi-dev
sudo apt-get install clang-format
sudo apt-get install valgrind valgrind-mpi

Usage

To compile, run the tests, and install:

make
make test
sudo make install

Here is a full list of the available commands:

make build # Same as make
make run
make debug
make test
make test_verbose
make install
make uninstall
make format
make clean

Package Manager

We use vcpkg as a package manager. Follow the instructions on the GitHub page to install it. Then you can install the required packages with:

vcpkg install

Editor Setup

CLion

ClangFormat is already configured in the .clang-format file and will automatically be used by CLion. You can use this setup to configure CLion to use OpenMPI.

VS Code

Install the clang-format extension and configure it according to the extension's instructions. Also, install the CMake Tools extension and GDB.

sudo apt-get install gdb

.vscode/tasks.json

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "shell",
      "label": "CMake build",
      "command": "sh",
      "args": ["cmd/build.sh"],
      "options": {
        "cwd": "${workspaceFolder}"
      },
      "problemMatcher": ["$gcc"],
      "group": {
        "kind": "build",
        "isDefault": true
      }
    }
  ]
}

.vscode/launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Build and Debug",
      "type": "cppdbg",
      "request": "launch",
      "program": "${workspaceFolder}/build/cologra",
      "cwd": "${workspaceFolder}",
      "externalConsole": false,
      "showDisplayString": true,
      "preLaunchTask": "CMake build",
      "stopAtEntry": false,
      "miDebuggerPath": "/usr/bin/gdb"
    }
  ]
}

Errors

When trying to run on the cluster, I got the following error:

build/src/cologra_cli: symbol lookup error: build/src/cologra_cli: undefined symbol: __libm_feature_flag

To fix this, I compiled using GCCcore/.11.3.0 instead of the standard compiler. To unload the Intel compiler, use:

module unload intel-compilers/2022.1.0

About

Parallel graph coloring library built with OpenMPI

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages