Commit d3032973 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

allow to select default instrument during build

* use iso_fortran_env and version bump
* updates to Makefile(s) and INSTALL.md instructions
parent 048ac7e6
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@ 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.



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

@@ -33,8 +31,13 @@ The defaults should work in most cases. Edit only if needed.
    edit Makefile.def

## Build and install
Build DrSPINE for SNS-NSE

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

or, alternatively, build for J-NSE

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

## Set-up IPython profile
  Do it only once!
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,9 @@
# Installation
DESTDIR=$(HOME)

# Default Instrument 1=SNS-NSE, 2=J-NSE
INSTRUMENT=1

# Fortran 2003 compiler (use ifort or gfortran)
FC      = gfortran
# Fortran 2003 compiler flags
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR)


export VERSION_MAJOR=0
export VERSION_MINOR=60
export VERSION_MINOR=61

git_rev=$(shell git rev-parse --short HEAD 2> /dev/null)
ifeq "$(git_rev)" ""
+27 −10
Original line number Diff line number Diff line
\hypertarget{drspine-quick-installation-guide}{%
\section{DrSPINE Quick Installation
Guide}\label{drspine-quick-installation-guide}
Guide}\label{drspine-quick-installation-guide}}

\subsection{Pre-requsites}\label{pre-requsites}
\hypertarget{pre-requsites}{%
\subsection{Pre-requsites}\label{pre-requsites}}

\subsubsection{Fortran Compiler}\label{fortran-compiler}
\hypertarget{fortran-compiler}{%
\subsubsection{Fortran Compiler}\label{fortran-compiler}}

\begin{itemize}
\tightlist
@@ -15,7 +18,8 @@ Guide}\label{drspine-quick-installation-guide}
  Intel Fortran v12.0 or newer
\end{itemize}

\subsubsection{Python}\label{python}
\hypertarget{python}{%
\subsubsection{Python}\label{python}}

Python3 interpreter and several SciPy packages.

@@ -30,7 +34,8 @@ Python3 interpreter and several SciPy packages.
  conda install ipython matplotlib numpy scipy
\end{itemize}

\subsubsection{TeX Live}\label{tex-live}
\hypertarget{tex-live}{%
\subsubsection{TeX Live}\label{tex-live}}

In order to rebuild the documentation one needs full TeX Live
https://www.tug.org/texlive distribution.
@@ -39,7 +44,8 @@ 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.

\subsection{Create/edit Makefile.def}\label{createedit-makefile.def}
\hypertarget{createedit-makefile.def}{%
\subsection{Create/edit Makefile.def}\label{createedit-makefile.def}}

The defaults should work in most cases. Edit only if needed.

@@ -48,13 +54,23 @@ cp Makefile.def.in Makefile.def
edit Makefile.def
\end{verbatim}

\subsection{Build and install}\label{build-and-install}
\hypertarget{build-and-install}{%
\subsection{Build and install}\label{build-and-install}}

Build DrSPINE for SNS-NSE

\begin{verbatim}
make INSTRUMENT=1 all && make install DESTDIR=$HOME/local
\end{verbatim}

or, alternatively, build for J-NSE

\begin{verbatim}
make all && make install DESTDIR=$HOME/local
make INSTRUMENT=2 all && make install DESTDIR=$HOME/local
\end{verbatim}

\subsection{Set-up IPython profile}\label{set-up-ipython-profile}
\hypertarget{set-up-ipython-profile}{%
\subsection{Set-up IPython profile}\label{set-up-ipython-profile}}

Do it only once!

@@ -62,8 +78,9 @@ Do it only once!
source $HOME/local/bin/drspine_create_env.sh
\end{verbatim}

\hypertarget{activate-drspine-environment-and-run-a-test}{%
\subsection{Activate DrSpine environment and run a
test}\label{activate-drspine-environment-and-run-a-test}
test}\label{activate-drspine-environment-and-run-a-test}}

\begin{verbatim}
source $HOME/local/bin/drspine_activate.sh
+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ FCFLAGS=-g -O2
ARFLAGS= cr
GRDIR  = /usr/local/gr
#OLDCOM =
INSTRUMENT=1  # default instrument 1=SNS-NSE, 2=J-NSE, see drspine_parameters.f90

MAKEDEPEND := $(shell command -v makedepend 2> /dev/null)
MAKEDEPF90 := $(shell command -v makedepf90 2> /dev/null)
@@ -23,6 +24,7 @@ LDFLAGS += -Wl,-rpath,$(GRDIR)/lib -L$(GRDIR)/lib
LDLIBS  += -lGR
endif

DEFINES+=-D_DEFAULT_INSTRUMENT_=$(INSTRUMENT)
DEFINES+=-D_VERSION_MAJOR_=$(VERSION_MAJOR) -D_VERSION_MINOR_=$(VERSION_MINOR) -D_VERSION_RELEASE_=\"$(VERSION_RELEASE)\"
LDLIBS:=$(PROJLIB) $(LDLIBS)

Loading