Debug Python in Style

I’m happy to introduce PuDB, a full-screen, console-based visual debugger for Python that I recently cooked up.

Download it here

Or install it simply by typing

easy_install pudb

into your Unix shell. Here’s a screenshot of it in action:

PuDB screenshot

Python has had decent debugging support for a while now, in the form of

  • Pdb, the command-line debugger that comes with the interpreter
  • Winpdb, a very nice GUI debugger
  • IDEs such as Eric

But I felt that there was a gap between these offerings—Pdb being very austere, and Winpdb and the IDEs being rather heavyweight. I wanted a comfortable debugger that’s easily usable in a shell and doesn’t require me to touch my mouse. PuDB uses Ian Ward’s excellent Urwid library for its interaction with the console.

Git Commit Timelines

Here’s a waste of time I could just not resist: MIT’s Project SIMILE has released a rather nice Timeline Web Widget. Combine that with GitPython and a bit of glue code in Python, and you get a neat, one-page summary of the software work I’ve done as part of working towards my PhD. Here’s a screenshot if you’re too lazy to click through:

timeline-shot.png
timeline-shot.png

Note that (nearly) every commit is hyperlinked to the git web frontend, where you can view what was actually changed—just click the title text in the popup bubble.

If you’d like to do this yourself, the code is available, you can get it with

git clone http://git.tiker.net/trees/commit-timeline.git

1 Billion seconds on this Earth

Happy 109-day to me!

date -d'NNNN-NN-NN + 1000000000 seconds'
Mo 13. Apr 01:46:40 EDT 2009

World Builder

From the department of “what’s Andreas wacthing on Vimeo”: Here’s something amazing you can apparently do with one day of filming and two years of post-production.


World Builder from Bruce Branit on Vimeo.

One thing I could especially relate to about this video is the feeling of time-constrained emptiness at the beginning… If you’ve tinkered with creating video games, you probably know what I’m talking about. Research is somehow not too different.

Credit Crisis? What Credit Crisis?

If you haven’t been living under a rock, you’ve probably heard about the global economic meltdown. You’ll probably have also listened to people explain it, maybe even understood what’s going on. Regardless, this video I recently found sums it up again very nicely:


The Crisis of Credit Visualized from Jonathan Jarvis on Vimeo.

boostmpi: Initial Release

I’m happy to announce the initial public release of boostmpi, an MPI wrapper for Python.

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.

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

CodePy: Initial public Release

I’m happy to announce the initial public release of CodePy, a native-code Metaprogramming toolkit for Python.

The idea is the following:

  • You build a string that is actually C code.
  • CodePy compiles it, links it, and dynamically loads it into the Python interpreter.

Ta-da: Instant native-code performance, with no explicit pre-compilation step. CodePy can also help you with the generation of the code, by letting you build a data structure and turning that into C code. CodePy works well with Boost.Python and PyCuda. In conjunction with the latter, it offers an easy way of doing GPU Metaprogramming, a very effective tuning technique for the GPU.

Talk slides: PyCuda@MIT

Nicolas Pinto at MIT was nice enough to invite me over to give a talk in their CUDA class. I made a bunch of slides that I think are of general interest to people who are interested in PyCuda. You can find them here.

Submitted: "Nodal Discontinuous Galerkin Methods on Graphics Processors"

Tim Warburton, Jeff Bridge, my advisor Jan Hesthaven and I have recently submitted an article detailing our efforts to accelerate Discontinuous Galerkin computations by using Nvidia CUDA GPUs. DG seems to be a good fit for these machines.

Get it while it’s hot: Arxiv, Brown SC reports

Abstract

Discontinuous Galerkin (DG) methods for the numerical solution of partial differential equations have enjoyed considerable success because they are both flexible and robust: They allow arbitrary unstructured geometries and easy control of accuracy without compromising simulation stability. Lately, another property of DG has been growing in importance: The majority of a DG operator is applied in an element-local way, with weak penalty-based element-to-element coupling.

The resulting locality in memory access is one of the factors that enables DG to run on off-the-shelf, massively parallel graphics processors (GPUs). In addition, DG’s high-order nature lets it require fewer data points per represented wavelength and hence fewer memory accesses, in exchange for higher arithmetic intensity. Both of these factors work significantly in favor of a GPU implementation of DG.

Using a single US$400 Nvidia GTX 280 GPU, we accelerate a solver for Maxwell’s equations on a general 3D unstructured grid by a factor of 40 to 60 relative to a serial computation on a current-generation CPU. In many cases, our algorithms exhibit full use of the device’s available memory bandwidth. Example computations achieve and surpass 200 gigaflops/s of net application-level floating point work.

In this article, we describe and derive the techniques used to reach this level of performance. In addition, we present comprehensive data on the accuracy and runtime behavior of the method.

Boost Numeric Bindings 20081116

I’ve just rolled release 20080816 of the bindings, with the following stuff changed:

  • Fix asserts in gbsv.hpp as suggested by Vardan.
  • Sync Thomas’s remaining fixes.
  • Apply patch to gels* from Naoki at http://mathema.tician.de/node/391.
  • Remove duplication in lapack_names.h.
  • Fix line endings in Jesse’s gelsd stuff.
  • Add obvious improvements from current bindings svn.
  • Modify sync procedure even more.
  • Apply Thomas’s sync patch.
  • Update boost update procedure.
  • Apply Thomas’s svn sync patches.
  • Karl’s geev fix.
  • Followed Thomas’s idea of sygv->hegv.
  • Reduce diff with svn, step 4.
  • Reduce diff with svn, step 3.
  • Reduce diff with svn, step 2.
  • Reduce diff with svn, step 1.
  • Fix diff command.
  • Install to boost-numeric-bindings.
  • Bart Janssen’s UMFPACk bug fix.
  • Add missing checks for BOOST_NUMERIC_POOR_MANS_TRAITS in blas1.hpp.

I’m happy to report that the diff with the official bindings has shrunk to just Vardan’s gbsv and Jesse’s gels* stuff. I think that’s pretty great, and in no small part due to Thomas’s work on getting stuff merged.