Installation Instructions For SPMATH

Configuring Spmath Installation (with tk interface)

Spmath uses an autoconf-generated configure script to prepare and 
search for the appropriate compilers and libraries before generating 
a Makefile.  The configure script will check for various things 
before it outputs the Makefiles:

	1) A C compiler (gcc, cc, etc...)
	2) A C++ compiler (G++, CC, etc...)
	3) A FORTRAN 77 compiler (g77, f77, etc...)
	4) Various FORTRAN libraries
	5) GNU flex
	6) The flex library
	7) GNU bison
	8) The math library
	9) A tcl/tk installation
		- tclsh (the tcl interpretter)
		- libtk and libtcl
		- tclConfih.sh and tkConfig.sh

The libraries actually used to compile spmath may vary from machine 
to machine.

After running configure, it is necessary to add the path to 
libskit.a to the extra_library_paths in the generated Makefile. If
you do not have the SPARSKIT2 library, please visit


http://www.cs.umn.edu/research/arpa/SPARSKIT/sparskit.html


to obtain the sources.

Please note that the configure script is not perfect.  Sometimes
the Makefile it outputs is messy with compiler command-line 
options that can, in the worst case, make the compiler or linker 
choke.  It would seem that the only solution to this problem is
to take a quick peak at the Makefile if any problems arise and
make any needed changes manually.

Configuring Spmath Installation Without tcl/tk

Spmath can be run in command-line mode or tk mode.  If your system 
does not have a tcl/tk installation, then you can build spmath 
without tk support by invoking the configure script with the 
--disable-tk option, like this:

	cd (spmath root directory)
	./configure --disable-tk

Configure will look for everything in the above list except for 
the tcl/tk installation and the resultant Makefile will define an 
extra macro called "NO_TK_COMPILE" that excludes all tk-dependent 
code from being compiled.

Compiling Spmath

If it is necessary to make any manual changes to the Makefile 
becuase of mistakes made by the configure script, then be sure to 
do so to the "Makefile" and not the "Makefile.in."  The Makefile is 
what is invoked by Make, Makefile.in is just a template for the 
configure script.  Any changes that you would like to be preserved 
through seperate executions of the configure script should be 
placed in Makefile.in.

Now run make:

	cd (spmath root directory)
	make

Executing Spmath

Simply invoke the main executable:

	spmath

If spmath is placed somewhere other than the root spmath directory, 
it is necessary that the files "header" and "init.sp" and the 
"manpage/" subdirectory be copied into the same directory with the 
excutable.  Also, if spmath is being run in tk mode, the files 
"spmath.tcl", "procs.tcl", and "view.tcl" (included in the 
distribution) should also be located in the same directory as spmath.

If you compiled the tk version of spmath, then spmath can still be 
run in command-line mode by invoking spmath with the -notk flag:

	spmath -notk

Spmath Startup

Every time spmath is run, it will automatically look in the 
directory it is located for a file named "init.sp" and, if it 
exists, parse and execute its contents.  By default "init.sp" 
contains a few variable definitions that set up some useful default 
parameters for the iterative solver.  However, any valid spmath 
commands can be included in this file, each on a separate line, and 
they too will be executed on startup.  Included here is the original 
text of init.sp:


slvr_solver_name = "gmres"
slvr_prec_name = "ilut"
slvr_prec_args = [10,0.00001]
slvr_prec_type = "right"
slvr_krylov = 30
slvr_maxmult = 100 
slvr_tols = [0.000001, 0.0]


This page was last modified August 14th, 2001 by Ben Langmead