You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Peter Colberg 341f69b14a Query processor name 3 years ago
..
CHANGES.html Update release notes 3 years ago
CHANGES.mdwn Update release notes 3 years ago
INSTALL.html Update release notes 3 years ago
INSTALL.mdwn Update release notes 3 years ago
Makefile Add release notes 4 years ago
README.html Update copyright notice 3 years ago
README.mdwn Diffusion equation 4 years ago
contents.mdwn Update copyright notice 3 years ago
diffusion_1d.svg Diffusion equation 4 years ago
index.html Update copyright notice 3 years ago
index.mdwn Add documentation in HTML format 4 years ago
lua-mpi.png Initialise MPI for Lua 5 years ago
lua-mpi.ps Initialise MPI for Lua 5 years ago
pandoc.css Update copyright notice 3 years ago
pandoc.html.in Add documentation in HTML format 4 years ago
reference.html Query processor name 3 years ago
reference.mdwn Query processor name 3 years ago

README.mdwn

---
title: User's Guide
---

Tutorial
--------

The following program prints a message from each process:

~~~ {.lua}
local mpi = require("mpi")

local comm = mpi.comm_world
local rank = comm:rank()
local size = comm:size()

print("Hello, world, from rank "..rank.." of "..size.."!")
~~~

Diffusion equation
------------------

*This example requires the [HDF5 library with MPI support] and [HDF5 for Lua].*

The program `diffusion_1d.lua` solves the 1-dimensional [diffusion equation
by finite differences].

Execute the program with the desired number of processes:

~~~
mpirun -np 8 ./diffusion_1d.lua diffusion_1d.h5
~~~

Plot the time evolution of the 1-dimensional diffusion equation:

~~~
./diffusion_1d.py diffusion_1d.pdf diffusion_1d.h5
~~~

![Time evolution of 1-dimensional diffusion equation for initial
rectangular density distribution.](diffusion_1d.svg)

[HDF5 library with MPI support]: http://www.hdfgroup.org/HDF5/PHDF5/
[diffusion equation by finite differences]: http://www.me.ucsb.edu/~moehlis/APC591/tutorials/tutorial5/
[HDF5 for Lua]: http://colberg.org/lua-hdf5/


References
----------

#. [MPI Documents](http://www.mpi-forum.org/docs/docs.html)
#. [Open MPI Documentation](http://www.open-mpi.org/doc/v1.8/)