TOP uses the standard autotools (autoconf, automake) install procedure, you should be able to install it using:
# get the code:
git clone https://github.com/top-devel/top.git
# enter the source code directory:
cd top
# download the optional dependencies:
git submodule init
git submodule update
# prepare the configure script:
./bootstrap
# configure and install TOP:
./configure && make install
You can get more details and options reading the following sections: getting the code, configure and compile and install.
The best way to get the latest version of the code is to download it from the repository:
# with ssh:
git clone git@gitlab.com:top-dev/top.git
# with https:
git clone https://gitlab.com/top-dev/top.git
This will download the latest version of the code in a directory named top. Enter this directory:
cd top
You can optionally download the parser to write oscillation equations with the new equation format:
git submodule init
git submodule update
Run the bootstrap script that will create the configure script:
./bootstrap
Note
In order to run the bootstrap script you will need to have autoconf (>=2.59), automake (>=1.9) and libtool installed.
You can then proceed to the configure steps.
Download a source archive from the download page.
If you don’t need the latest version of TOP, you can use a source archive. Extract your source archive and enter to source directory:
tar xvjz top-x.y.tar.bz2
cd top-x.y
And proceed to the configure steps.
Prerequisites:
The configure script allows you to configure the build environment of TOP. In order to install TOP, you will need:
Configure will try to detect the libraries installed in your system, if it fails to find both a BLAS and a LAPACK library it will return an error. You can try to re-run configure with some of the following option to help it find you libraries:
Configure options:
Example:
If you want to use Intel compiler (ifort) and the ATLAS library (installed in $HOME/local/lib), you want to configure with the following command line:
./configure FC=ifort LDFLAGS=-L$HOME/local/lib LIBS=-ltatlas
After running successfully the configure script, you can compile and install TOP by running:
make install
TOP is composed of a compiler wrapper top-build installed in $prefix/bin, a few libraries installed in $prefix/lib and a python module installed in $prefix/lib/python-version/site-packages/top.
As few examples are also availiable in $prefix/share/top/models
Note
You can source the shell script activate-top.sh created in the directory where you compiled TOP to set up the environment variables PATH, LD_LIBRARY_PATH and PYTHONPATH with the path where TOP was installed.
In order to use ESTER stellar models, TOP needs to find where ESTER was installed on your system. In order to tell TOP’s configure script where to find libester, you need to provide it with the options: LDFLAGS=-L$PATH_TO_ESTER/lib and CPPFLAGS=-I$PATH_TO_ESTER/include.
For instance if ESTER was installed in $HOME/local, TOP should be able to find it if you configure with:
./configure LDFLAGS=-L$HOME/local/lib CPPFLAGS=-I$HOME/local/include