Welcome to the homepage of MC# language! User's guide (v. 2.1)
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


 
   [ Версия этой страницы на русском языке ]
=======================================================
 USER'S GUIDE (v 2.1)
=======================================================


This package contains the second version of Runtime system and compiler
for MC# language fo *nix platforms (mcsharp.dll library, Resource Manager, 
emulator of worknodes). Also it contains some cluster management utils.
Also, this archive contains some examples written in MC# language.

System requirements:
_______________________________________________________
Mono 0.29
>= Java 1.2
rsh

Operating systems:
_______________________________________________________
Red Hat 8.0, Red Hat 9.0/x86, 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
$MCSHARPLIB - the location of Runtime library (mcsharp.dll)
$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-16.jar 
             and antlr.jar library

If you use bash, you can do it by adding the following lines 
into file ~/.bashrc:

export MCSHARPPATH=/home/yourhomedir/mcsharp
export MCSHARPLIB=$MCSHARPPATH/lib/mcsharp.dll
export MONO_PATH=$MONO_PATH:$MCSHARPPATH/lib:$MCSHARPPATH/bin
export PATH=$MCSHARPPATH/bin:$PATH
export CLASSPATH=$MCSHARPPATH/compiler/mcsharp-compiler-1.2-16.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

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"

_______________________________________________________

Programs, compiled with mcsharp.dll library can be executed either  
autonomously (local mode) or in distributed mode on the cluster.
In the second case you should specify the key '/d' (or '/distribute').

By default, user's programs are executed in local mode, i.e. as simple 
exe-applications. In that case there's no neccessity to launch the Resource
Manager and emulators of worknodes. It can be very convenient for 
writing and debugging simple applications.


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
 
Please note, that compiler currently supports only one MC#-file in 
the parameters list at a time. However, you can compile them into DLLs 
and then include all of them as it was shown above. 

Another rule is that .mcs file must always preceed .cs file in parameters list!
 
Starting user's compiled programs
_______________________________________________________

Local mode:
 mono fib.exe 35
 
Distributed mode:
 mono fib.exe 35 /np 35 /d
or
 mono fib.exe 35 -np 35
(parameter /d can be omitted when /np is specified)

If the Resource Manager isn't located on the local host,
you can specify the location:
 mono fib.exe 35 /np 5 /h=rmhostname:rmportname
 



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


Thanks for your time!
The developers of MC# language.

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