?? readme
字號:
Information on the machine-dependent files follows in the next three
subsections.
On an IBM PC clone, the source code would be on a floppy disk. Use
xcopy a:* meschach
to copy it to the meschach directory. Then ``cd meschach'', and then
compile the source code. Different compilers on MSDOS machines will
require different installation procedures. Check the directory meschach
for the appropriate ``makefile'' for your compiler. If your compiler is
not listed, then you should try compiling it ``by hand'', modifying the
machine-dependent files as necessary.
Worst come to worst, for a given C compiler, execute
<C compiler name> *.c
on MS-DOS machines. For example,
tcc *.c
for Turbo C, and
msc *.c
for Microsoft C, or if you are using Quick C,
qcl *.c
and of course
cc *.c
for the standard Unix compiler.
Once the object files have been generated, you will need to combine them
into a library. Consult your local compiler's manual for details of how to
do this.
When compiling programs/routines that use Meschach, you will need to
have access the the header files in the INCLUDE directory. The INCLUDE
directory's contents can be copied to the directory where the
programs/routines are compiled.
The files in the DOC directory form a very brief form of documentation
on the the library routines in Meschach. See the printed documentation for
more comprehensive documentation of the Meschach routines. This can be
obtained from the authors via email.
The files and directories created by the machines.shar shell archive
contain the files machine.c machine.h and makefile for a particular
machine/operating system/compiler where they need to be different. Copy
the files in the appropriate directory for your machine/operating
system/compiler to the directory with the Meschach source before compiling.
c) makefile
This is setup by using the configure script on a Unix system, based on
the makefile.in file. However, if you want to modify how the library is
compiled, you are free to change the makefile.
The most likely change that you would want to make to this file is to
change the line
CFLAGS = -O
to suit your particular compiler.
The code is intended to be compilable by both ANSI and non-ANSI
compilers.
To achieve this portability without sacrificing the ANSI function
prototypes (which are very useful for avoiding problems with passing
parameters) there is a token ANSI_C which must be #define'd in order to
take full advantage of ANSI C. To do this you should do all compilations
with
#define ANSI_C 1
This can also be done at the compilation stage with a -DANSI_C flag.
Again, you will have to use the -DANSI_C flag or its equivalent whenever
you compile, or insert the line
#define ANSI_C 1
in machine.h, to make full use of ANSI C with this matrix library.
d) machine.h
Like makefile this is normally set up by the configure script on Unix
machines. However, for non-Unix systems, or if you need to set some things
``by hand'', change machine.h.
There are a few quantities in here that should be modified to suit your
particular compiler. Firstly, the macros MEM_COPY() and MEM_ZERO() need to
be correctly defined here. The original library was compiled on BSD
systems, and so it originally relied on bcopy() and bzero().
In machine.h you will find the definitions for using the standard ANSI C
library routines:
/*--------------------ANSI C--------------------*/
#include <stddef.h>
#include <string.h>
#define MEM_COPY(from,to,size) memmove((to),(from),(size))
#define MEM_ZERO(where,size) memset((where),'\0',(size))
Delete or comment out the alternative definitions and it should compile
correctly. The source files containing memmove() and/or memset() are
available by anonymous ftp from some ftp sites (try archie to discover
them). The files are usually called memmove.c or memset.c.
Some ftp sites which currently (Jan '94) have a version of these files are
munnari.oz.au (in Australia), ftp.uu.net, gatekeeper.dec.com (USA), and
unix.hensa.ac.uk (in the UK). The directory in which you will find
memmove.c and memset.c typically looks like .../bsd-sources/lib/libc/...
There are two further machine-dependent quantities that should be set.
These are machine epsilon or the unit roundoff for double precision
arithmetic, and the maximum value produced by the rand() routine, which is
used in rand_vec() and rand_mat().
The current definitions of these are
#define MACHEPS 2.2e-16
#define MAX_RAND 2.147483648e9
The value of MACHEPS should be correct for all IEEE standard double
precision arithmetic.
However, ANSI C's <float.h> contains #define'd quantities DBL_EPSILON
and RAND_MAX, so if you have an ANSI C compiler and headers, replace the
above two lines of machine.h with
#include <float.h>
/* for Real == float */
#define MACHEPS DBL_EPSILON
#define MAX_RAND RAND_MAX
The default value given for MAX_RAND is 2^31 , as the Pyramid 9810 and
the SPARC 2's both have 32 bit words. There is a program macheps.c which
is included in your source files which computes and prints out the value of
MACHEPS for your machine.
Some other macros control some aspects of Meschach. One of these is
SEGMENTED which should be #define'd if you are working with a machine or
compiler that does not allow large arrays to be allocated. For example,
the most common memory models for MS-DOS compilers do not allow more than
64Kbyte to be allocated in one block. This limits square matrices to be no
more than 9090 . Inserting #define SEGMENTED 1 into machine.h will mean
that matrices are allocated a row at a time.
4. SAMPLE TESTS
There are several programs for checking Meschach called torture
(source: torture.c) for the dense routines, sptort (source: sptort.c) for
the sparse routines, ztorture (source ztorture.c) for a complex version of
torture, memtort (source memtort.c) for memory allocation/deallocation,
itertort (source itertort.c) for iterative methods, mfuntort (source
mfuntort.c) for computing powers of dense matrices, iotort (source
iotort.c) for I/O routines. These can be compiled using make by "make
torture", "make sptort", etc. The programs are part of meschach0.shar.
5. OTHER PROBLEMS
Meschach is not a commercial package, so we do not guarantee that
everything will be perfect or will install smoothly. Inevitably there will
be unforeseen problems. If you come across any bugs or inconsistencies, please
let us know. If you need to modify the results of the configure script, or
need to construct your own machine.h and makefile's, please send them to
us. A number of people sent us the machine dependent files for Meschach 1.1,
but with the use of configure, and the new information needed for version
1.2, these machine dependent files don't have quite the right information.
Hopefully, though, they are redundant. Non-Unix platforms at present
require ``manual'' installation. Because of the variety of platforms
(MS-DOS, Macintosh, VAX/VMS, Prime, Amiga, Atari, ....) this is left up to
the users of these platforms. We hope that you can use the distibutable
machine-dependent files as a starting point for this task.
If you have programs or routines written using Meschach v.1.1x, you
should put the statement
#include "oldnames.h"
at the beginning of your files. This is because a large number of the
names of the routines have been changed (e.g. "get_vec()" has become
"v_get()"). This will enable you to use the old names, although all of the
error messages etc., will use the new names. Also note that the new
iterative routines have a very different calling sequence. If you need the
old iterative routines, they are in oldmeschach.shar.
If you wish to let us know what you have done, etc., our email
addresses are
david.stewart@anu.edu.au
zbigniew.leyk@anu.edu.au
Good luck!
ACKNOWLEDGMENTS
Many people have helped in various ways with ideas and suggestions.
Needless to say, the bugs are all ours! But these people should be thanked
for their encouragement etc. These include a number of people at
University of Queensland: Graeme Chandler, David De Wit, Martin Sharry,
Michael Forbes, Phil Kilby, John Holt, Phil Pollett and Tony Watts. At the
Australian National University: Mike Osborne, Steve Roberts, Margaret Kahn
and Teresa Leyk. Karen George of the University of Canberra has been a
source of both ideas and encouragement. Email has become significant part
of work, and many people have pointed out bugs, inconsistencies and
improvements to Meschach by email. These people include Ajay Shah of the
University of Southern California, Dov Grobgeld of the Weizmann Institute,
John Edstrom of the University of Calgary, Eric Grosse, one of the netlib
organisers, Ole Saether of Oslo, Norway, Alfred Thiele and Pierre
Asselin of Carnegie-Mellon Univeristy, Daniel Polani of the University of
Mainz, Marian Slodicka of Slovakia, Kaifu Wu of Pomona, Hidetoshi
Shimodaira of the University of Tokyo, Eng Siong of Edinburgh, Hirokawa Rui
of the University of Tokyo, Marko Slyz of the University of Michigan, and
Brook Milligan of the University of Texas. This list is only partial, and
there are many others who have corresponded with us on details about
Meschach and the like. Finally our thanks go to all those that have had to
struggle with compilers and other things to get Meschach to work.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -