Code Monkey home page Code Monkey logo

flexus's Introduction

Flexus Instructions

How to Build Environment

  • Install a compatible version of gcc:
spack env create qflex qflex.yaml
spack install
  • Set the recently installed version of gcc as default:

build boost from scratch (run ./build_boost.sh)

export BOOST="boost_1_70_0"
export BOOST_BUILD=$(pwd)/boost_1_70_0-build
wget https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz -O /tmp/${BOOST}.tar.gz
tar -xf /tmp/${BOOST}.tar.gz
cd ./${BOOST}/
./bootstrap.sh --prefix=$BOOST_BUILD
./b2 -j8
sudo ./b2 install

How to Use CMake to Compile Flexus

  • example options
-DTARGET_PLATFORM=arm
-DSELECTED_DEBUG=vverb
-DSIMULATOR=KnottyKraken
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DBOOST_INCLUDEDIR=$(pwd)/boost_1_70_0-build/include
-DBOOST_LIBRARYDIR=$(pwd)/boost_1_70_0-build/lib
  • Add options by -D${OPTION_NAME}=${OPTION} after cmake.
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBOOST_INCLUDEDIR=$(pwd)/boost_1_70_0-build/include -DBOOST_LIBRARYDIR=$(pwd)/boost_1_70_0-build/lib -DSIMULATOR=KeenKraken .
LD_LIBRARY_PATH=$SPACK_ROOT/var/spack/environments/qflex/.spack-env/view/lib:./boost_1_70_0-build/lib make -j

# Running with keen-kraken
LD_LIBRARY_PATH=$SPACK_ROOT/var/spack/environments/qflex/.spack-env/view/lib:$BOOST_BUILD/lib:$LD_LIBRARY_PATH ./../scripts/captain/captain ../scripts/captain/keen_config/system.ini -o output/
  • Use make clean to only remove *.a and *.so files.
  • Use make clean_cmake to remove all of the files and folders that cmake produces.
  • If you are using non-default install paths for boost and/or gcc, modify the location of dynamic libraries before executing make
$ LD_LIBRARY_PATH=<path to dynamic libraries> make -j

How to Use CMake to Compile Flexus Testing Harness

  • Set the SIMULATOR variable to Harness while running cmake:
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBOOST_INCLUDEDIR=$(pwd)/boost_1_70_0-build/include -DBOOST_LIBRARYDIR=$(pwd)/boost_1_70_0-build/lib -DSIMULATOR=Harness .
LD_LIBRARY_PATH=./boost_1_70_0-build/lib make -j
  • Use make clean to only remove *.a and *.so files.
  • Use make clean_cmake to remove all of the files and folders that cmake produces.
  • Run the tests by executing testing_harness:
$ ./testing_harness
  • If you are using non-default install paths for boost and/or gcc, modify the location of dynamic libraries before executing make and testing_harness
$ LD_LIBRARY_PATH=<path to dynamic libraries> make -j
$ LD_LIBRARY_PATH=<path to dynamic libraries> ./testing_harness

Flexus Code Formatting

The preferred version of Ubuntu is 18.04. When you contribute to this project, please clang-format the code at first. Please follow these instructions:

$ sudo apt-get install clang-format-6.0

Use the .clang-format file from repository and locate it in the folder where you want to format the code.

Within the folder, use this command to format .cpp/.hpp/.c/.h files:

$ find . -type f -and \( -name "*.hpp" -or -name "*.cpp" -or -name "*.h" -or -name "*.c" \) | xargs clang-format -i -style=file

Use the clang_format_test.sh file to check whether the formatting is successful or not. If it is successful, there will be green works showing All source code in commit are properly formatted. Otherwise, there will be red warning showing Found formatting errors! and which file where the problem is in.

flexus's People

Contributors

hnefi avatar katetsu avatar sid1994 avatar setu-gupta avatar neo-apz avatar yufeng98 avatar truls avatar mayyxeng avatar zilutian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.