Experimental layout with node.js bindings. It supports graph layouts in 1D, 2D, 3D, and 4D spaces. It also can be compiled with OpenMP support, which boosts performance even further, by leveraging multi-threading techniques.
This is not supposed to be used yet. Sometimes it may crash/hang.
Currently only OSX/Linux platforms are supported.
This should work for OSX/Linux:
npm i nanlayout
Make sure you have OpenMP installed. I used clang-omp:
brew install clang-omp
export CXX=`which clang-omp++`
npm i nanlayout --openmp=true
git clone https://github.com/anvaka/nanlayout
cd nanlayout
npm install
This will download all dependencies and will attempt to compile the module. If you run into any compilation errors, you can always recompile it with:
npm run configure
npm run build
By default the build you get from npm run build
is single-threaded. If you want
to create multi-threaded build, keep reading.
You will need to install OpenMP enabled clang compiler. I used clang-omp during development:
brew install clang-omp
Before compiling this library with this compiler, make sure it's exported:
export CXX=`which clang-omp++`
It is also expected that libiomp5
library is located at /usr/local/lib/libiomp5.dylib
Once all prerequisites are met, run:
npm run configure-omp
npm run build
This should generate OpenMP build.
I used gcc compiler version 4.8.4. This produced OpenMP build:
npm run configure-omp
npm run build
If you run into any issues - let me know.
It's unstable and will likely change. See test
directory for the reference.
TODO: I need to change how graph is passed. If it's coming from other nangraph module I get exceptions. It's imprtant that you graph is the same as nanlayout's