LATEST CHANGES, July 2016:
Our SVN repositories links are in the process of being replaced with Git repositories. Please bear with us while we punch through this process
Building SasktranIF on Linux (amd64). Last Updated 2015-11-13
Here are the instructions on how to build the SasktranIF code for python3 on a Linux system. This guide outlines the software installation on a clean Linux system. We currently recommend that SasktranIF only be used on a 64 bit platform (32 bit compilations "should" work but has not been tested). All of the steps have been executed on a clean Linux system running Ubuntu 14.04 LTS using a regular user who must use sudo and a password to elevate privilege.
The build system uses 3 primary disk locations for which you have some control in selecting the appropriate locations:
- SOFTWAREDIR: The C++ software directory structure. This directory is only used during the build process. A regular user directory can be used for this purpose < 1GB. An example directory is $HOME/OMPS/software
- INSTALLDIR: The executable binary code and configuration information. This is a read-only directory structure used to hold the binary executable code and can be shared with multiple users < 100 MB. A simple example is $HOME/OMPS/binary
- CACHEDIR: A read-write directory used to hold intermediate cached files. All users must have read/write access. Typically needs ~ 10-100 GB.. A simple example is $HOME/OMPS/Cache
System Software Tools: pre-requisistes
The Linux system should have the following software installed (note that swig has been dropped from the list of requirements),
- gcc, C compiler
- g++, C++ compiler
- gfortran, fortran compiler
- Anaconda Scientific Python for python 3.4, Linux 64 bit (Make sure you get version 3!). We currently install it into the users local home folder. Make sure the Anaconda version of python runs when you enter the command python3
- Subversion (SVN). You need this to check out our software from our server.
- yacc and lex if you plan to build the HDF and netcdf libraries
- Boost C++ libraries, see www.boost.org. Version 1.52 or higher is required. On Ubuntu 14.04 you can use sudo apt-get install libboost-all-dev.
You will have to edit your environment variables after the build. Of particular importance are INCLUDE, LIBRARY_PATH and LD_LIBRARY_PATH. Environment variable INCLUDE is a colon separated list of relevant C/C++ header directories, LIBRARY_PATH is a colon separated list of relevant library (lib*.a) directories and LD_LIBRARY_PATH is a colon separated list of relevant shareable object (*.so) directories. You may need to edit INCLUDE and LIBRARY_PATH before starting the build if you manually installed Boost. See the boost documentation for more details. We installed Boost using the package manager on our system and did not need to edit any environment variables (it just worked). On our Ubuntu system we edit environment variables in file .bashrc in the $HOME directory but .profile, .bash_profile are other choices. On other systems it may be called something else. Note that you can either log out and log in to reload the environment variables or you can use something like source .bashrc
The installation creates a python wheel for the sasktranif software and uses pip, the package installer for python, to install the sasktran software into your version of python3. You need to make sure your system can install Python Wheels. Please do the following
- $pip -V Ensure the version of pip is appropriate for the target version of python3. This may be a problem if you have multiple versions of python installed on your system. You may have to play with your path environment variable
- $pip install --upgrade pip Upgrade pip to the latest version. We use pip 7.1.2
- $pip install wheel Use pip to Install the wheel installation software into python.