From ca1d52cddad08a9d99b0692e2c45e5c7a5de9851 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Mon, 7 Oct 2019 17:52:59 +0200 Subject: [PATCH 1/6] ESS2019 installation guide updates --- CMakeLists.txt | 2 +- doc/sphinx/installation.rst | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc7a018336c..ca2b935f9bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,7 +336,7 @@ endif(WITH_VALGRIND_INSTRUMENTATION) # MPI # -find_package(MPI REQUIRED) +find_package(MPI REQUIRED 3.0) # CMake < 3.9 if(NOT TARGET MPI::MPI_CXX) diff --git a/doc/sphinx/installation.rst b/doc/sphinx/installation.rst index 34876f44cb2..6a349b67a86 100644 --- a/doc/sphinx/installation.rst +++ b/doc/sphinx/installation.rst @@ -114,6 +114,8 @@ 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 @@ -132,7 +134,8 @@ following commands: 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 + doxygen py37-opengl py37-sphinx py37-pip 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 pip pip37 @@ -145,12 +148,11 @@ Alternatively, you can use Homebrew. 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 + 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 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 From 55ff88a25e10ec0a6bd2367a1177a414b884f637 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Mon, 7 Oct 2019 18:41:53 +0200 Subject: [PATCH 2/6] More macOS installation documentation --- doc/sphinx/installation.rst | 74 +++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/doc/sphinx/installation.rst b/doc/sphinx/installation.rst index 6a349b67a86..84420b5f73f 100644 --- a/doc/sphinx/installation.rst +++ b/doc/sphinx/installation.rst @@ -121,12 +121,61 @@ After installing the ROCm SDK, please reboot your computer. 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 + + test -e /opt/local/bin/port && echo "MacPorts is installed" + test -e /usr/local/bin/brew && echo "Homebrew is installed" + +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)" + +Installing Packages using MacPorts +++++++++++++++++++++++++++++++++++ + +Run thefollowing commands: + .. code-block:: bash sudo xcode-select --install @@ -141,27 +190,20 @@ following commands: sudo port select --set pip pip37 sudo port select --set mpi openmpi-mp -Alternatively, you can use Homebrew. + +Installing Packages using Homebrew +++++++++++++++++++++++++++++++++++ .. 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 cython boost boost-mpi fftw \ doxygen gsl numpy ipython jupyter brew install hdf5 brew link --force cython pip install PyOpenGL matplotlib -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: - -.. code-block:: bash - - sudo port -f uninstall installed && rm -r /opt/local - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" +Installing CUDA ++++++++++++++++ If your Mac has an Nvidia graphics card, you should also download and install the CUDA SDK [6]_ to make use of GPU computation. From 910df2dc897f97e3f8bb8afcabf634ebeac7c8ef Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Mon, 7 Oct 2019 21:17:08 +0200 Subject: [PATCH 3/6] CMake syntax fix --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca2b935f9bc..48cafaf268e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,7 +336,7 @@ endif(WITH_VALGRIND_INSTRUMENTATION) # MPI # -find_package(MPI REQUIRED 3.0) +find_package(MPI 3.0 REQUIRED) # CMake < 3.9 if(NOT TARGET MPI::MPI_CXX) From 941ad7e670e5c17200b3e1940b2f0a20ef1a2417 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Tue, 8 Oct 2019 09:57:42 +0200 Subject: [PATCH 4/6] rst title levels --- doc/sphinx/installation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/sphinx/installation.rst b/doc/sphinx/installation.rst index 84420b5f73f..8d32aa4d654 100644 --- a/doc/sphinx/installation.rst +++ b/doc/sphinx/installation.rst @@ -122,7 +122,7 @@ Installing Requirements on Mac OS X ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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. @@ -172,7 +172,7 @@ If you want to install Homebrew, use the following commands. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Installing Packages using MacPorts -++++++++++++++++++++++++++++++++++ +"""""""""""""""""""""""""""""""""" Run thefollowing commands: @@ -192,7 +192,7 @@ Run thefollowing commands: Installing Packages using Homebrew -++++++++++++++++++++++++++++++++++ +"""""""""""""""""""""""""""""""""" .. code-block:: bash @@ -203,7 +203,7 @@ Installing Packages using Homebrew pip install PyOpenGL matplotlib Installing CUDA -+++++++++++++++ +""""""""""""""" If your Mac has an Nvidia graphics card, you should also download and install the CUDA SDK [6]_ to make use of GPU computation. From 2b95957d3eb6b6d60c1e4afd4109b1cc80b9cf39 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Tue, 8 Oct 2019 11:56:01 +0200 Subject: [PATCH 5/6] Remove pip from install instructions --- doc/sphinx/installation.rst | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/doc/sphinx/installation.rst b/doc/sphinx/installation.rst index 8d32aa4d654..54aab57d2b3 100644 --- a/doc/sphinx/installation.rst +++ b/doc/sphinx/installation.rst @@ -73,8 +73,8 @@ 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: @@ -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: @@ -174,7 +175,7 @@ If you want to install Homebrew, use the following commands. Installing Packages using MacPorts """""""""""""""""""""""""""""""""" -Run thefollowing commands: +Run the following commands: .. code-block:: bash @@ -183,11 +184,10 @@ Run thefollowing commands: 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 \ + 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 pip pip37 sudo port select --set mpi openmpi-mp @@ -208,19 +208,6 @@ Installing CUDA 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 python dependencies -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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: - -.. code-block:: bash - - pip3 install -r requirements.txt --user --upgrade - .. _Quick installation: Quick installation From f191fb5e0e3d4aadb9dd9a5a43af99c8bc584f00 Mon Sep 17 00:00:00 2001 From: Kai Szuttor Date: Tue, 8 Oct 2019 13:01:10 +0200 Subject: [PATCH 6/6] doc: fix sections. --- doc/sphinx/installation.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/sphinx/installation.rst b/doc/sphinx/installation.rst index 54aab57d2b3..eb7f9f850ff 100644 --- a/doc/sphinx/installation.rst +++ b/doc/sphinx/installation.rst @@ -66,7 +66,7 @@ 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: @@ -120,7 +120,7 @@ After installing the ROCm SDK, please reboot your computer. .. _Installing Requirements on Mac OS X: Installing Requirements on Mac OS X -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Preparation """"""""""" @@ -279,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 @@ -348,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 @@ -563,7 +563,7 @@ 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`. @@ -571,7 +571,7 @@ Some of the above features are marked as EXPERIMENTAL. Activating these features .. _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 @@ -603,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.