Skip to content

Installing igatools

Sebastian Pauletti edited this page Feb 10, 2016 · 16 revisions

Currently, to install igatools you need to compile it from its sources. Below there are some explanatory steps to guide you through the process.

The library is developed and tested on Unix-like architectures (Linux, Mac OS X). The compilation and installation on Windows machines is not tested and is not supported by the igatools main developers.

In order to get the source code, you can download from the GitHub Download ZIP button or you can use git to download the library from the GitHub repository.


Prerequisites pre-installation

To configure and compile the sources you need to have the following programs available in your system:

  • CMake;
  • a modern C++14 compiler (some notes about the compiler choice can be found here);
  • a python interpreter (from our experience, this was usually pre-installed in all Linux/Mac OS X machine we have tested).

In order to generate the documentation from the code (optional), you need to have the following programs

If you are a Linux user we assume you know how to install the appropriate packages for your distribution.

Additionally, igatools relies on some libraries that also need to be available in your system:

Other libraries may be needed if you configure igatools in order to use some parts that are not active by default (more details about the configuration options can be found here).


The installation process

In order to be general and flexible, in the installation process we'll use the following environment variables that you can set to point to some (existing) directories, at your choice (the only constraint is that the source directory and the build directory cannot be the same).

Variable name Description
IGATOOLS_SOURCE Directory where the igatools sources are stored (i.e. the directory that is used to clone the GitHub repository)
IGATOOLS_WS The directory used as workspace, i.e. where the library is build (configured, compiled and linked)
IGATOOLS_PREFIX The directory where the library will be installed after the build phase
TRILINOS_PREFIX The directory where the Trilinos libraries are installed

In all the steps below, we assume that the shell used is Bash and the above environment variables are defined with your system paths. They are usually defined at the start-up of the shell. Moreover, for better undestanding, we set IGATOOLS_SOURCE to point to ~/igatools and IGATOOLS_WS to point to ~/build_igatools.

After the directories are created and the above environment variables set, we clone the igatools repository into the ${IGATOOLS_SOURCE} directory

~ > git clone https://github.com/igatoolsProject/igatools.git ${IGATOOLS_SOURCE}

After the clone process we move into the ${IGATOOLS_WS} directory and we launch the cmake command in order to populate the workspace with the needed files:

cd ${IGATOOLS_WS}
cmake ${IGATOOLS_SOURCE} \
   -DTrilinos_PREFIX=${TRILINOS_PREFIX} \
   -DCMAKE_INSTALL_PREFIX=${IGATOOLS_PREFIX} \
   -DCMAKE_CXX_COMPILER=clang++

At the end of a successful cmake configuration, is a good idea to export the igatools path to the library path. This depends on your system (Linux or Mac OS X) and shell but basically you need to add to your .bash_login or .bash_rc something like

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IGATOOLS_PREFIX/lib

for Linux machines and

  export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$IGATOOLS_PREFIX/lib

for Mac OS X.

Then we launch the compilation (with a certain number of threads, depending on the machine...here we use 5) and the installation of the library, and optionally the generation of the documentation (the path for documentation main page will be ${IGATOOLS_PREFIX}/doc/index.html)

 make -j5 install
 make doc

Post-installation

After installing the library, the suggested starting point for a new user is the tutorial. The tutorial consists of a set of simple example programs, each of which teaches the user some use of the library. They also suggest the user some modifications to allow him for hands-on learning. To access the tutorial start your browser and open the documentation main page ${IGATOOLS_PREFIX}/doc/index.html.

firefox $IGA_PREFIX/doc/html/index.html

To access the tutorial click the Tutorial link on the left.

In order to do the exercises you need to modify a source file. This will require a text editor, is up to you to pick one. Be advised (in case this is your first time dealing with a C++ project) that there many convenient development environments (IDE). Some examples are Eclipse, KDevelop, XCode, Emacs, Vim, etc.