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

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

Version 2.2 - March 2024

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

 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.

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

Version 2.2

Changes in gcc e gfortran (starting with version 10) require a correction in several
headers, as duplicate definitions are not allowed any more.
NAG Fortran Compiler, G95, Lahey Fortran Compiler are no more available.
ifort is deprecated and will be discontinued late 2024.  Intel suggest to use ifx.
In version 2.2 we have  therefore to change some headers e some make.inc.
Almost no other change in the software.

(we are using gcc and gfortran 12.2.0 or ifort 2021.11.1 20231117 or ifx 2024.0.2 20231213)


We did compile and test this release on some machines:

1. old bezout: dual Xeon (32 bit) 6GB RAM
Suse Linux 9.1 (i586) architecture i386, with gcc 3.3.3 and 
	Lahey Fortran lf95 Lahey/Fujitsu Fortran 95 Compiler Release L6.20c (make.inc.lf95)
	Intel Fortran ifort Version 8.1 (make.inc.ifort-old)

2. new volterra: Xeon(R) W-2145 with 64GB RAM
Debian 12.4 (x86_64) architecture amd64 with gcc 12.2.0 or clang 14.0.6 and
	Intel Fortran ifort 2021.11.1 (oneapi) (make.inc.ifort-old)
	Intel Fortran ifx 2024.0.2  (oneapi) (make.inc.clang-ifx) (make.inc.ifx)
	gfortran 12.2.0 (make.inc.gfortran=make.inc.default)
(nota: ifx con ottimizzazione non funziona, bug noto di ifx su linux)

3. new wallis: Core(TM)2 Duo CPU E8500, 8GB RAM
Debian 11.8, architecture amd64 with gcc 10.2.1 or clang 11.0.1-2 and
	Intel Fortran ifort 2021.11.1 (oneapi)
	Intel Fortran ifx 2024.0.2  (oneapi)
	gfortran 10.2.1

4. volterra-dell-notebook: i5-5300U, 16GB RAM
Ubuntu 18.04.6 LTS, architecture amd64 with gcc 7.5.0 or clang 6.0.0-1ubuntu2 and
	gfortran 7.5.0	
==============================================

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

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

