Skip to content
dumbman edited this page Nov 30, 2018 · 38 revisions

Git

Currently it is possible to use either Python of C++ version of the program. In both cases it is recommended to install git to work with repositories:

  1. Install git. On Debian GNU/Linux:
sudo apt-get install git-core

Python

The simplest way to try the program is to use Python version. It works slower than C++, but much easier to install.

  1. Clone the repository to your local computer:
git clone https://github.com/epicf/ef_python your-ef_python-dir

C++ Compile from Source

  1. Install git and development tools ( compilers, make, etc... ):
sudo apt-get install build-essential
  1. Install dependencies( boost, petsc, hdf5 ). Make sure to install *-dev packages, since they contain header files necessary for compilation:
sudo apt-get install libboost-all-dev libhdf5-dev
  1. Clone the repository to your local computer:
git clone https://github.com/epicf/ef your-ef-dir
  1. Compile:
cd your-ef-dir 
make 
  1. To check how program is works run example from folder "examples": '''bash cd examples/axially_symmetric_beam_contour sh run_example.sh ''' Description of examples you can find here https://github.com/epicf/ef/wiki/Examples

Optional Dependencies

  1. Hdftools and hdfview are helpfull in order to examine output *.h5 files. Hdftools are console, hdfview is graphical.
sudo apt-get install hdf5-tools hdfview
  1. While there are many tools to work with hdf5 files, examples in the repositories use python and h5py library. Apart from it, python3, numpy and matplotlib are necessary.
sudo apt-get install python3 python3-h5py python3-numpy python3-matplotlib
  1. Ef comes with experimental FreeCAD module to simplify preparation of config files. FreeCAD is a parametric 3d-modelling software. To use the module, install FreeCAD and create a link from it's module directory (typically, ~/.FreeCAD/Mod), to freecad folder in the Ef distribution.
sudo apt-get install freecad
mkdir -p ~/.FreeCAD/Mod
ln -s your-ef-dir/freecad/ ~/.FreeCAD/Mod/ef
  1. Paraview support. To perform complex visualization of large amount of data several excellent tools exist. Two of them are Paraview and Visit. Ef comes with Paraview 'plugin'. Install Paraview and create a link from Paraview macros directory to 'paraview/ef.py' script in Ef distribution.
sudo apt-get install paraview
mkdir -p ~/.config/ParaView/Macros
ln -s your-ef-dir/paraview/ef.py ~/.config/ParaView/Macros/ef.py

Arch Linux Installation

sudo pacman -Sy git boost hdf5-openmpi wget python2 python-h5py-openmpi
git clone http://github.com/epicf/ef
cd ef
git checkout master-arch-install # or `git checkout dev-arch-install` 
sh arch_install_petsc.sh # install PETSc into your-ef-dir/lib/
make

Note on Installation on HPC Clusters

Some libraries might be missing in the system. You'll have to either contact system administrator to install all missing libraries system-wide, or to install them locally (which is more likely). The following script, used on Scientific Linux, might be usefull.

Before compilation, you'll have to specify pathes to these libraries in Makefile. Example Makefile is attached.

Before running the program, you have to ensure that libraries you installed are seen in LD_LIBRARIES_PATH. This requires exporting them each time you log in into system:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/petsc/opt/lib/
Clone this wiki locally