|
|
[ The same page in Russian ]
=======================================================
USER'S GUIDE
=======================================================
This package contains the compiler and Runtime system for the
MC#.Cluster platform for *nix platforms (mcsharp.dll library, Resource Manager).
Also it contains some cluster management utils and examples
of programs written in MC# language.
System requirements:
_______________________________________________________
>= Mono 1.1.6
>= Java 1.2
rsh or configured ssh
Operating systems:
_______________________________________________________
Red Hat >= 8.0, Mandrake 9.1/x86, SuSE >= 8.2
Installation:
_______________________________________________________
1. Unzip the archive into the folder ~/mcsharp
2. Add the following environment variables:
$MCSHARPPATH - the main directory of MC# is located here
$MONO_PATH - Mono will search for assemblies in these directories
$PATH - add here the directory ~/mcsharp/bin
$CLASSPATH - add here the path to mcsharp-compiler-1.2-33.jar
and antlr.jar library
If you use bash, you can do it by adding the following lines
into file ~/.bashrc (or in some cases in ~/.bashrc_profile):
export MCSHARPPATH=/home/yourhomedir/mcsharp
export MONO_PATH=$MONO_PATH:$MCSHARPPATH/lib:$MCSHARPPATH/bin
export PATH=$MCSHARPPATH/bin:$PATH
export CLASSPATH=$MCSHARPPATH/compiler/mcsharp-compiler-1.2-33.jar:$MCSHARPPATH/compiler/antlr.jar
Make sure that the $HOME variable is set properly on your system!
3. Compilation (It's supposed that Mono and Java has already been installed
on your system).
cd ~/mcsharp
make all
Note: Installer will create the file "~/.mcsharp/.rmport" and will write
there the number of any free port on your system. Resource Manager will
use this port in the future to communicate with other nodes.
You can change this port manually by changing file "~/.mcsharp/.rmport"
Note: If you want to use ssh (instead of rsh that is used by default)
or any other program for starting tasks on other nodes create
file ~/.mcsharp/.accesstype and type in the command.
_______________________________________________________
Programs, compiled with MC# compiler can be executed either
autonomously (local mode) or in distributed mode on the cluster.
In the second case you should specify the number of processors -
key '/np' (or '-np').
By default, user's programs are executed in local mode, i.e. as simple
exe-applications. In that case it isn't necessary to launch the Resource
Manager and emulators of worknodes. It can be very convenient for
writing and debugging applications locally, before you launch them on
productions servers.
Initialization of Runtime
_______________________________________________________
This version of runtime uses 'rsh' for initialization on the nodes of cluster.
rsh must be configured for transparrent logging into the nodes of the cluster
from frontend.
There's a 'mcsboot' util in this package for cluster initialization.
It has only one optional parameter - the name of the file, that contains
the names of the cluster nodes (each node must be on the separate line).
File $MCSHARPPATH/bin/nodes will be loaded when this parameter is omitted.
Usage example:
mcsboot $MCSHARPPATH/bin/nodes
or
mcsboot
Finalization of Runtime
_______________________________________________________
When you finished your work with the cluster, you should finalize the
Runtime on the nodes. Command 'mcshalt' is dedicated for this task.
Compilation of programs written in MC#
_______________________________________________________
In this package there's a compiler called 'mcsc' for
compilation of MC# programs. There're two stages of compilation:
- MC#-code is translated into C# code
- C# code is compiled by 'mcs' compiler (from Mono platform).
Node:
all parameters for 'mcsc' compiler are passed to C# compiler (mcs)
Examples of usage
mcsc fib.mcs
mcsc fib.mcs /out:myfib.exe
mcsc /t:library fib.mcs
You can compile MC# programs into DLLs
mcsc a.mcs /t:library /out:a.dll
Then you can include it into the program
mcsc /r:a.dll b.mcs
You can mix MC# and C# files
mcsc a.mcs b.cs
Or compile several MC# files at a time
mcsc a.mcs b.mcs
Starting user's compiled programs
_______________________________________________________
Local mode:
mono fib.exe 35
Distributed mode:
mono fib.exe 35 /np 35
If the Resource Manager isn't located on the host where you start your
MC# application, you can specify the location:
mono fib.exe 35 /np 5 /h=rmhostname:rmportname
You can leave your comments and suggestions on our site at
http://u.pereslavl.ru/~vadim/MCSharp/
Thanks for your time!
The developers of MC# language.
|