This part of the document discusses pragmatic issues of using GPH. It is something like a GPH User's Guide. Here we will talk you through the basics of compiling GPH, running, and profiling GPH programs.
The most recent version of GUM is available from our FTP server. The file README.GUM discusses details about contents in that directory and about installation. The naming convention of the bundles is "GUM-version-date-id-hwos.type"
version version of the RTS (currently 4.06)
date date of the snapshot as ddmmyy
id src, snap or bin (for binary bundles)
hwos hardware and OS as determined via the hw_os script
type file type (usually tgz)
Use the flag -parallel for compilation. In the simplest case do something like
gum-4.06 -parallel -fvia-C -fglasgow-exts -o foo_mp foo.hs |
If you use strategies in your program (import Strategies) use -syslib concurrent. Don't worry about the `initialization discards `const'' warnings. A set of example programs including makefiles is shipped separately as gum-4.06-test-prgs.tgz.
Before executing a GPH program, you must use PVM to configure your parallel virtual machine. A Dummies Guide to GPH is part of the GHC User's Guide.
After that execute your program using the following RTS flags (c stands for a character, n for an integer value):
-qPc | 0, g, empty | Generate an execution profile that can be processed with the visualisation tools. |
-qpn | 1,..,256 | The number of processors to use (there is a hardwired constant in the RTS for the max number of PEs possible). |
-qhn | 0,.. | Packing scheme (0 means full sub-graph packing; n means pack at most n-1 non-root thunks into a packet). See [IFL00-PAPER] for a discsussion of these notions. |
-qgn> | 0,1 | Globalisation scheme (0 means full globalisation; 1 means normal-form only globalisation). See [IFL00-PAPER] for a discsussion of these notions. |
-qen> | Spark pool size. | |
-qtn> | Thread pool size. |
There are many more options in the RTS. They really should be documented.
Once you have generated a profile from a parallel execution of your program, you can use the profiling tools to make some sense of its dynamic behaviour. The relevant tools are:
The visualisation tools are discussed in more detail in the GranSim Users's Guide.