My Software

PyVisfile

Pyvisfile allows you to write a variety of visualization file formats, including

  • Kitware's XML-style Vtk data files.
  • Silo visualization files, as introduced by LLNL's MeshTV and more recently used by the VisIt large-scale visualization program.

pyvisfiles supports many mesh geometries, such such as unstructured and rectangular structured meshes, particle meshes, as well as scalar and vector variables on them. In addition, pyvisfile allows the semi-automatic writing of parallelization-segmented visualization files in both Silo and Vtk formats. For Silo files, pyvisfile also supports the writing of expressions as visualization variables.

pyvisfile can write Vtk files without any extra software installed.

To use pyvisfile to create Silo files, you need libsilo as well as Boost.Python and PyUblas. To build pyvisfile's Silo support, please refer to the PyUblas documentation for build instructions first. Check the VisIt source page for the latest Silo source code.

Obtaining PyVisfile

You may download PyVisfile from its Python Package Index page as well as directly from my source control archive. Installation instructions are included in the documentation.

Documentation

PyVisfile has a manual that also contains installation instructions.

Examples

Examples of visualizations resulting from files written by PyVisfile (and its predecessor package, pylo) can be seen on my research gallery page.

PyOpenCL

PyOpenCL lets you access the OpenCL parallel computation API from Python. Here's what sets PyOpenCL apart:

  • Object cleanup tied to lifetime of objects. This idiom, often called RAII in C++, makes it much easier to write correct, leak- and crash-free code.
  • Completeness. PyOpenCL puts the full power of OpenCL’s API at your disposal, if you wish.
  • Convenience. While PyOpenCL's primary focus is to make all of OpenCL accessible, it tries hard to make your life less complicated as it does so--without taking any shortcuts.
  • Automatic Error Checking. All OpenCL errors are automatically translated into Python exceptions.
  • Speed. PyOpenCL’s base layer is written in C++, so all the niceties above are virtually free.
  • Helpful, complete documentation and a wiki.
  • Liberal licensing (MIT).

Documentation

See the PyOpenCL Documentation.

Support

Having trouble with PyOpenCL? First, you may want to check the PyOpenCL Wiki. If that doesn't help, maybe the nice people on the PyOpenCL mailing list can.

Download

Download PyOpenCL here.

Or get it directly from my source code repository by typing

git clone http://git.tiker.net/trees/pyopencl.git

You may also browse the source.

Prerequisites: All you need is an OpenCL implementation. And Python obviously.

Iterative CUDA

Iterative CUDA is a CUDA-based C++ package containing iterative solvers for sparse linear systems. To use it, you would:

  • assemble a matrix in memory in Compressed Sparse Row (CSR) format
  • feed it to Iterative CUDA, which computes a decomposition and copies it onto the GPU
  • call iterative CUDA to solve Ax=b on that matrix. (uses the Conjugate Gradient method, but can be easily extended to other methods)

Iterative CUDA is based on the following excellent pieces of software:

The goal is to turn Iterative CUDA into "yet another solver library", except that the solution is actually performed on the GPU (and hence faster than the CPU by a factor between five and ten).

Note: If you are a PyCUDA user, you need not worry--a more flexible version of this functionality is also available in recent development versions of PyCUDA.

Getting the Code

Iterative CUDA is licensed under the MIT/X11 Consortium license. Other software components contained in Iterative CUDA, as indicated above, have slightly different licenses.

Documentation

See the Wiki. This has build instructions. Usage examples are available in the source distribution under example.

CodePy

CodePy is a C/C++ metaprogramming toolkit for Python. It handles two aspects of native-code metaprogramming:

  • Generating C/C++ source code.
  • Compiling this source code and dynamically loading it into the Python interpreter.

Both capabilities are meant to be used together, but also work on their own. In particular, the code generation facilities work well in conjunction with PyCuda. Dynamic compilation and linking are so far only supported in Linux with the GNU toolchain.

Documentation

See the Manual.

Support

Having trouble with CodePy? Feel free to shoot me an email.

Download

CodePy may be downloaded from its Python Package Index page or obtained directly from my source code repository by typing

git clone http://git.tiker.net/trees/codepy.git

You may also browse the source.

CodePy has no prerequisites other than Python 2.4. Some additional functionality is available if Boost.Python is installed, which is part ofBoost C++ (any recent version should work).

boostmpi Python Module

NOTE: I've mostly discontinued maintenance of this package. It turns out mpi4py is a far better and more capable MPI wrapper. In the medium to short term, I would suggest switching any code depending on boostmpi to mpi4py.

boostmpi is a high-quality Python wrapper around the Message Passing Interface (MPI). MPI is a standardized interface to libraries such as OpenMPI and MPICH that provide high-performance inter-process communication for distributed-memory computing.

boostmpi uses the Boost.MPI library, which gives MPI a very usable C++ interface. This C++ interface is then made accessible to Python via the Boost.Python library.

boostmpi was originally distributed as part of the Boost C++ library. This separate distribution aims to make the software more accessible.

Credits

boostmpi (born as Boost.MPI.Python) is the work of Doug Gregor. I just do maintenance and distribution work around here.

Documentation

See the boostmpi Documentation.

Support

Having trouble with boostmpi? Just send me an email.

Download

boostmpi may be downloaded from its Python Package Index page or obtained directly from my source code repository by typing

git clone http://git.tiker.net/trees/boostmpi.git

You may also browse the source.

PyCUDA

PyCUDA lets you access Nvidia‘s CUDA parallel computation API from Python. Several wrappers of the CUDA API already exist–so what's so special about PyCUDA?

  • Object cleanup tied to lifetime of objects. This idiom, often called RAII in C++, makes it much easier to write correct, leak- and crash-free code. PyCUDA knows about dependencies, too, so (for example) it won’t detach from a context before all memory allocated in it is also freed.
  • Convenience. Abstractions like pycuda.driver.SourceModule and pycuda.gpuarray.GPUArray make CUDA programming even more convenient than with Nvidia’s C-based runtime.
  • Completeness. PyCUDA puts the full power of CUDA’s driver API at your disposal, if you wish.
  • Automatic Error Checking. All CUDA errors are automatically translated into Python exceptions.
  • Speed. PyCUDA’s base layer is written in C++, so all the niceties above are virtually free.
  • Helpful Documentation.

Documentation

See the PyCUDA Documentation.

If you'd like to get an impression what PyCUDA is being used for in the real world, head over to the PyCUDA showcase.

Support

Having trouble with PyCUDA? Maybe the nice people on the PyCUDA mailing list can help.

Download

PyCUDA may be downloaded from its Python Package Index page or obtained directly from my source code repository by typing

git clone http://git.tiker.net/trees/pycuda.git

You may also browse the source.

Prerequisites:

  • Boost (any recent version should work)
  • CUDA (version 2.0 beta or newer)
  • Numpy (version 1.0.4 or newer)

Pylo

NOTE: Pylo has been retired in favor of PyVisfile.

Pylo allows you to write Silo visualization files, as introduced by LLNL's MeshTV and more recently used by the VisIt large-scale visualization program.

Pylo supports the majority of datatypes allowed in Silo files, such as unstructured and rectangular structured meshes, particle meshes, as well as scalar and vector variables on them. In addition, Pylo supports expressions of scalar variables and semi-automatic writing of parallelization-segmented Silo files.

Pylo uses Boost.Python and depends on PyUblas.

Obtaining Pylo

You may download Pylo from its Python Package Index page as well as directly from my source control archive. Installation instructions are included in the documentation.

Documentation

Pylo has a manual that also contains installation instructions.

Examples

Examples of visualizations resulting from files written by Pylo can be seen on my resarch gallery page.

Pymbolic

Pymbolic is a small symbolic manipulation library. Two things set it apart from other libraries of its kind:

  • Users can easily write their own symbolic operations, simply by deriving from the builtin visitor classes.
  • Users can easily add their own symbolic entities to do calculations with.

Pymbolic currently understands regular arithmetic expressions, derivatives, sparse polynomials, fractions, term substitution, expansion. It automatically performs constant folding, and it can compile its expressions into Python bytecode for fast(er) execution.

If you are looking for a full-blown Computer Algebra System, look at sympy or PyGinac. If you are looking for a basic, small and extensible set of symbolic operations, pymbolic may well be for you.

More information and downloads are availble at the Pymbolic PyPI page.

You can also check Pymbolic out from source control.

PyTools

Pytools is a big bag of things that are "missing" from the Python standard library. This is mainly a dependency of my other software packages, and is probably of little interest to you unless you use those. If you're curious nonetheless, here's what's on offer:

  • A ton of small tool functions such as len_iterable, argmin, tuple generation, permutation generation, ASCII table pretty printing, Michele Simionato's decorator module, GvR's mokeypatch_xxx() hack, the elusive flatten, and much more.
  • A time-series logging module, pytools.log.
  • Batch job submission, pytools.batchjob.
  • A lexer, pytools.lex.

More info and downloads are available at the PyTools PyPI page.

You may also check pytools out of my source control.

Synoptic

Synoptic is "GMail for your notes". It gives you an efficient and friendly interface that makes it possible to keep and categorize a large number of small-ish notes and tidbits of information.

The following features set it apart:

  • Fully versioned. Never deletes anything, ever. If you want to go back to a previous version of something, just drag that slider up there in the top-left corner.

  • Super-simple Navigation. Adaptive tag clouds, support for the forward/back button on your browser, query links, support for browser bookmarks. All to make sure you can find that note when you need it.

  • Powerful searching. Synoptic is meant to keep large note collections manageable and accessible. You can search for items based on tags, their creation time, or even search through their full text. Plus arbitrary logical combinations of them, using the logical operatos and, or, and not.

  • Easy Markup. Synoptic uses Markdown to allow you to type formatted notes easily and quickly. Plus, there are a few extensions to facilitate typing math.

  • Advanced Features. A lot of refinement work has gone into making Synoptic work as seamlessly as possible. You may never notice many of these refinements, because they're meant to make stuff work like it's supposed to.

Download

Installation is simple:

$ # install setuptools, if necessary
$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ sudo python ez_setup.py

$ # install synoptic
$ sudo easy_install synoptic

You may also ownload synoptic from its PyPI page. synoptic requires Python 2.4 (as of 0.91.1). Further more, you can browse synoptic's source control and check out a copy for yourself using

git clone http://git.tiker.net/trees/synoptic.git

And finally, here's the screen shot you've been waiting for:

synoptic-screen.png
synoptic-screen.png