Commit 2cb93366 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

installation instructions updates

parent 415eb0ed
Loading
Loading
Loading
Loading
+35 −15
Original line number Diff line number Diff line
# DrSPINE Quick Installation Guide
DrSPINE Quick Installation Guide
===================================


## Pre-requsites
1. Prerequisites
-----------------

### Fortran Compiler
- Fortran 2008 compatible compiler
- GFortran v4.8 or newer
- Intel Fortran v12.0 or newer

### GR Framework
The report command in DrSPINE uses the GR Framework (gr-framework.org). 
Follow installation instructions for the C library GR.

### Python
Python3 interpreter and several SciPy packages.
In order to use 'plot' command in DrSPINE one needs
Python3 interpreter and several SciPy (scipy.org) packages.

Two convenient methods exist:

- Use Anaconda Python distribution, see http://www.continuum.io/anaconda
- Use minimal Anaconda - Miniconda, see http://conda.pydata.org/miniconda
and and install ipython, matplotlib, scipy and numpy with the following command:
a) Install full Anaconda Python distribution, see http://www.continuum.io/anaconda

b) Or install minimal Anaconda - Miniconda, see http://conda.pydata.org/miniconda
and then install only relevant scipy and numpy packages with the following command:

    conda install ipython matplotlib numpy scipy

@@ -21,16 +30,20 @@ and and install ipython, matplotlib, scipy and numpy with the following command:
In order to rebuild the documentation one needs full TeX Live https://www.tug.org/texlive
distribution.

Note: it works "out of the box" on Ubuntu (14,16) and MacOS with Tex Live 2016.
RedHat/CenOS 7 require extra packages to be downloaded from CTAN archive.
Note: it works "out of the box" on Ubuntu (14,16,20) and MacOS with Tex Live 2016 or newer.
RedHat 7 requires extra packages to be downloaded from the CTAN archive.


## Create/edit Makefile.def
2. Installation
-----------------

### Create/edit Makefile.def
The defaults should work in most cases. Edit only if needed.

    cp Makefile.def.in Makefile.def
    edit Makefile.def

## Build and install
### Build and install
Build DrSPINE for SNS-NSE

    make INSTRUMENT=1 all && make install DESTDIR=$HOME/local
@@ -39,14 +52,21 @@ or, alternatively, build for J-NSE

    make INSTRUMENT=2 all && make install DESTDIR=$HOME/local

## Set-up IPython profile
### Set-up the IPython profile
  Do it only once!

    source $HOME/local/bin/drspine_create_env.sh

## Activate DrSpine environment and run a test
### Activate DrSpine environment and run a test

    source $HOME/local/bin/drspine_activate.sh

    drspine -o /tmp -d $HOME/local/share/drspine \
            -x $HOME/local/share/drspine/macro_mk

### Add DrSpine environment to your shell initialization script
Add the following line 

    source $HOME/local/bin/drspine_activate.sh

    drspine -o /tmp -d $DRSPINE/share/drspine \
            -x $DRSPINE/share/drspine/macro_mk
to your $HOME/.bashrc (for bash) or $HOME/.zshrc (for zsh) depending on which shell is your default.
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ export PROJECT=drspine

export VERSION_MAJOR=1
export VERSION_MINOR=2
export VERSION_RELEASE=3
export VERSION_RELEASE=4

export PROJLIB=lib$(PROJECT).a
export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR)
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@ DATA_EXAMPLE=\
	s5848.echo s5849.echo s5850.echo\
	s5851.echo s5852.echo s5853.echo\
	s5854.echo s5855.echo s5857.echo\
	s5858.echo s5859.echo s58600.echo\
	s5858.echo s5859.echo s5860.echo\
	s5861.echo

all:: ;

+5 −11
Original line number Diff line number Diff line
#!/bin/bash

argv0=`basename $BASH_SOURCE`
basedir=$(dirname $BASH_SOURCE[0])
basedir=$(dirname $0)
nsetopdir=$(cd $basedir/..; pwd)
#nsetopdir=/SNS/software/nse

case "$-" in
    *i*)   # interactive session
    # environment variables
    GLI_HOME=$nsetopdir/lib/gli
    GRDIR=$nsetopdir/lib/gr
    TEXMFHOME=$nsetopdir/share/texmf
    PYTHONPATH=$nsetopdir/lib/python
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GLI_HOME
    PATH=$nsetopdir/anaconda/bin:$nsetopdir/bin:$GLI_HOME:$PATH
    export GLI_HOME GRDIR TEXMFHOME PYTHONPATH LD_LIBRARY_PATH PATH
    PATH=$nsetopdir/bin:$PATH
    export PYTHONPATH PATH
    #
    $nsetopdir/bin/drspine_create_env.sh
    xdg-mime default evince.desktop application/pdf
@@ -22,10 +16,10 @@ case "$-" in
    echo
    echo
    echo "--------------------------------------------------------------"
    echo " *** SNS NSE reduction/analysis environment is set        *** "
    echo " *** NSE reduction/analysis environment is set        *** "
    echo " *** $nsetopdir "
    echo
    echo " For help on SNS-NSE reduction contact dasneutron@gmail.com   "
    echo " For help contact dasneutron@gmail.com "
    echo "--------------------------------------------------------------"
    if [ ! -z "$1" ]; then
        mkdir -p ipts-$1