================================================

Structured Markov Chains Solver  [ SMCSolver ] 
Dario Bini, Beatrice Meini, Sergio Steffe'
bini@dm.unipi.it, meini@dm.unipi.it, steffe@dm.unipi.it
Dipartimento di Matematica "Leonida Tonelli"
Largo Pontecorvo 5
56127 Pisa
Italy

Version 2.1 - June  2009


===============================================

 SMCSolver (STRUCTURED MARKOV CHAINS SOLVER)

 SMCSolver is a software tool for solving some classes of Markov Chains commonly 
encountered in queuing theory.

 It includes several algorithms to solve  (following Kendall classification) M/G/1 
and GI/M/1-type Markov chains, and quasi-birth-death (QBD) processes.

 The Version 1.1 of this software is part of a joint work presented at SMCTOOLS 2006, 
together with a similar tool written completely in Matlab (R) by Benny Van Houdt.

 In this package all the numerical routines are written in Fortran 90.

 SMCSolver has a  graphical interface written in C using GTK+, for a more user 
friendly access to the Fortran Routines.

 At the present it runs on Linux Workstations only.

 A more detailed description on the Problems, the Algorithms and the Software can be 
found in the papers presented at SMCTOOLS 2006,  PISA 10 October 2006, with Version 1.1.

 Version 2.1 is part of a joint work presented at SMCTOOLS 2009, Pisa 19 October 2009.

 Some documentation can be found in the directory DOC.
==============================================

Compiling SMCSolver_2.1

 You will need:

	--A Linux Workstation, complete with usual development programs like
	--GNU gcc, make, and 
	--libraries and header files of  gtk-2, gthread-2.0 ncurses and librt.
		(pkg-config --modversion  gtk+-2.0 will tell you which version
                 of gtk you have)
	--A Fortran 95 Compiler like Lahey/Fujitsu (R) lf95, of Intel (R) Fortran 
             Compiler ifort, or NAG f90, or GNU g95, or gfortran.
	--BLAS, LAPACK, and LAPACK95 Fortran Libraries, compiled with your Fortran
             Compiler, can be used; otherwise a minimum set of the BLAS, LAPACK,
             LAPACK95 routines is included in the directory min_blas_lapack and
             will be compiled and used.
	--the SMCSolver_2.1 sources (get the tgz from one of the authors by e-mail,
                 or from http://bezout.dm.unipi.it/SMCSolver/)

 Untar the sources, and change the Makefile and the make.inc uncommenting the lines 
for your Fortran Compiler and commenting the lines for different Fortran Compilers.

 Remember that the variables BLAS_LAPACK_LIB_DIR and BLAS_LAPACK_MOD_DIR must point 
to the directory containing your BLAS, LAPACK, LAPACK95 libraries and modules, or 
must point to ./min_blas_lapack for the compilation of included  selected set of 
BLAS, LAPACK, LAPACK95 routines.
 Remember that usually the linker requires that a library has a name beginning with 
lib (like libblas.a or liblapack.a ) and refers to it with the flags -I (capital i 
- for modules directory), -L (for library directory), -l (lowercase l - for 
libraries, like -lblas -llapack)

Files make.inc.lf95 make.inc.ifort make.inc.nag make.inc.g95 make.ic.gfortran are 
provided as samples of working configurations.


	make 
		will compile the program SMCSolver;
	make clean  
		will delete modules, objects and the executable but not
		the blas, lapack, lapack95 libraries.
	make cleanall
		will detete all modules, objects, libs, and executable.
 	
	Several warnings from the compilers are normal.

 Errors in compilation can arise from several situations:

	--if required, Fortran Compiler will compile a minimum selection of
blas, lapack and lapack95 routines.
	
	--gcc wil compile  11 C files, without linking. An error 
at this stage may point to missing headers or non standard gcc on your Linux 
installation, or corrupt source files.

	--then the Fortran Compiler will compile the 18 Fortran90 files of our program. 
It may fail if the Fortran Compiler lines in the Makefile are not correct for your compiler.
	
	--last step, the Fortran Compiler has to link all the objects with both 
static and run time libraries, and this may fail if some library is not available, 
or if some option in Makefile is not correct for your Fortran Compiler.

 The compiled program SMCSolver will need several shared run time libraries to execute
and will not start if some of these are missing. Moreover several icons and graphical 
details of the windows are loaded dinamically from files of the running host by gtk-2.

 Note that several Linux distributions have buggy gfortran implementations: if 
 (using gfortran as compiler) the program compiles but the run command does not 
 produce any output, sometimes disabling the optimization flag -O and recompiling 
 (make cleanall, make) works.

Changing fonts, colors, etc.. etc.. is possible configuring .SMCSolverrc file. The
syntax is the same of the gtkrc files. Some samples .SMCSolverrc-xx files are provided.
If the file is missing, fonts and colors are the standard ones.

==============================================

See the file BUGS for the e-mail addresses for reporting any problem.

==============================================

