When the system is successfuly installed, it is the time to use it. In this chapter are described all neccessary steps.
3.1 Executables & Required Files
3.1.1 Parent
3.1.2 Child
3.2 Run
3.2.3 Parameter File
3.3 Control
3.3.1 Console Shell (consh)
3.4 Monitoring
All binary files of the Antares package are situated in the directory summary. There are situated binary files of the system kernel and its utilities, X-Windows programs and also demo applications of the system.
File | Description |
parent | main kernel process |
child | kernel process providing computation |
consh | console shell for the kernel control |
diffusion.pf | demo application parameter file for kernel to be run parallely |
classic.pf | demo application parameter file for kernel to be run serially |
dynamic.pf | demo application parameter file for kernel to be run serially |
train | utility for neural network training |
check | utility for checking a trained neural network |
xparam | parameter file editor (X-Windows) |
rviewer | utility for result visualization (X-Windows) |
kimarthy | population grid monitor of parallel computation (X-Windows) |
kihistogram | population quality monitor (X-Windows) |
kijerry | parallel state monitor (X-Windows) |
This is, roughly speaking, the heart of the system kernel. This program starts and controls the computation of child processes. It accepts the commands sent by the consh application and it collects the result populations.
The syntax of the parent binary file:
parent [ -t<type> ] [ <host> <host> ... ]
Where:
Important notes:
Child process is the computation unit of the system kernel. It evolves the population and fulfils the parallelization. It is spawned by the parent process. You will never need to run the child process binary file directly.
To run the system kernel you have to initialize it with a valid parameter file. This special file has to contain all necessary information about the problem to be solved and about genetic algorithm and parallelisation settings. We recommend you to use prepared demo application parameter files for kernel initialisation (see the chapters 3.2.1 and 3.2.2). The demonstration parameter files correspond with the parameter files used during the performance test (see System Overview for details). For the parameter file syntax see the chapter 3.2.3. If you are ready to experiment, there is the list of important parameters prepared.
The parallel computation demonstration is specified in parameter file diffusion.pf situated in directory summary. This file includes files *.diffusion.pf situated in directory summary/params. This demonstration is performed as a computation of four child proceses using the diffusion technique of cooperation.
The serial computation demonstration is specified in parameter files classic.pf and dynamic.pf situated in directory summary. File classic.pf includes files *.classic.pf situated in directory summary/params. File dynamic.pf includes files *.dynamic.pf situated in directory summary/params. These demonstarations are performed as a computation of a single child proceses.
3.2.1.1 Parameters
3.2.1.2 Groups
3.2.1.3 Directives
3.2.1.4 Comments
3.2.1.5 Complete example
Parameter File is a text file with a special format. The idea of the format follows:
We strongly recommend to use the xparam utility to edit the parameters, however a situation may arise when you would wish to edit the parameters manually. A description of the syntax of such a file follows.
Each parameter is specified by its unique name. It is necessary to define the parameter's data type and its value. Also a caption can be specified as a flag, if the parameter can be changed during the run of the whole system. The type specification must be defined before the value definition appears. The definitions are specified by the parameter name, underline sign, keyword and equal sign followed by the definition.
An example:
DemoParameter_Type=String
DemoParameter_Value=Hello world
DemoParameter_Caption=Just a demo
DemoParameter_Change=Yes
The keywords are
Keyword |
Description (what this line of parameter specifies) |
Type |
type of value |
Value |
value |
Caption |
caption or description of the parameter |
Change |
flag if the parameter can be changed during the run |
The type specifiers are:
Type |
Description |
Possible Values |
Example |
String |
classical array of characters |
any, except the \0 |
What a magic |
Integer |
one integer number |
any integer, signed or not |
42 |
Float |
one real number |
any real number, signed or not |
3.14 |
Bool |
boolean value |
TRUE, FALSE |
FALSE |
Prob |
a fixed point number |
a number with 7 decimals precision |
53.16% |
Fit |
fitness value |
a real number from range <0,1 |
0.9999 |
Char |
single character |
any character |
A |
The definition of change can be Yes or No. If the definition does not exists Yes is taken as a default value.
The groups should simplify the orientation in the text file. They are also used by the Parameter editor to place the parameters onto a different sheets. Sometimes they can also speed up the access to the parameter inside the program.
The definition is quite simple: the group starts with a groupname enclosed in brackets and all the following parameters belong to the group.
[Our first group]
Directives can be specified at the beginning of he file . Only one directive is supported right now . It is a directive #include. It causes the specified file to be icluded into the ParamFile structure.
The parameters of the directive are:
1) the filename closed in the quotation marks ("")
2) optionally :
Otherwise the file is opened in the same way as the file containing the directive.
#include "DemoFile.ini"
Comments are just an explanation for the reader. Every line of comment begins with a semicolon (;).
;Look at this comment
Every comment before a first parameter definition is considered as a file comment. All others are a part of the last defined parameter (comments can be in the middle of the definition).
;This is a demo
#include "File1"
;Open as read-only
#include "File2" R
;always write back
#include "File3" W
[First group]
DemoParameter_Type=String
DemoParameter_Value=Hello world
DemoParameter_Caption=Just a demo
DemoParameter_Change=Yes
[Second group]
P1_Type=Fit
P1_Value=0.65
;You see no caption
P2_Type=Prob
P2_Caption=Success chance
P2_Value=95.5%
You can control the behaviour of the system kernel even during its computation using the application consh.
3.3.2.1 What is Console Shell
3.3.2.2 Commands
3.3.2.3 Known Bugs
Console shell is a simple tool which serves to control the computation from an ordinary UNIX command line. It supports nearly all commands from the control interface of the kernel. It offers satisfactory level of control over it. It is able to initialize, to start, to stop, to pause and to abort the computation. On the other side it cannot retrieve any kind of data neither from the kernel or children. Other components are designed to serve this purpose.
Basic feedback from the kernel (and children) is also made possible through supported event interface. Both information text and error messages are displayed.
Batch jobs can be processed by invoking the shell with the name of the batch description file as a parameter.
Console shell is case sensitive.
Here is the list of commands console shell can understand:
3.4.1.1 Console Shell
3.4.1.2 X Windows applications
3.4.1.3 Log Files
The console shell can monitor the state of kernel through the command state.
The system kernel has its internal state defined in every moment of its execution. This states determine the behaviour of the kernel. A change of the internal state is performed as a reaction on user's command or can be evoked by an internal event e.g. an internal error.
Fig. 3-2 represents the scheme of the kernel state development with respect to the user's commands and internal events. There exist six user commands: INIT, START, PAUSE, STOP, ABORT and EXIT. Except for the last command are commands valid only in certain states, as noted in the fig. 3.4-1. Only the command EXIT is valid in every state of the kernel. In addition there are two possible internal events: an internal error and the satisfaction of the termination condition.
Fig. 3-3 contains the complete list of the kernel states with the description of kernel external behaviour and actions performed by the change of the state. Note that the data interface of the kernel is available just in states RUNNING, PAUSED and ERROR. So the user can monitor the kernel only in these states. In the last two states is the computation stopped and the data interface refreshed by a timer (set to 10 seconds). So the frequency of the information refresh is reduced, while the kernel is in state PAUSED or ERROR.
State |
Internal constant |
Description |
READY |
KS_READY |
Kernel is clean and ready to initialize and run. No kernel application is present and parameters are not set. Only parent process exits. |
INITIALIZED |
KS_INITIALIZED |
Kernel has been initialized successfully, all child processes have been spawned and parameters have been set. |
RUNNING |
KS_RUNNING |
Kernel is computing the genetic algorithm. The data interface is available. The refresh frequency of information through the data interface is normal. |
PAUSED |
KS_PAUSED |
The computation of genetic algorithm has been stopped temporarily by the user or when the termination condition was fulfilled. The data interface is available. The refresh frequency of information through the data interface is reduced. |
STOPPED |
KS_STOPPED |
The computation of genetic algorithm has been stopped by the user. Child processes have terminated and their results have been collected and stored. |
ERROR |
KS_ERROR |
Something went wrong and an internal error event was encountered. The achieved results are stored and computation is aborted. The data interface is available, but is not quarantined to be consistent. The refresh frequency of information through the data interface is reduced. |
The fig. 3-4 presents all possible state-command combinations. Command sent to a kernel in wrong state is ignored.
|
state |
(dis)connect |
init |
start |
pause |
stop |
quit |
exit |
parchange |
onepch |
READY |
+ |
+ |
+ |
|
|
|
|
+ |
|
|
INITIALIZED |
+ |
+ |
|
+ |
|
|
|
+ |
|
|
RUNNING |
+ |
+ |
|
|
+ |
+ |
+ |
+ |
+ |
+ |
PAUSED |
+ |
+ |
|
|
+ |
+ |
+ |
+ |
+ |
+ |
STOPPED |
+ |
+ |
+ |
|
|
|
|
+ |
|
|
ERROR |
+ |
+ |
|
|
|
|
|
+ |
|
|
There are special X Windows applications, that can monitor events and states of the system kernel computation in a user-friendly way. A detailed description of these applications can be found in Appendices part of this book. The only thing to mention now is: they cannot be run successfully without the parent process already running.
Both the parent process and child processes reports the most important information into two text files. These files are journal.log for important state changes and failure.log for failure information. These files generated by the parent process are placed into the summary directory. The files generated by a child process can be found in your home directory.