[Yt-svn] commit/yt-doc: chummels: Adding instructions for what to do when you need mpi4py library to faq.

Bitbucket commits-noreply at bitbucket.org
Wed Sep 14 13:52:31 PDT 2011


1 new changeset in yt-doc:

http://bitbucket.org/yt_analysis/yt-doc/changeset/b661fc15f7b9/
changeset:   b661fc15f7b9
user:        chummels
date:        2011-09-14 22:52:18
summary:     Adding instructions for what to do when you need mpi4py library to faq.
affected #:  1 file (1.9 KB)

--- a/source/faq.rst	Mon Sep 12 15:06:57 2011 -0400
+++ b/source/faq.rst	Wed Sep 14 16:52:18 2011 -0400
@@ -72,3 +72,51 @@
 
 to the very top of your ``yt`` script. 
 
+.. _faq-mpi4py:
+
+``yt`` complains that it needs the mpi4py module
+------------------------------------------
+
+For ``yt`` to be able to incorporate parallelism on any of its analysis, 
+it needs to be able to use MPI libraries.  This requires the ``mpi4py``
+module to be installed in your version of python.  Unfortunately, 
+installation of ``mpi4py`` is *just* tricky enough to elude the yt
+batch installer.  So if you get an error in yt complaining about mpi4py like:
+
+.. code-block:: bash
+
+    ImportError: No module named mpi4py
+
+then you should install ``mpi4py``.  The easiest way to install it is through
+the pip interface.  At the command line, type:
+
+.. code-block:: bash
+
+    pip install mpi4py
+
+What this does is it finds your default installation of python (presumably
+in the yt source directory), and it installs the mpi4py module.  If this
+action is successful, you should never have to worry about your aforementioned
+problems again.  If, on the other hand, this installation fails (as it does on
+such machines as NICS Kraken, NASA Pleaides and more), then you will have to
+take matters into your own hands.  Usually when it fails, it is due to pip
+being unable to find your MPI C/C++ compilers (look at the error message).
+If this is the case, you can specify them explicitly as per:
+
+.. code-block:: bash
+
+    env MPICC=/path/to/MPICC pip install mpi4py
+
+So for example, on Kraken, I switch to the gnu C compilers (because yt 
+doesn't work with the portland group C compilers), then I discover that
+cc is the mpi-enabled C compiler (and it is in my path), so I run:
+
+.. code-block:: bash
+
+    module swap PrgEnv-pgi PrgEnv-gnu
+    env MPICC=cc pip install mpi4py
+
+And voila!  It installs!  If this *still* fails for you, then you can 
+build and install from source and specify the mpi-enabled c and c++ 
+compilers in the mpi.cfg file.  See the `mpi4py installation page <http://mpi4py.scipy.org/docs/usrman/install.html>`_ for details.
+

Repository URL: https://bitbucket.org/yt_analysis/yt-doc/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list