Skip to content
Markus Battarbee edited this page May 25, 2021 · 8 revisions

Get Analysator

HTTPS method

If you do not have a github account with SSH keys installed, use the HTTPS method.

cd $HOME
git clone https://github.com/fmihpc/analysator.git

SSH method

This method is recommended, but requires activating your PGP key and linking it with your Github account. If that is the case, downloading a copy of the analysator toolset may be as simple as:

cd $HOME
git clone [email protected]:fmihpc/analysator.git

On certain computers, the directory this is done in needs to be different (e.g. Vorna guide)

Install dependencies

Analysator should work mostly equally well on both Python 2.7 and Python 3.x.

Analysator only requires a small selection of python libraries, namely matplotlib and numpy. On modern systems, these should be pre-installed. Some legacy sections of Analysator also use MayaVi2 but those are no longer updated or supported. If necessary, matplotlib and numpy can be installed either with sudo apt-get install -y python-matplotlib python-numpy ipython (if superuser rights are available) or, preferably, with pip, e.g.: pip3.7 install matplotlib==3.3.0 --cache-dir /proj/$USER/.cache --user pip3.7 install numpy --cache-dir /proj/$USER/.cache --user where the pip binary in use depends on your python version.

iPython is recommended for debugging and ease of use. This is often already available, but can also be installed manually if necessary. sudo apt-get install -y ipython

A TeX Live installation (or similar) is recommended for formatting of plotting text. If one is not available on the target system, output can be forced to use TeX-like markup supported directly by matplotlib. This is achieved by setting the system variable export PTNOLATEX=1 and to make the setting permanent echo "export PTNOLATEX=1" >> ~/.bashrc

(Optional) deactivate X-windowing

On systems without an x-windowing system such as compute nodes on a cluster (or if using it is prohibitively slow due to e.g. network weather), Analysator can be set to ignore X-windowing and use a non-interactive frontend by setting the system variable export PTNOINTERACTIVE=1 and to make the setting permanent echo "export PTNOINTERACTIVE=1" >> ~/.bashrc.

If necessary, the matplotlib frontend can be declared manually with, for example, export PTBACKEND=Qt5Agg

Set pythonpath

echo "export PYTHONPATH=$PYTHONPATH:$HOME/analysator" >> ~/.bashrc
export PYTHONPATH=$PYTHONPATH:$HOME/analysator

(Optional) Set image output directory

The default directory for image file output for some Analysator plotting tools is $HOME/Plots. This setting can be altered by setting the system variable export PTOUTPUTDIR=/target/directory/. This is required on e.g. Vorna and if using compute nodes which do not have access to the user home directory.

Test the installation

ipython
import pytools as pt

Sample output of the test

markusb@dx7-flafo-01:~$ ipython
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
Type "copyright", "credits" or "license" for more information.

IPython 5.5.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pytools as pt
Using LaTeX formatting
Using matplotlib version 2.1.1

In [2]: