Wavefront Visualization
Using coNCePTuaL to draw space-time diagrams

Although the C+MPI backend is coNCePTuaL's workhorse, coNCePTuaL does come with a variety of other backends. Not all of them generate code. In fact, one of most unique—and useful—coNCePTuaL backends is not a code generator but a code visualizer.

Space-time diagram of a wavefront communication pattern

The adjacent space-time diagram was drawn automatically by the coNCePTuaL compiler using the latex_vis backend. The only human intervention utilized was to convert the generated Encapsulated PostScript file into a format more suitable for embedding on a Web page. The latex_vis backend uses the LaTeX typesetting system with the PSTricks graphics package to help visualize a coNCePTuaL program's communication pattern by drawing it as a space-time diagram. The compiler was run as follows:

$ ncptl --backend=latex_vis --filter='s/sep=30bp/sep=20bp/g' wavefront.ncptl --tasks=9 --width=3 --height=3 --reps=1

The --filter option postprocesses the intermediate LaTeX code to reduce the image's row and column separation from 30 PostScript points to 20 PostScript points. The arguments following wavefront.ncptl are all arguments to the wavefront program.

The latex_vis backend has proven to be extremely useful for debugging coNCePTuaL programs. For example, a space-time diagram may show communication operations being serialized when the programmer intended them to run in parallel (or vice versa); or, it may reveal an incorrect number of messages sent between tasks or an incorrect set of senders or receivers.

In any case, being able to automatically convert a description of a communication pattern to an illustration of it is a useful capability in its own right. Even users who are uncomfortable replacing C benchmarks with coNCePTuaL once may want to use the latex_vis backend to create figures for papers, technical reports, Web sites, or other explanatory material.

Summary

  1. coNCePTuaL can not only compile source code to an executable format but can also compile it to a space-time diagram that illustrates the program's communication pattern.
  2. These space-time diagrams help explain communication patterns and are suitable for immediate inclusion in a document.
  3. coNCePTuaL's space-time diagrams also are useful for debugging because they help visualize the communication pattern that a program actually implemented.
Scott Pakin, pakin@lanl.gov