Skip to content

Chunkers

Oliver Stueker edited this page May 5, 2015 · 2 revisions

There is a natural tree structure to many output files, especially log files, which is determined by (usually nested) subroutine calls. We wish to translate this into CMLModules.

The structure of a complete log file is complex, but many fall into the structure:

where has a natural coherence, usually defined by the first set of subroutine calls. (Note, of course that we sometimes have to guess this in closed source codes).

A subroutine often maps directly onto a module structure, something like (please correct my FORTRAN)

If we add print statements such as:

The output will look like

This should be captured something like:

Ideally this should be managed through FoX calls in the code, but without these we have to use textual clues to identify the modules. If the subroutine output clear start and (even more importantly) end messages this process is straightforward. Code that don't can be very difficult.

A good example of chunks in in Gaussian* where they are called "links" (a historic term relating to limited memory machines where code had to be swapped in an out). Mots other major codes have similar chunks but they may be less obvious.

Chunks are usually complete high-level operations. They might include:

 * initialisation
 * optimisation
 * final analysis
 * frequency analsys
 * nmr shift calculations
 * thermodynamic calcs

... These chunks contain finer grains. They could be further chunked into sub-chunks or passed to a Block analyzer. The division between blocks and chunks is somewhat arbitrary, but in general only full log files have chunks.

Clone this wiki locally