Skip to content

Instantly share code, notes, and snippets.

@cuihantao
Last active June 22, 2017 18:45
Show Gist options
  • Save cuihantao/993198ac858d7e305cb81f5008310378 to your computer and use it in GitHub Desktop.
Save cuihantao/993198ac858d7e305cb81f5008310378 to your computer and use it in GitHub Desktop.

GridDyn Installation on Ubuntu 14.04.md

Preparation

# apt-get install git cmake doxygen libopenblas-dev

Clone GridDyn Repo

git clone https://github.com/LLNL/GridDyn.git

Download and Install External Packages

Boost 1.61, Sundials 2.6.2, and Suitesparse 4.2.1:

curl -L http://cfhcable.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2 | tar xj
curl -L http://computation.llnl.gov/projects/sundials/download/sundials-2.6.2.tar.gz | tar zx
curl -L http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.2.1.tar.gz | tar zx

Build and install Suitesparse

cd SuiteSparse
make -j `getconf _NPROCESSORS_ONLN` && sudo make install

Build and install Sundials

cd ../sundials-2.6.2
mkdir build && cd build
ccmake ..

Configure with the following:

BUILD_SHARED_LIBS = OFF (to avoid conflicts with GridDyn)
KLU_ENABLE = ON
KLU_INCLUDE_DIR = /usr/local/include
KLU_INCLUDE_LIB = /usr/local/lib
OPENMP_ENABLE = ON

If you encounter any error in the generation, please make sure cmake version is >= 3.0.

Then build and install with:

make -j `getconf _NPROCESSORS_ONLN` && sudo make install

Build and install Boost

cd ../../boost_1_61_0
./bootstrap.sh

Follow the instructions to run the compilation script. For example, my script file name is 'b2':

./b2 -j`getconf _NPROCESSORS_ONLN`
# ./b2 install

Build and install GridDyn

cd ../GridDyn
mkdir build && cd build
ccmake ..

Configure with the following options:

KLU_DIR = /usr/local
KLU_INSTALL_DIR = /usr/local
KLU_LIB = /usr/local/lib/libsuitesparseconfig.so

Compile with

make -j `getconf _NPROCESSORS_ONLN`
# make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment