Logo: lash (lambda hash)
 
  Main  
 

Compiling and running Eden programs

Compiling programs

You can compile Eden programs with parallel support (only for GHC-Eden) with the Options:
-parcp
This option triggers a copy based implementation of the communication layer. It is usable only on shared memory systems, e.g. multicores.
-parpvm
To use PVM as middleware. This option is only available if you have built the GHC-Eden compiler with support for PVM.
-parmpi
To use MPI as middleware. This option is only available if you have built the GHC-Eden compiler with support for MPI.
There is also a threaded simulation of Eden available which will not give you the performance of the parallel runtime system. To use it, compile with:
no option
to use GHC's default runtime system (single threaded).
-threaded
for GHC's threaded runtime system, which manages multiple OS threads.
To enable event logging support, compile with additional option -eventlog (see also the RTS-options beneath). You can also use some native GHC flags like O2 for optimization or -debug for debugging support.

If you want to change flags use -fforce-recomp to force recompilation.

Setting up the parallel System (PVM and MPI only)

Using PVM:
You need to boot PVM with the command pvm <hostfile> prior to run Eden programs which where compiled with the -parpvm option. Each line of the optionally given hostfile contains a host name. The pvm command starts the PVM console - the most important commands here are help, halt (stops pvmds), quit (exit console), reset (kill all tasks), add (add hosts) and conf (list hosts). To run a program, exit the pvm-console with quit and use the system console.
Using MPI:
MPI-Hosts are usually specified and connected during startup of the parallel program (except LAM-MPI which uses lamboot prior to the program run). You can specify a hostfile with the runtime option MPI@<file>. If this option is not set, Eden looks for a file called mpihosts in the working directory. Each line of the hostfile contains a host name. Apart from specifying sole host names, you can define slots for processes (here Edens virtual machines) for each host. The syntax to specify the those slots for each host is MPI-implementation specific:
OpenMPI:
Slots are specified after a host name using the keywords slots and max-slots. slots defines how many virtual machines are generated on this machine before other machines in the file are used. When all machines are used, OpenMPI reuses the host list "round robin" to instantiate further virtual machines. max-slots defines the overall maximum number of virtual machines on a host.
host1 slots=2 maxslots=4
host2 slots=4 maxslots=8
...
MPICH:
The number of slots are specified after a machine name delimited by ":". The behavior is comparable to maxslots in OpenMPI. When all machines of the host file are used, MPICH reuses the host list "round robin" to instantiate further virtual machines. The slots define the maximum number of virtual machines for each machine.
host1:4
host2:8
...

How to run compiled programs

If you have build a program with parallel support enabled, then the executable is replaced by a start script. Use this script instead of the executable.
For Windows:
The script is a .vbs script, don't use the .exe file.
The compiler output accepts not only program arguments, but also runtime system options, which are enclosed in
+RTS <your options> -RTS
Using these options, you can control the behaviour of your program, e.g. on how many nodes in your parallel system it executes, process placement policy etc.

RTS-Options for Eden programs
RTS-Option Effect
-N<n> Specify, how many machines (<n>) to include in the computation (default: no. of PVM/MPI-nodes; 1 for -parcp)
-MPI@<file> Specify a host file for MPI (default: mpihosts)
-qQ<n> Set buffer size for messages to <n> Bytes (default: 32K).
-qq<n> Set the number of buffers for messages to <n> (default: 20, not used for PVM).
-ls Enable event logging for EdenTV (works only if your program was build with the -eventlog flag).
-qremote Avoid placing child processes on the same PE
-qrnd Enable random process placement (i.e. not round-robin)

Get a complete list of available RTS options by typing

./myprogram +RTS -?
 
 
Philipps-Universität Marburg

Eden - Parallel Functional Programming. E-Mail
Fb. 12 - Mathematik und Informatik, Hans-Meerwein-Straße, D-35032 Marburg

This page: http://www.mathematik.uni-marburg.de/~eden

Last change: 06/11/12