Skip to content

Commit

Permalink
Fix Xentica manual (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
a5kin committed Jun 23, 2019
1 parent 528450c commit cbffb3a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 36 deletions.
27 changes: 14 additions & 13 deletions docs/manual/installation.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
Installation Instructions
=========================

**Xentica** is planned to run with several GPU backends in future,
**Xentica** is planned to run with several GPU backends in the future,
like *CUDA*, *OpenCL* and *GLSL*. However, right now, only *CUDA* is
supported.

.. warning::
If your GPU is not CUDA-enabled, this guide is **not** for
you. Framework will just not run, no matter how hard you try. You
may check the `list of CUDA-enabled cards`_, if you have any doubts.
you. The framework will just not run, no matter how hard you try.
You may check the `list of CUDA-enabled cards`_ if you have any
doubts.

.. note::
This page currently containing instructions only for Debian-like
systems. If you are on other system, you still can use links to
This page is currently containing instructions only for Debian-like
systems. If you are on another system, you still can use links to
pre-requisites in order to install them. If so, please contact us
by `opening an issue`_ on GitHub. We could help you if you'll meet
some troubles during installation, and also your experience could
Expand All @@ -22,16 +23,16 @@ Core Prerequisites
------------------

In order to run CA models without any visualization, you have to
correctly install following software.
correctly install the following software.

- `NVIDIA CUDA Toolkit`_

Generally, you can install it just from your distrubution's repository::
Generally, you can install it just from your distribution's repository::
sudo apt-get install nvidia-cuda-toolkit

Although, default packages are often out of date, so in case you
have one of those latest cool GPU, you may want to upgrade to the
Nevertheless, default packages are often out of date, so in case you
have one of those latest cool GPUs, you may want to upgrade to the
latest CUDA version from `official NVIDIA source`_. We'll hint you
with a `good article`_ explaining how to do it. But you are really
on your own with this stuff.
Expand Down Expand Up @@ -84,8 +85,8 @@ Then, to install stable Kivy::

pip3 install Cython==0.25 Kivy==1.10.0

On latest Debian distributions you can meet conflicts with
``libsdl-mixer``. Then, try to install latest developer version,
On the latest Debian distributions you can meet conflicts with
``libsdl-mixer``. Then, try to install the latest developer version,
like::

pip3 install Cython==0.27.3 git\+https://github.com/kivy/kivy.git
Expand All @@ -100,13 +101,13 @@ Xentica package could be installed with::

pip3 install xentica

Note, it does not depends on pre-requisites described above, but you
Note, it does not depend on pre-requisites described above, but you
still need to install them properly, or Xentica will not run.

Run Xentica examples
--------------------

In order to run Game of Life model built with Xentica::
In order to run the Game of Life model built with Xentica::

pip3 install moire
wget https://raw.githubusercontent.com/a5kin/xentica/master/examples/game_of_life.py
Expand Down
44 changes: 22 additions & 22 deletions docs/manual/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Prerequisites
-------------

Our test suite is based on `tox`_. It allows us to run tests in all
supported Python environments with a single ``tox`` command, and also
automates checks for package build, docs, coverage, code style and
supported Python environments with a single ``tox`` command and also
automates checks for package build, docs, coverage, code style, and
performance.

So, in order to run Xentica tests you at minimum have to set up CUDA
environment properly (as described above), and install ``tox``::
So, in order to run Xentica tests you at minimum have to set up the
CUDA environment properly (as described above), and install ``tox``::

pip3 install tox

If you are planning to run full test suite, you also need to install
If you are planning to run the full test suite, you also need to install
all necessary Python interpreters: 3.5-3.7 and pypy3, along with dev
headers to build numpy and pycuda.
headers to build NumPy and PyCUDA.

On Ubuntu, regular Python interpreters are available with amazing
On Ubuntu, regular Python interpreters are available with the amazing
`deadsnakes`_ repo::

sudo add-apt-repository ppa:deadsnakes/ppa
Expand All @@ -27,7 +27,7 @@ On Ubuntu, regular Python interpreters are available with amazing
sudo apt-get install python3.6 python3.6-dev
sudo apt-get install python3.7 python3.7-dev

Pypy3 however comes `in binaries`_ (make sure you download latest)::
Pypy3, however, comes `in binaries`_ (make sure you downloaded the latest)::

wget -q -P /tmp https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-linux64.tar.bz2
sudo tar -x -C /opt -f /tmp/pypy3.5-v7.0.0-linux64.tar.bz2
Expand All @@ -48,12 +48,12 @@ Or, if you are using ``optirun``::

optirun tox

For the first time, it would take an amount of time to download /
install environtments and all its dependencies. Tox will automatically
set up all necessary stuff for you, including numpy and
pycuda. Subsequent runs should be much quicker, as everything is
already set up. In developer's environment (Ubuntu 18.04) it takes ~42
sec to finish the full test suite.
For the first time, it would take an amount of time to
download/install environments and all its dependencies. Tox will
automatically set up all necessary stuff for you, including NumPy and
PyCUDA. Subsequent runs should be much quicker, as everything is
already set up. In the developer's environment (Ubuntu 18.04) it takes
~42 sec to finish the full test suite.

If you run tests often, it would also be helpful to get less verbose
output. For that, you could execute a strict version of tox::
Expand All @@ -64,24 +64,24 @@ Or if you'd like to skip all uninstalled interpreters::

tox -s

Or even quicker, for immediate test purposes, you could run your
default Python3 interpreter tests only with codestyle and coverage::
Or even quicker, for immediate test purposes, you could run the
default Python3 interpreter tests only with code style and coverage::

tox -q -e flake8,coverage

You could also check the full list of available environments with::

tox -l -v

If you don't mind, please update us with the metrics under "Benchmark"
section, along with the info about your GPU, environment and Xentica
version. It would help us analyze performance and plan for future
optimizations.
If you don't mind, please update us with the metrics under the
"Benchmark" section, along with the info about your GPU, environment
and Xentica version. It would help us analyze performance and plan for
future optimizations.

.. note::
When planning for pull request in core Xentica repo, it is a good
When planning for a pull request in core Xentica repo, it is a good
practice to run a full test suite with ``tox -q``. It
will be accepted at minimum if everything is green =)
will be accepted at least if everything is green =)

.. _tox: https://tox.readthedocs.io/en/latest/
.. _deadsnakes: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Tutorial
========

Tutorial is coming soon. Meanwhile, you may check the official Game Of
The tutorial is coming soon. Meanwhile, you may check the official Game Of
Life example.

.. literalinclude:: ../../examples/game_of_life.py

0 comments on commit cbffb3a

Please sign in to comment.