Welcome to the homepage of MC# language! User's guide (MC#.Cluster v. 1.17)
MC# Project
Home page 
MC# language 
Documentation 
Publications 
 Code examples 
FAQ 

 
Downloads
MC# Programming 
System
 

 
Related links
Parallel C# 
Polyphonic C# 
SKIF Project 

 
Contacts
 Contacts 


Mono powered

Microsoft .Net powered


 
   [ 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 and Work Node Service).
Also it contains some cluster management utils and examples
of programs written in MC# language.

SYSTEM REQUIREMENTS:
_______________________________________________________
>= Mono 1.1.9.1
rsh or configured ssh

OPERATING SYSTEMS:
_______________________________________________________
Red Hat >= 8.0, Mandrake 9.1/x86, SuSE >= 8.2

INSTALLATION:
_______________________________________________________
1. Untar the archive into the folder ~/mcsharp (or any other folder)

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

If you use bash, you can do it by adding the following lines 
into files "~/.bashrc" and "~/.bashrc_profile" in the following order:

export MCSHARPPATH=/home/yourhomedir/mcsharp
export MONO_PATH=$MCSHARPPATH/bin:$MONO_PATH
export PATH=$MCSHARPPATH/bin:$PATH

Please note, that this environments must be added to the both files!
Also make sure that the $HOME variable is set properly on your system!

3. Compilation (It's supposed that mcs (Mono) and gcc (C++ compiler)
had 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"

 Installer will also create the file "~/.mcsharp/.wnport" and will write
 there the number of any free port on your system. This port will be used
 in future for Work Node Services on all nodes of your cluster.
 You can change this port manually by changing file "~/.mcsharp/.wnport"

 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', 'ssh' or possibly other types of rsh-compatible
remote shells for initialization on the nodes of cluster.
rsh/ssh must be configured for transparrent logging into the nodes of the cluster
from frontend.
There's a 'mcsboot' utility 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.

ADDITIONAL TOOLS
_______________________________________________________
To find out which nodes are being used by MC# Runtime now use 'mcsnodes' command.
It prints the list of nodes.

To execute some task on all nodes of your cluster use command 'do-all'.
For example:
 do-all killall -9 mono

This command will kill all mono applications on your cluster.

Note: 'do-all' utility executes the same command on all nodes that are listed in file
$MCSHARPPATH/bin/nodes.

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).

Note:
 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

This will start program in local mode, i.e. movable methods will be executed as new threads.
No network operations will occur.

Distributed mode:
 mono fib.exe 35 /np 35

This will start program in distributed mode on 35 processors.
In this case movable methods will be transferred across the network.


You can leave your comments and suggestions on our site at
http://u.pereslavl.ru/~vadim/MCSharp/

Or contact directly with:

Yury P. Serdyuk                       Vadim B. Guzev
Yury@serdyuk.botik.ru                 vadim@u.pereslavl.ru
ICQ: #330402764                       ICQ: #62951762
Responsible for Compilers             Responsible for Runtimes



Take care and thanks for your time,
Developers of MC#
 

Весь Переславль