SDVM-applications (*.sda and *.C)
An SDVM application consists of two parts:
- The code description file (.sda for "SDVM application")
In this file, several parameters concerning the SDVM program to be run are stored. These are as follows:
- name - The application name. This name is taken as prefix for the files containing the microthreads.
- code_directoryName - Here the compiled microthread files are stored.
- source_directoryName - Here the source code of the microthread files is stored. Only needed if a machine participates in the cluster for which no compiled microthread is available.
- code_distribution_strategy - Possible parameters: NET or NFS; NET will tell the SDVM to transfer microthread code in messages, too, NFS will tell the SDVM that the microthread code can always be found on the local filesystem (e.g. through a mounted netfilesystem).
- recover_thread - The microthread ID of the recover thread. If the program crashes, this is the microthread which is to be started to read a checkpoint and recover the application. It can be set to 1, forcing the SDVM to always restart the whole application.
- numparams n - Number of parameters to be given to the SDVM application at start time
- param <parameter> - A parameter for the SDVM application. There must be <numparams> lines specifying the parameters to be passed to the SDVM application
An example .sda-File:
name primes
code_directoryName ./SDVM-Applications/Primes/
source_directoryName ./SDVM-Applications/Primes/
code_distribution_strategy NET
recover_thread 5
numparams 2
param 500
param 10 |
| | Listing: primes.sda |
The meaning is as follows:
- The application to be started is named primes, making this the prefix of the files containing the microthreads.
- The microthread code of the application to be run can be found in ./SDVM-Programs/Primes/ in its binary form. The source code resides in the same directory.
- The needed code won't be available locally on all participating sites, thus it should be fetched by network rather than searched on the local hard disk (this applies to all sites except the site the program is started on, of course).
- The microthread ID of the recover microthread is 5.
- The application gets 2 parameters at start time, which are 50 and 10. The meaning of these values depends on the application. In this case, it tells the application to find the first 50 primes, looking in chunks of 10 numbers in parallel. (For details about this example application, see here.)
- The microthreads (.C)
The microthreads are given to the SDVM as C source code (in .C files) or compiled for one or more specific platforms (so the files have a corresponding suffix).
There exists a source code file for each microthread. The naming conventions can be set in the SDVM's configuration files. Typical names are e.g. primes_1.C, primes_2.C, and primes_3.C for the example application's microthreads 1, 2, and 3, resp.
If no (for the local platform) compiled version the microthreads is found at run time, the source code will be used to compile it on the fly. The compiled version will then be stored and given to other sites which need the compiled code as well.
An example SDVM application
... can be found here.
How to run applications on the SDVM
... is explained here.
Home -
Installation -
Configuration -
Running applications -
The frontend -
Writing your own applications -
Concepts -
An example SDVM application -
Animation
|