IPython Parallel is the IPython API for parallel computing. We will set it up to use MPI for message passing. We may have to set environment variables as follows:
$ export LC_ALL=en_US.UTF-8 $ export LANG=en_US.UTF-8
Issue the following command at the command line:
$ ipython profile create --parallel --profile=mpi
The preceding command will create a file in our home directory, which can be found at
Add the following line in this file:
c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'
Start a cluster that uses the MPI profile as follows:
$ ipcluster start -–profile=mpi --engines=MPI --debug
The preceding command specifies that we are using the
mpi profile and MPI engine with ...