Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESS2019 installation guide updates #3236

Merged
merged 6 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ endif(WITH_VALGRIND_INSTRUMENTATION)
# MPI
#

find_package(MPI REQUIRED)
find_package(MPI 3.0 REQUIRED)

# CMake < 3.9
if(NOT TARGET MPI::MPI_CXX)
Expand Down
123 changes: 77 additions & 46 deletions doc/sphinx/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ Cython
.. _Installing Requirements on Ubuntu Linux:

Installing Requirements on Ubuntu Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To make |es| run on 18.04 LTS, its dependencies can be installed with:

.. code-block:: bash

sudo apt install build-essential cmake cython3 python3-numpy \
libboost-all-dev openmpi-common fftw3-dev libhdf5-dev libhdf5-openmpi-dev \
doxygen python3-opengl python3-sphinx python3-pip libgsl-dev
libboost-all-dev openmpi-common fftw3-dev libhdf5-dev libhdf5-openmpi-dev \
python3-opengl libgsl-dev


Optionally the ccmake utility can be installed for easier configuration:
Expand All @@ -88,7 +88,8 @@ are required:

.. code-block:: bash

pip3 install --upgrade jupyter scipy matplotlib sphinxcontrib-bibtex numpydoc
sudo apt install python3-matplotlib python3-scipy \
ipython3 jupyter-notebook

If your computer has an Nvidia graphics card, you should also download and install the
CUDA SDK to make use of GPU computation:
Expand All @@ -114,68 +115,98 @@ ROCm SDK to make use of GPU computation:
sudo apt update
sudo apt install libnuma-dev rocm-dkms rocblas rocfft rocrand rocthrust

After installing the ROCm SDK, please reboot your computer.

.. _Installing Requirements on Mac OS X:

Installing Requirements on Mac OS X
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To make |es| run on Mac OS X 10.9 or higher, its dependencies can be
installed using MacPorts. First, download the installer package
appropriate for your Mac OS X version from
https://www.macports.org/install.php and install it. Then, run the
Preparation
"""""""""""

To make |es| run on Mac OS X 10.9 or higher, you need to install its
dependencies. There are two possibilities for this, MacPorts and Homebrew.
We recommend MacPorts, but if you already have Homebrew installed, you can use
that too. To check whether you already have one or the other installed, run the
following commands:

.. code-block:: bash

sudo xcode-select --install
sudo xcodebuild -license accept
sudo port selfupdate
sudo port install cmake python37 py37-cython py37-numpy \
openmpi-default fftw-3 +openmpi boost +openmpi +python37 \
doxygen py37-opengl py37-sphinx py37-pip gsl hdf5 +openmpi
sudo port select --set cython cython37
sudo port select --set python3 python37
sudo port select --set pip pip37
sudo port select --set mpi openmpi-mp
test -e /opt/local/bin/port && echo "MacPorts is installed"
test -e /usr/local/bin/brew && echo "Homebrew is installed"

Alternatively, you can use Homebrew.
If both are installed, you need to remove one of the two. To do that, run one
of the following two commands:

.. code-block:: bash

sudo port -f uninstall installed && rm -r /opt/local
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

If Homebrew is already installed, you should resolve any problems reported by
the command

.. code-block:: bash

brew doctor

If Anaconda Python or the Python from www.python.org are installed, you
will likely not be able to run |es|. Therefore, please uninstall them
using the following commands:

.. code-block:: bash

sudo rm -r ~/anaconda[23]
sudo rm -r /Library/Python

If you want to install MacPorts, download the installer package
appropriate for your Mac OS X version from
https://www.macports.org/install.php and install it.

If you want to install Homebrew, use the following commands.

.. code-block:: bash

sudo xcode-select --install
sudo xcodebuild -license accept
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake python@3 cython boost boost-mpi fftw \
doxygen gsl
brew install hdf5 --with-mpi
brew install numpy --without-python@2
ln -s /usr/local/bin/python2 /usr/local/bin/python
pip install --user PyOpenGL

Note: If both MacPorts and Homebrew are installed, you will not be able to
run |es|. Therefore, if you have both installed, please uninstall one
or the other by running one of the following two commands:
Installing Packages using MacPorts
""""""""""""""""""""""""""""""""""

Run the following commands:

.. code-block:: bash

sudo port -f uninstall installed && rm -r /opt/local
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
sudo xcode-select --install
sudo xcodebuild -license accept
sudo port selfupdate
sudo port install cmake python37 py37-cython py37-numpy \
openmpi-default fftw-3 +openmpi boost +openmpi +python37 \
doxygen py37-opengl py37-sphinx gsl hdf5 +openmpi \
py37-matplotlib py37-ipython py37-jupyter
sudo port select --set cython cython37
sudo port select --set python3 python37
sudo port select --set mpi openmpi-mp

If your Mac has an Nvidia graphics card, you should also download and install the
CUDA SDK [6]_ to make use of GPU computation.

.. _Installing python dependencies:
Installing Packages using Homebrew
""""""""""""""""""""""""""""""""""

Installing python dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: bash

There are a few python packages needed to e.g. build the documentation.
To install the required packages as a non-root user execute the following
command in |es|'s source directory:
brew install cmake python cython boost boost-mpi fftw \
doxygen gsl numpy ipython jupyter
brew install hdf5
brew link --force cython
pip install PyOpenGL matplotlib

.. code-block:: bash
Installing CUDA
"""""""""""""""

pip3 install -r requirements.txt --user --upgrade
If your Mac has an Nvidia graphics card, you should also download and install the
CUDA SDK [6]_ to make use of GPU computation.

.. _Quick installation:

Expand Down Expand Up @@ -248,7 +279,7 @@ Configuring
.. _myconfig.hpp\: Activating and deactivating features:

:file:`myconfig.hpp`: Activating and deactivating features
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

|es| has a large number of features that can be compiled into the binary.
However, it is not recommended to actually compile in all possible
Expand Down Expand Up @@ -317,7 +348,7 @@ and then in the Python interpreter:
.. _Features:

Features
~~~~~~~~
--------

This chapter describes the features that can be activated in |es|. Even if
possible, it is not recommended to activate all features, because this
Expand Down Expand Up @@ -532,15 +563,15 @@ Finally, there is a flag for debugging:


Features marked as experimental
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some of the above features are marked as EXPERIMENTAL. Activating these features can have unexpected side effects and some of them have known issues. If you activate any of these features, you should understand the corresponding source code and do extensive testing. Furthermore, it is necessary to define ``EXPERIMENTAL_FEATURES`` in :file:`myconfig.hpp`.



.. _cmake:

cmake
~~~~~
^^^^^

In order to build the first step is to create a build directory in which
cmake can be executed. In cmake, the *source directory* (that contains
Expand Down Expand Up @@ -572,7 +603,7 @@ Afterwards |es| can be run via calling :file:`./pypresso` from the command line.
.. _ccmake:

ccmake
~~~~~~
^^^^^^

Optionally and for easier use, the curses interface to cmake can be used
to configure |es| interactively.
Expand Down