.. DOCUMENTATION BUILT FROM RELEASE: 2.1.0b3 (Jun 30, 2017) .. : HORTON: Helpful Open-source Research TOol for N-fermion systems. : Copyright (C) 2011-2017 The HORTON Development Team : : This file is part of HORTON. : : HORTON is free software; you can redistribute it and/or : modify it under the terms of the GNU General Public License : as published by the Free Software Foundation; either version 3 : of the License, or (at your option) any later version. : : HORTON is distributed in the hope that it will be useful, : but WITHOUT ANY WARRANTY; without even the implied warranty of : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the : GNU General Public License for more details. : : You should have received a copy of the GNU General Public License : along with this program; if not, see : : -- .. : THIS FILE IS AUTOMATICALLY GENERATED. CHANGES TO THIS FILE WILL BE OVERWRITTEN : WHEN REBUILDING THE DOCUMENTATION. MAKE CHANGES IN : user_download_and_install_windows.rst.template : OR : ../dependencies.json : INSTEAD. Download and installation from source on Windows 10 64-bit (v. 1607) #################################################################### Disclaimer ========== HORTON has been tested on Ubuntu 14.04 subsystem available on Windows 10 64-bit (after Windows 10 Anniversary Update i.e. v.1607). The Ubuntu 14.04 subsystem is not available to any Windows operating systems prior to the Windows 10 (v.1607) or 32-bit Windows systems. Cygwin based installation is not supported (although possible in theory). Enable Bash on Windows 10 ========================= Provided you are using the appropriate version of Windows 10 (64-bit, after Window 10 Anniversary Update), go to "Settings > Update & Security > For Developers" (or alternatively search "Use Developer Features") and activate "Developer Mode". Then, go to "Programs and Features" and click "Turn Windows Features On or Off". Check the box "Windows Subsystem for Linux (Beta)". Restart Computer. Search "Bash" to open Ubuntu 14.04 subsystem terminal. Check Ubuntu Version (Just In Case) =================================== On bash, .. code-block:: bash lsb_release -a It should be `14.04.4 LTS`, but other versions may be available. Dependencies for building, installing and testing HORTON ======================================================== In order to compile and test HORTON, you need to install relatively recent versions of the following programs/libraries: * GCC, G++ and GFortran >=4.9: http://gcc.gnu.org (In principle the Intel compilers or any other combination of C++11 and Fortran compiler should work. The GNU compilers are used for development and testing.) * Python >=2.7,<3.0: http://www.python.org/ (Also install development files.) * Nosetests >=1.1.2: http://readthedocs.org/docs/nose/en/latest/ * NumPy >=1.9.1: http://www.numpy.org/ * SciPy >=0.11.0: http://www.scipy.org/ * Cython >=0.17.1: http://www.cython.org/ * H5Py >=2.2.1: http://www.h5py.org/ * Sympy >=0.7.1: http://code.google.com/p/sympy/ * Matplotlib >=1.0: http://matplotlib.org/ * LibXC ==2.2.2: http://www.tddft.org/programs/octopus/wiki/index.php/Libxc (Also install development files.) * LibInt ==2.0.3: http://sourceforge.net/p/libint/home (Also install development files.) * Curl >=7.0: http://curl.haxx.se/ * PIP >=7.0: https://pip.pypa.io/ (Not required in some scenarios but never bad to have.) Installing dependencies with a package manager ---------------------------------------------- With Ubuntu, most of these dependencies can be installed with a `apt-get`: * **Ubuntu Linux 16.04**: .. code-block:: bash sudo apt-get install gcc g++ gfortran python-dev python-nose python-scipy cython \ python-h5py python-sympy python-matplotlib \ libxc-dev curl python-pip Note that Ubuntu 16.04 does not have up-to-date packages for all dependencies. LibInt2 must be compiled manually as explained in :ref:`windows_manual_dependency_install`. * **Ubuntu Linux 15.04 and 14.04**: .. code-block:: bash sudo apt-get install gcc g++ gfortran python-dev python-nose python-scipy cython \ python-h5py python-sympy python-matplotlib \ libxc-dev curl python-pip pip install --user --upgrade numpy Note that Ubuntu 15.04 and 14.04 do not have up-to-date packages for all dependencies. Hence, some are installed with PIP. LibInt2 must be compiled manually as explained in :ref:`windows_manual_dependency_install`. .. _windows_manual_dependency_install: Installing dependencies manually -------------------------------- If the package manager of your Linux distribution does not have the desired packages (or the right versions), you have to install them manually, e.g. download and execute an installer, or download and unpack a binary package. On HPC environments a compilation from scratch is recommended. **LibXC** The directory ``tools/qa`` of the HORTON source tree contains scripts to download and build LibXC, which will work on most systems: .. code-block:: bash ./tools/qa/install_libxc-2.2.2.sh This results in a LibXC library suitable for compiling HORTON. If this fails, consult your local Ubuntu guru to build LibXC. If you decided to make a custom compilation of LibXC, keep in mind that it is not reliable when using aggressive compiler optimization flags. For more info about LibXC, check the website: http://www.tddft.org/programs/octopus/wiki/index.php/Libxc **LibInt2** The directory ``tools/qa`` of the HORTON source tree contains scripts to download and build LibInt2, which will work on most systems: .. code-block:: bash ./tools/qa/install_libint-2.0.3.sh The compilation of LibInt2 takes a few minutes and results in a library suitable for compiling HORTON. If this fails, consult your local Linux guru to build LibInt2. For more info about LibInt2, check the website: https://github.com/evaleev/libint **Python dependencies** In some cases, PIP, the Python package manager, may be a good choice to install the most recent versions of the Python packages in the list of dependencies. Examples are given above for Ubuntu and Fedora. Download the code ================= The latest stable source code release of HORTON can be downloaded here: https://github.com/theochem/horton/releases/download/2.1.0b3/horton-2.1.0b3.tar.gz Choose a suitable directory, e.g. ``~/build``, download and unpack the archive .. code-block:: bash mkdir -p ~/build cd ~/build curl -kLO https://github.com/theochem/horton/releases/download/2.1.0b3/horton-2.1.0b3.tar.gz tar -xvzf horton-2.1.0b3.tar.gz cd horton-2.1.0b3 .. _windows_compile_install: Compilation and installation ============================ Build and install ----------------- The regular build and install is done as follows: .. code-block:: bash ./setup.py install --user The ``setup.py`` script makes a reasonable attempt at configuring the compiler and linker settings for the LibXC and LibInt2 libraries. However, this does not work in all environments. In case of a failure, or if a configuration other than the default is desired, read the following section. Overriding default compiler/linker settings for LibXC and LibInt2 ----------------------------------------------------------------- The manual configuration of the compiler and linker settings is described here: :ref:`setup_cfg`. You should read this section if the default build and install has failed or if you would like to specify which libraries to use. Runtime configuration --------------------- You need to set the following variable in ``~/.bashrc`` to use HORTON: .. code-block:: bash export PATH=${HOME}/.local/bin:${PATH} # If you used special link options for LibXC or LibInt2, something along # the following lines may also be needed: # export LD_LIBRARY_PATH=some_dir/with/shared_objects/${LD_LIBRARY_PATH} If you run HORTON on a headless node, i.e. without an X server, you need to configure Matplotlib to use a backend that does not require a graphical user interface. (See http://matplotlib.org/faq/usage_faq.html#what-is-a-backend for more details on the Matplotlib backends.) This can be done by adding the following line to your ``matplotlibrc`` file: .. code-block:: text backend: agg This file is located in either ``${HOME}/.matplotlib`` or ``${HOME}/.config/matplotlib``. Running the tests ================= To test if HORTON was installed properly and if it can be accessed from any directory, you should change to a directory outside of the source tree and call nosetests as follows: .. code-block:: bash (cd ~; nosetests -v horton)