| 1 |
<!-- rcsid="$Id: index.html,v 1.35 2010/08/12 05:40:09 fetk Exp $" --> |
| 2 |
<!-- ===================================================================== --> |
| 3 |
<!--#include virtual="../../include/head.html"--> |
| 4 |
<!-- ===================================================================== --> |
| 5 |
|
| 6 |
<object class="largeFonts"> |
| 7 |
MALOC User's Guide |
| 8 |
</object> |
| 9 |
|
| 10 |
<br /> |
| 11 |
<br /> |
| 12 |
|
| 13 |
Version 0.1 |
| 14 |
|
| 15 |
<br /> |
| 16 |
<br /> |
| 17 |
|
| 18 |
<b>Table of Contents</b> |
| 19 |
<ol> |
| 20 |
<li> <a href="#overview">Overview</a></li> |
| 21 |
<li> <a href="#resources">Information and Resources</a></li> |
| 22 |
<li> <a href="#download">Obtaining MALOC</a></li> |
| 23 |
<li> <a href="#faq">Frequently Asked Questions</a></li> |
| 24 |
<li> <a href="#install">Installation Instructions</a></li> |
| 25 |
<li> <a href="#author">Author Information</a></li> |
| 26 |
<li> <a href="#license">Copyright and Terms of Use</a></li> |
| 27 |
<li> <a href="#gpl">GNU GPL</a></li> |
| 28 |
</ol> |
| 29 |
|
| 30 |
<i> |
| 31 |
NOTE: |
| 32 |
</i> |
| 33 |
This documentation provides information about installation, configuration, |
| 34 |
and general usage of the MALOC libraries. |
| 35 |
Information about the programming interface provided by the MALOC software |
| 36 |
can be found in the <a href="api/html/index.html" target="_blank">Programmer's Guide</a>. |
| 37 |
|
| 38 |
<br /> |
| 39 |
<br /> |
| 40 |
<!-- ===================================================================== --> |
| 41 |
<hr /> |
| 42 |
<br /> |
| 43 |
|
| 44 |
<b><a name="overview">Overview</a></b> |
| 45 |
|
| 46 |
<br /> |
| 47 |
<br /> |
| 48 |
MALOC (Minimal Abstraction Layer for Object-oriented C) is a small, |
| 49 |
portable, abstract C environment library for object-oriented |
| 50 |
C programming. |
| 51 |
MALOC is used as the foundation layer for a number of scientific |
| 52 |
applications, including MC, SG, and APBS. |
| 53 |
MALOC can be used as a small stand-alone abstraction environment for |
| 54 |
writing portable C programs which need access to resources which |
| 55 |
are typically architecture-dependent, such as INET sockets, timing routines, |
| 56 |
and so on. |
| 57 |
MALOC provides abstract datatypes, |
| 58 |
memory management routines, timing routines, machine epsilon, |
| 59 |
access to UNIX and INET sockets, MPI, and so on. |
| 60 |
All things that can vary from one architecture to another are abstracted out |
| 61 |
of an application code and placed in MALOC. |
| 62 |
To port the application code to a new architecture, only the small MALOC |
| 63 |
library needs to be ported (usually just "./configure ; make"). |
| 64 |
MALOC takes the pain of varying UNIX (and Win32) platforms with |
| 65 |
differing library and header layous completely out of the |
| 66 |
software development picture. |
| 67 |
|
| 68 |
<br /> |
| 69 |
<br /> |
| 70 |
MALOC is a class library written in |
| 71 |
<a href="#cooc">Clean OO C</a>. |
| 72 |
"Clean" refers to the fact that the language |
| 73 |
is both legal C++ and legal ANSI/ISO/Standard C, and can be compiled |
| 74 |
with any standard C or C++ compiler. |
| 75 |
"OO" refers to the programming style employed -- object-oriented. |
| 76 |
An Clean OO C implementation consists of a set of "Objects" |
| 77 |
(Clean C structs) which are operated on by a collection of "methods" |
| 78 |
(Clean C subroutines) which always have a pointer to the Object as their |
| 79 |
first argument. This special argument is always written as "thee", |
| 80 |
analogous to the implicit "this" pointer in C++. |
| 81 |
(An Clean OO C implementation can be turned into a C++ implementation |
| 82 |
with a simple AWK/SED or Perl Script.) |
| 83 |
As a result of this Clean OO C implementation, MALOC can be used as a set |
| 84 |
of C++-like class libraries, it can be safely software engineered into other |
| 85 |
large software packages, and it can be built on just about any UNIX-like |
| 86 |
platform with either a C or a C++ compiler, including e.g. Linux, IRIX, |
| 87 |
and Win32. |
| 88 |
To use some of the graphics and parallel computing features, your platform |
| 89 |
must also have some form of standard INET sockets (WINSOCK will work). |
| 90 |
MALOC is easily buildable from source on any UNIX-like system, and uses a |
| 91 |
GNU autoconf build environment. |
| 92 |
|
| 93 |
<br /> |
| 94 |
<br /> |
| 95 |
<!-- ===================================================================== --> |
| 96 |
<hr /> |
| 97 |
<br /> |
| 98 |
|
| 99 |
<b><a name="resources">Information and Resources</a></b> |
| 100 |
|
| 101 |
<br /> |
| 102 |
<br /> |
| 103 |
Detailed information about MALOC can be found in the |
| 104 |
<a href="index.html">User's Guide</a> |
| 105 |
and |
| 106 |
<a href="api/html/index.html">Programmers's Guide</a>. |
| 107 |
|
| 108 |
<br /> |
| 109 |
<br /> |
| 110 |
While MALOC is itself a self-contained software package, it is one of several |
| 111 |
components of |
| 112 |
FETK |
| 113 |
(the Finite Element ToolKit). |
| 114 |
FETK |
| 115 |
consists of the |
| 116 |
following components written in Clean OO C: |
| 117 |
<ul> |
| 118 |
<li> MALOC - Minimal Abstraction Layer for Object-oriented C programs.</li> |
| 119 |
<li> PUNC - Portable Understructure for Numerical Computing.</li> |
| 120 |
<li> GAMer - Geometry-preserving Adaptive MeshER (uses MALOC).</li> |
| 121 |
<li> SG - Socket Graphics mesh display tool (uses MALOC).</li> |
| 122 |
<li> MC - Manifold Code finite element package (uses MALOC and PUNC).</li> |
| 123 |
<li> MCX - MC eXtension libraries (uses MALOC, PUNC, and MC). </li> |
| 124 |
</ul> |
| 125 |
|
| 126 |
<br /> |
| 127 |
<br /> |
| 128 |
MALOC is self-contained, and requires only an ANSI-C compiler on a UNIX |
| 129 |
or Win32 platform. PUNC, GAMer, SG, and MC are also self-contained, but rely |
| 130 |
on MALOC having been previously installed on the platform. Additional features |
| 131 |
of MC are enabled if PUNC is available, but PUNC is not required to build MC. |
| 132 |
The MC eXtension libraries MCX are constructed on top of MALOC and MC, and |
| 133 |
in order install and use MCX one must first correctly configure and install |
| 134 |
both MALOC and MC. MCX is made up of a number of individual libraries |
| 135 |
developed by members of our group, or contributed by one of a number of |
| 136 |
colleagues. More information about |
| 137 |
FETK |
| 138 |
can be found on the |
| 139 |
FETK |
| 140 |
website: |
| 141 |
<ul> |
| 142 |
<li> <a href="http://www.fetk.org/">http://www.fetk.org/</a></li> |
| 143 |
</ul> |
| 144 |
|
| 145 |
<br /> |
| 146 |
<!-- ===================================================================== --> |
| 147 |
<hr /> |
| 148 |
<br /> |
| 149 |
|
| 150 |
<b><a name="download">Obtaining MALOC</a></b> |
| 151 |
|
| 152 |
<br /> |
| 153 |
<br /> |
| 154 |
MALOC is copyrighted, but is redistributable in source and binary form |
| 155 |
under the following <a href="#license">license</a>. |
| 156 |
The MALOC source can be downloaded from the |
| 157 |
<a href="http://www.fetk.org/codes/download/index.html">FETK Download Page</a>. |
| 158 |
<br /> |
| 159 |
|
| 160 |
<br /> |
| 161 |
<!-- ===================================================================== --> |
| 162 |
<hr /> |
| 163 |
<br /> |
| 164 |
|
| 165 |
<b><a name="faq">Frequently Asked Questions</a></b> |
| 166 |
|
| 167 |
<br /> |
| 168 |
<br /> |
| 169 |
<b> |
| 170 |
What is MALOC and what does MALOC stand for? |
| 171 |
</b> |
| 172 |
|
| 173 |
<br /> |
| 174 |
<br /> |
| 175 |
See the <a href="#overview">Overview</a>. |
| 176 |
|
| 177 |
<br /> |
| 178 |
<br /> |
| 179 |
<b> |
| 180 |
How to I obtain a copy of the MALOC binaries and/or source code? |
| 181 |
</b> |
| 182 |
|
| 183 |
<br /> |
| 184 |
<br /> |
| 185 |
See the <a href="#download">Obtaining MALOC</a> section. |
| 186 |
|
| 187 |
<br /> |
| 188 |
<br /> |
| 189 |
<b> |
| 190 |
I managed to get a copy of "maloc-VERSION.[i386|src|tar].[rpm|gz]"; |
| 191 |
how do I now install MALOC? |
| 192 |
</b> |
| 193 |
|
| 194 |
<br /> |
| 195 |
<br /> |
| 196 |
See the <a href="#install">Installation Instructions</a>. |
| 197 |
|
| 198 |
<br /> |
| 199 |
<br /> |
| 200 |
<b> |
| 201 |
You gave me a "patch.gz" file to fix a bug in MALOC; how do I apply the patch? |
| 202 |
</b> |
| 203 |
|
| 204 |
<br /> |
| 205 |
<br /> |
| 206 |
To apply patches to upgrade MALOC to a new version, you first obtain the patch |
| 207 |
from me or my webpage as a single file with a name like "patch.gz". You |
| 208 |
apply the patch after you have unpacked the maloc-VERSION.tar.gz file as |
| 209 |
described in the installation instructions. |
| 210 |
To apply the patch, cd into the directory containing the root MALOC directory |
| 211 |
(called "maloc" after unpacking maloc-VERSION.tar.gz) and execute the "patch" |
| 212 |
program as follows (the patch program exists on most UNIX machines): |
| 213 |
<ul> |
| 214 |
<li>gzip -cd patch.gz | patch -p0</li> |
| 215 |
</ul> |
| 216 |
|
| 217 |
<br /> |
| 218 |
<br /> |
| 219 |
Patch files are simply the output from a recursive "diff" that are used to |
| 220 |
represent all differences between two directory trees. For example, to create |
| 221 |
a patch representing the changes from version 1.0 of MALOC (in directory |
| 222 |
maloc_1.0 for example) to version 1.1 of MALOC (e.g. in directory maloc_1.1), |
| 223 |
I would normally type the following: |
| 224 |
<ul> |
| 225 |
<li> diff -r -u -N maloc_1.0 maloc_1.1 > patch1</li> |
| 226 |
<li> gzip -v patch1</li> |
| 227 |
</ul> |
| 228 |
which would produce the gzipped patch file "patch1.gz". If you had previously |
| 229 |
installed version 1.0 of MALOC but would like to upgrade to version 1.1 of |
| 230 |
MALOC, you could just download the file "patch1.gz" and apply the changes |
| 231 |
using the program "patch" as above, rather than downloading and reinstalling |
| 232 |
the entire version 1.1 of MALOC. |
| 233 |
|
| 234 |
<br /> |
| 235 |
<br /> |
| 236 |
<b> |
| 237 |
I really don't know what I'm doing; how to I get more documentation for MALOC? |
| 238 |
</b> |
| 239 |
|
| 240 |
<br /> |
| 241 |
<br /> |
| 242 |
The |
| 243 |
<a href="index.html">User's Guide</a> |
| 244 |
and the |
| 245 |
<a href="api/html/index.html">Programmers's Guide</a> |
| 246 |
contain all of the MALOC documentation. |
| 247 |
|
| 248 |
<br /> |
| 249 |
<br /> |
| 250 |
<b> |
| 251 |
Why did you develop MALOC? Can't you just use ANSI-C? |
| 252 |
</b> |
| 253 |
|
| 254 |
<br /> |
| 255 |
<br /> |
| 256 |
Anyone who has ported C codes that use sockets and signals to various UNIX |
| 257 |
machines quickly realizes that there has to be a better way to do things. |
| 258 |
GNU Autoconf solves this problem, but also then writing a small C library |
| 259 |
which holds all of the autoconf-generated machine-dependent details |
| 260 |
internally simplifies software development a great deal. MALOC plays this |
| 261 |
role in MC as well as in the entire |
| 262 |
FETK |
| 263 |
project. |
| 264 |
|
| 265 |
<br /> |
| 266 |
<br /> |
| 267 |
<b> |
| 268 |
What is in all of these subdirectories? Where exactly is "MALOC"? |
| 269 |
</b> |
| 270 |
|
| 271 |
<br /> |
| 272 |
<br /> |
| 273 |
MALOC consists of several (class) libraries from which you will call routines |
| 274 |
to handle your application. You simply link your application to the MALOC |
| 275 |
static or shared library. The MC package automatically looks for the MALOC |
| 276 |
libraries as part of its Autoconf configuration process. |
| 277 |
<br /> |
| 278 |
<pre style="font-family: Courier New"> |
| 279 |
maloc |
| 280 |
| |
| 281 |
------------------------ |
| 282 |
/ | | | \ |
| 283 |
config doc examples src tools |
| 284 |
</pre> |
| 285 |
<br /> |
| 286 |
The src directory has the additional subdirectory structure: |
| 287 |
<br /> |
| 288 |
<pre style="font-family: Courier New"> |
| 289 |
src |
| 290 |
| |
| 291 |
------------------------- |
| 292 |
/ | | | | \ |
| 293 |
aaa_inc aaa_lib base psh vsh vsys |
| 294 |
</pre> |
| 295 |
<br /> |
| 296 |
Within each library source directory is an additional subdirectory, |
| 297 |
"maloc". The "maloc" subdirectory contains public headers for the library, |
| 298 |
representing the library API; these headers will be installed in the |
| 299 |
specified header install directory during the install procedure after |
| 300 |
building MALOC. |
| 301 |
|
| 302 |
<br /> |
| 303 |
<br /> |
| 304 |
The following is a brief description of each subdirectory of the package. |
| 305 |
<br /> |
| 306 |
<pre style="font-family: Courier New"> |
| 307 |
maloc - The entire MALOC package |
| 308 |
maloc/config - GNU Autoconf scripts and non-unix config files |
| 309 |
maloc/doc - MALOC documentation |
| 310 |
maloc/examples - Complex examples and data files for using MALOC |
| 311 |
maloc/src - MALOC source code (all source and headers) |
| 312 |
maloc/src/aaa_inc - Header installation tools |
| 313 |
maloc/src/aaa_lib - Library installation tools |
| 314 |
maloc/src/*/maloc - The MALOC headers (API) |
| 315 |
maloc/src/base - Source for M. Holst's BASE (MALOC foundation headers) |
| 316 |
maloc/src/vsys - Source for M. Holst's VSYS (Virtual SYStem layer) |
| 317 |
maloc/src/vsh - Source for M. Holst's VSH (Virtual command SHell) |
| 318 |
maloc/src/psh - Source for M. Holst's PSH (Parallel vSH extension) |
| 319 |
maloc/tools - Some binary tools for use with MALOC |
| 320 |
</pre> |
| 321 |
<br /> |
| 322 |
|
| 323 |
<br /> |
| 324 |
<br /> |
| 325 |
<b> |
| 326 |
Okay, I seem to have installed MALOC correctly; how do I actually use it now? |
| 327 |
</b> |
| 328 |
|
| 329 |
<br /> |
| 330 |
<br /> |
| 331 |
Using MALOC is pretty simple; it is a very object-oriented implementation, |
| 332 |
although it is written in C. It is actually written in an object-oriented |
| 333 |
way using a subset of ANSI/Standard C, sometimes referred to as |
| 334 |
<a href="#cooc">Clean OO C</a>. |
| 335 |
Clean C refers to the overlapping subset of ANSI/Standard C and |
| 336 |
C++, so you can compile the code as a legal C++ or ANSI/Standard C code. |
| 337 |
Using the code consists of constructing objects (represented by C structs) |
| 338 |
and manipulating these objects using appropriate methods (represented by C |
| 339 |
functions which follow a certain object-oriented prototype convention). |
| 340 |
|
| 341 |
<br /> |
| 342 |
<br /> |
| 343 |
<b> |
| 344 |
What is the class hierarchy? How are the various libraries related? |
| 345 |
</b> |
| 346 |
|
| 347 |
<br /> |
| 348 |
<br /> |
| 349 |
Detailed information on the class relationships can be found |
| 350 |
in the |
| 351 |
<a href="api/html/index.html">Programmers's Guide</a>. |
| 352 |
The following directed graph shows the class library dependencies. |
| 353 |
(This tends to evolve as MALOC is developed.) |
| 354 |
<pre style="font-family: Courier New"> |
| 355 |
ANSI-C ===> base ==> vsys ==> vsh ==> psh |
| 356 |
/\ /\ /\ |
| 357 |
|| || || |
| 358 |
UNIX/INET sockets || MPI |
| 359 |
|| |
| 360 |
signals |
| 361 |
</pre> |
| 362 |
|
| 363 |
<br /> |
| 364 |
<br /> |
| 365 |
<b> |
| 366 |
<a name="cooc"> |
| 367 |
What is <i>Clean C</i>? |
| 368 |
</a> |
| 369 |
</b> |
| 370 |
|
| 371 |
<br /> |
| 372 |
<br /> |
| 373 |
Clean C is simply a subset of ISO C which is compatible with |
| 374 |
(the current draft) standard C++; i.e., Clean C is the intersection of |
| 375 |
the standard accepted definitions of C and C++. |
| 376 |
ISO C is currently the internationally accepted version of C; ISO C was |
| 377 |
previously called ANSI C, and the term Standard C (as opposed to Tradiational |
| 378 |
or K&R C) is also now used for ISO C. |
| 379 |
Clean C programs are ISO C programs that use only the |
| 380 |
new C++-style function prototypes, and avoid using names |
| 381 |
that are reserved words in C++ (such as class, public, etc). |
| 382 |
There are a few other differences between ISO C and C++ that one has to |
| 383 |
be careful of (such as struct/union scopes, typedef syntax, storage classes, |
| 384 |
const and cast usage, initializers, "sizeof" differences), |
| 385 |
but the prototypes and reserved words are the main restrictions. |
| 386 |
Clean C programs can then be compiled with any ISO C compiler |
| 387 |
or any standard C++ compiler on any architecture. |
| 388 |
In other words, Clean C programs are actually C++ programs, but they only use |
| 389 |
C++ features that can be handled with an ISO C compiler. |
| 390 |
Clean C is a very small, simple, fast, powerful, yet extremely portable |
| 391 |
language. |
| 392 |
The name "Clean C" for this C dialect seems to have been first coined in |
| 393 |
the book of Harbison and Steele, "C: A Reference Manual"; this excellent |
| 394 |
C reference has a thorough discussion of the various dialects of C. |
| 395 |
|
| 396 |
<br /> |
| 397 |
<br /> |
| 398 |
<b> |
| 399 |
What is <i>Clean OO C</i>? |
| 400 |
</b> |
| 401 |
|
| 402 |
<br /> |
| 403 |
<br /> |
| 404 |
The "OO" in "Clean OO C" |
| 405 |
refers to the programming style |
| 406 |
employed -- Object Oriented (it does not refer to syntax as did the |
| 407 |
word "Clean" above). |
| 408 |
An "Clean OO C" implementation consists of a set of "Objects" |
| 409 |
(Clean C structs) which are operated on by a collection of "methods" |
| 410 |
(Clean C subroutines) which always have a pointer to the Object as their |
| 411 |
first argument. This special argument is always written as "thee", |
| 412 |
analogous to the implicit "this" pointer in C++. |
| 413 |
(An Clean OO C implementation can be turned into a |
| 414 |
C++ implementation |
| 415 |
with a simple AWK/SED or Perl Script.) |
| 416 |
Much like C++, a careful Clean OO C implementation can be |
| 417 |
used as a set of C++-like class libraries, it can be safely software |
| 418 |
engineered into other |
| 419 |
large software packages, and it can be compiled on just about any UNIX-like |
| 420 |
platform with either a C or a C++ compiler, including e.g. Linux, IRIX, |
| 421 |
and Win32. |
| 422 |
|
| 423 |
<br /> |
| 424 |
<br /> |
| 425 |
<b> |
| 426 |
Why <i>would</i> someone program in Clean OO C? |
| 427 |
</b> |
| 428 |
|
| 429 |
<br /> |
| 430 |
<br /> |
| 431 |
Clean OO C seems to be a good language compromise: |
| 432 |
a very small language, but powerful enough to provide a great deal of |
| 433 |
abstraction. |
| 434 |
In addition, one can continue to use various integrated C++ development |
| 435 |
environments under Win32 (such as the Watcom and Microsoft products), |
| 436 |
making use of the symbolic debuggers and so on, |
| 437 |
since Clean OO C programs are still legal C++ programs. |
| 438 |
The book of A. Holub, "C+C++: Programming with Objects in C and C++" was |
| 439 |
a very useful guide for doing an object-oriented implementation in (ISO) C. |
| 440 |
|
| 441 |
<br /> |
| 442 |
<br /> |
| 443 |
Avoiding use of the <tt>inline</tt> function in C++ |
| 444 |
is a difficult sacrifice to make |
| 445 |
in moving to Clean OO C (note that GCC actually provides the |
| 446 |
inline function, although most ISO C compilers do not). |
| 447 |
Inlining in Clean OO C can be emulated using macros. |
| 448 |
This can be made reasonably |
| 449 |
safe by implementing two versions of all macro'd routines -- |
| 450 |
a normal Clean OO C routine, and a macro version. |
| 451 |
Switching between the two can be as simple as setting or unsetting a |
| 452 |
macro in a makefile; this way if things start to go wrong, the macros can be |
| 453 |
turned into real functions with prototypes, and the code can be stepped |
| 454 |
through with a debugger. |
| 455 |
Another useful feature of C++, from a practical large-package software |
| 456 |
engineering point of view, |
| 457 |
is the "public/protected/private" keywords in class definitions. |
| 458 |
This functionality can be recovered to a small |
| 459 |
degree by careful use of header files and the "static" keyword |
| 460 |
in a Clean OO C implementation. |
| 461 |
|
| 462 |
<br /> |
| 463 |
<br /> |
| 464 |
<b> |
| 465 |
Why is MALOC written in <i>Clean OO C</i> rather than C++ or Objective-C? |
| 466 |
</b> |
| 467 |
|
| 468 |
<br /> |
| 469 |
<br /> |
| 470 |
A brief explanation can be found <a href="#cooc">here</a>. |
| 471 |
|
| 472 |
<br /> |
| 473 |
<br /> |
| 474 |
<b> |
| 475 |
I want to write software to extend MALOC; besides the <i>Clean OO C</i> |
| 476 |
framework, what is the "Coding Style"? |
| 477 |
</b> |
| 478 |
|
| 479 |
<br /> |
| 480 |
<br /> |
| 481 |
A fairly complete description of the coding style guidelines used in |
| 482 |
writing MALOC (and all of |
| 483 |
FETK |
| 484 |
) can be found in the |
| 485 |
<a href="api/html/index.html">Programmers's Guide</a>. |
| 486 |
|
| 487 |
<br /> |
| 488 |
<br /> |
| 489 |
<b> |
| 490 |
I wrote a cool MALOC extension; how do I get it included in the MALOC package? |
| 491 |
</b> |
| 492 |
|
| 493 |
<br /> |
| 494 |
<br /> |
| 495 |
To keep the core |
| 496 |
FETK |
| 497 |
libraries as small, efficient, stable, and |
| 498 |
bullet-proof as possible, I distribute extensions to any of MALOC, |
| 499 |
PUNC, MC, and/or SG in a package called MCX (MC eXtension Library). |
| 500 |
MCX is developed collaboratively by a number of collaborators. |
| 501 |
In addition, several application-specific software |
| 502 |
packages have been written such as GPDE (Geometric PDE) which use |
| 503 |
FETK |
| 504 |
to solve a number of different application problems. |
| 505 |
If you wish to contribute to MCX, and are willing to release you |
| 506 |
contributions under the GNU GPL, then I would be delighted to include |
| 507 |
it in MCX. |
| 508 |
|
| 509 |
<br /> |
| 510 |
<br /> |
| 511 |
If you need special modifications to |
| 512 |
FETK |
| 513 |
to support your particular |
| 514 |
contribution or your particular |
| 515 |
FETK |
| 516 |
-based application, let me know. |
| 517 |
If you provide me with a clear description of an interface to |
| 518 |
FETK |
| 519 |
that you |
| 520 |
need, then I will almost always consider making the modifications to |
| 521 |
FETK |
| 522 |
for you. In any event, the general guideline for such proposed changes is |
| 523 |
that they be fairly minimal to avoid breaking too many other things that |
| 524 |
rely on the existing structure of |
| 525 |
FETK |
| 526 |
, and general enough to be useful |
| 527 |
for other extensions (and in particular, not application-specific). |
| 528 |
|
| 529 |
<br /> |
| 530 |
<br /> |
| 531 |
<!-- ===================================================================== --> |
| 532 |
<hr /> |
| 533 |
<br /> |
| 534 |
|
| 535 |
<b><a name="install">Installation Instructions</a></b> |
| 536 |
|
| 537 |
<br /> |
| 538 |
<br /> |
| 539 |
<b> |
| 540 |
Available distribution formats |
| 541 |
</b> |
| 542 |
|
| 543 |
<br /> |
| 544 |
<br /> |
| 545 |
MALOC is distributed in both binary format (as a binary RPM file |
| 546 |
maloc-VERSION.i386.rpm for i386-based versions of Linux) and in source |
| 547 |
format (as a source RPM file maloc-VERSION.src.rpm and as a gzipped tar |
| 548 |
file "maloc-VERSION.tar.gz"). |
| 549 |
|
| 550 |
<br /> |
| 551 |
<br /> |
| 552 |
<b> |
| 553 |
Installation using the binary RPM file |
| 554 |
</b> |
| 555 |
|
| 556 |
<br /> |
| 557 |
<br /> |
| 558 |
The following rpm command will install all of the MALOC headers and libraries |
| 559 |
into /usr/local/include and /usr/local/lib, and will install the MALOC |
| 560 |
documentation into /usr/share/doc/packages/maloc: |
| 561 |
<pre style="font-family: Courier New"> |
| 562 |
rpm -Uvh maloc-VERSION.i386.rpm |
| 563 |
</pre> |
| 564 |
|
| 565 |
<br /> |
| 566 |
<br /> |
| 567 |
<b> |
| 568 |
Installation and rebuilding from sources using the source RPM file |
| 569 |
</b> |
| 570 |
|
| 571 |
<br /> |
| 572 |
<br /> |
| 573 |
The following rpm command will unpack the source rpm file |
| 574 |
"maloc-VERSON.src.rpm" into the MALOC gzipped tar file containing |
| 575 |
the sources called "maloc-VERSION.tar.tar.gz" and into a small RPM |
| 576 |
spec file called "maloc-VERSON.spec": |
| 577 |
<pre style="font-family: Courier New"> |
| 578 |
rpm -Uvh maloc-VERSION.src.rpm |
| 579 |
</pre> |
| 580 |
The sources can then be unpacked and built using the directions for |
| 581 |
the gzipped tar file below. |
| 582 |
Alternatively, the following rpm command will do these steps for you: |
| 583 |
<pre style="font-family: Courier New"> |
| 584 |
rpm -bp maloc-VERSION.spec |
| 585 |
</pre> |
| 586 |
|
| 587 |
<br /> |
| 588 |
<br /> |
| 589 |
<b> |
| 590 |
Rebuilding binary and source RPM files from the gzipped tar file |
| 591 |
</b> |
| 592 |
|
| 593 |
<br /> |
| 594 |
<br /> |
| 595 |
The MALOC sources contain the RPM spec file "maloc-VERSON.spec" in the |
| 596 |
root source directory; as a result, rebuilding the RPM files from sources |
| 597 |
can be done using the rpm command: |
| 598 |
<pre style="font-family: Courier New"> |
| 599 |
rpm -ta maloc-VERSION.tar.gz |
| 600 |
</pre> |
| 601 |
The result will be the corresponding source and binary rpm files, |
| 602 |
named "maloc-VERSON.src.rpm" and "maloc-VERSION.i386.rpm". |
| 603 |
Normally, these files are written to /usr/src/redhat/SRPMS |
| 604 |
and /usr/src/redhat/RPMS respectively, but you must be logged in |
| 605 |
as root for these to work. |
| 606 |
The destination directories can be overriden using arguments to the |
| 607 |
rpm program (see the rpm manpage). |
| 608 |
|
| 609 |
<br /> |
| 610 |
<br /> |
| 611 |
<b> |
| 612 |
Installation and building from sources using the gzipped tar file |
| 613 |
</b> |
| 614 |
|
| 615 |
<br /> |
| 616 |
<br /> |
| 617 |
The following command will unpack |
| 618 |
MALOC into a number of subdirectories and files on any UNIX machine |
| 619 |
(and on any WinNT machine with the GNU-Win32 tools gzip and tar). |
| 620 |
<pre style="font-family: Courier New"> |
| 621 |
gzip -dc maloc-VERSION.tar.gz | tar xvf - |
| 622 |
</pre> |
| 623 |
|
| 624 |
<br /> |
| 625 |
<br /> |
| 626 |
<b> |
| 627 |
Building the package using the GNU "configure" shell script and "make" |
| 628 |
</b> |
| 629 |
|
| 630 |
<br /> |
| 631 |
<br /> |
| 632 |
The "configure" shell script in the "maloc" directory (the toplevel |
| 633 |
directory created when you unpacked the MALOC tar.gz file) will build the entire |
| 634 |
package. This is a standard GNU autoconf-generated configuration script. |
| 635 |
For a list of the possible configuration options, type: |
| 636 |
<pre style="font-family: Courier New"> |
| 637 |
./configure --help |
| 638 |
</pre> |
| 639 |
You should be able to build MALOC by simply typing: |
| 640 |
<pre style="font-family: Courier New"> |
| 641 |
./configure |
| 642 |
make |
| 643 |
make install |
| 644 |
</pre> |
| 645 |
However, it is often advantageous to keep the original source directory |
| 646 |
pristine; the configure script can actually be run outside the source |
| 647 |
tree, which will keep all files created by the build outside the source |
| 648 |
tree. (This idea is related to the section below describing how to build |
| 649 |
binaries for multiple architectures at the same time using the same source |
| 650 |
tree, and requires that your version of make has the VPATH facility, such |
| 651 |
as GNU make.) For example, I build MALOC in a separate directory from the |
| 652 |
source tree as follows: |
| 653 |
<pre style="font-family: Courier New"> |
| 654 |
gzip -dc maloc-VERSION.tar.gz | tar xvf - |
| 655 |
mkdir maloc_build |
| 656 |
cd maloc_build |
| 657 |
../maloc/configure |
| 658 |
make |
| 659 |
make install |
| 660 |
</pre> |
| 661 |
|
| 662 |
<br /> |
| 663 |
<br /> |
| 664 |
<b> |
| 665 |
Building binaries for multiple architectures in the same source directory |
| 666 |
</b> |
| 667 |
|
| 668 |
<br /> |
| 669 |
<br /> |
| 670 |
If you have a version of "make" that supports the VPATH facility (such as |
| 671 |
any recent version of GNU make), then you can build the package for multiple |
| 672 |
architectures in the same source directory (in fact, you can do the compiles |
| 673 |
at the same time without collisions). This is very useful if you have your |
| 674 |
home directory on an NFS volume that you share among multiple architectures, |
| 675 |
such as SGI, Linux, etc. To build MALOC for all the systems at the same time, |
| 676 |
you simply make an additional subdirectory in the main MALOC directory for |
| 677 |
each architecture, copy "configure" into it, "cd" into the subdirectory, and |
| 678 |
then install as above. For example, on a linux machine you would do the |
| 679 |
following: |
| 680 |
<pre style="font-family: Courier New"> |
| 681 |
mkdir linux |
| 682 |
cp configure linux/. |
| 683 |
cd linux |
| 684 |
./configure |
| 685 |
make |
| 686 |
make install |
| 687 |
</pre> |
| 688 |
If you mount the same NFS home directory on for example an OpenStep box, |
| 689 |
you could at the same time do the following: |
| 690 |
<pre style="font-family: Courier New"> |
| 691 |
mkdir next |
| 692 |
cp configure next/. |
| 693 |
cd next |
| 694 |
./configure |
| 695 |
make |
| 696 |
make install |
| 697 |
</pre> |
| 698 |
Again, both builds can actually be done outside the source tree rather |
| 699 |
than in a subdirectory of the source tree, as described in the previous |
| 700 |
section. |
| 701 |
|
| 702 |
<br /> |
| 703 |
<br /> |
| 704 |
<b> |
| 705 |
Building shared libraries rather than static libraries |
| 706 |
</b> |
| 707 |
|
| 708 |
<br /> |
| 709 |
<br /> |
| 710 |
(MIKE: give an overview of libtool.) |
| 711 |
|
| 712 |
<br /> |
| 713 |
<br /> |
| 714 |
<b> |
| 715 |
Rebuilding the configure script and the Makefile.in files |
| 716 |
</b> |
| 717 |
|
| 718 |
<br /> |
| 719 |
<br /> |
| 720 |
If for some reason you actually need to rebuild the configure script or the |
| 721 |
Makefile.in files using the GNU autoconf suite, you should read the block of |
| 722 |
documentation at the top of the configure.in file. The commentary I put there |
| 723 |
explains exactly how the GNU autoconf suite must be used and in what order, |
| 724 |
and exactly what files are produced at each step of the process. A script |
| 725 |
called "bootstrap" which automates this process is located in the config |
| 726 |
subdirectory of the MALOC source tree. |
| 727 |
|
| 728 |
<br /> |
| 729 |
<br /> |
| 730 |
<b> |
| 731 |
Platform-specific information |
| 732 |
</b> |
| 733 |
|
| 734 |
<br /> |
| 735 |
<br /> |
| 736 |
Below is some platform-specific build/usage information for MALOC. |
| 737 |
<ul> |
| 738 |
<li>Linux (Source: M. Holst, UCSD) |
| 739 |
<br /> |
| 740 |
<br /> |
| 741 |
Things should work as described above. |
| 742 |
<br /> |
| 743 |
<br /> |
| 744 |
</li> |
| 745 |
<li>FreeBSD/NetBSD/OpenBSD (Source: M. Holst, UCSD) |
| 746 |
<br /> |
| 747 |
<br /> |
| 748 |
Things should work as described above. |
| 749 |
<br /> |
| 750 |
<br /> |
| 751 |
</li> |
| 752 |
<li>OpenStep (Source: M. Holst, UCSD) |
| 753 |
<br /> |
| 754 |
<br /> |
| 755 |
Things should just work, but you may have to set the CC environment |
| 756 |
variable as follows before typing ./configure: |
| 757 |
<pre style="font-family: Courier New"> |
| 758 |
export CC="/bin/cc" |
| 759 |
</pre> |
| 760 |
or you might need to use: |
| 761 |
<pre style="font-family: Courier New"> |
| 762 |
export CC="/bin/cc -ObjC" |
| 763 |
</pre> |
| 764 |
<br /> |
| 765 |
<br /> |
| 766 |
</li> |
| 767 |
<li>IRIX (Source: M. Holst, UCSD) |
| 768 |
<br /> |
| 769 |
<br /> |
| 770 |
If you are on a 64-bit IRIX box such as an Onyx, Octane, or Origin, |
| 771 |
set the CC environment variable as follows before typing ./configure: |
| 772 |
<pre style="font-family: Courier New"> |
| 773 |
export CC="/bin/cc -64" |
| 774 |
</pre> |
| 775 |
If you are on a 32-bit IRIX box such as an O2 or Indy, |
| 776 |
set the CC environment variable as follows before typing ./configure: |
| 777 |
<pre style="font-family: Courier New"> |
| 778 |
export CC="/bin/cc -32" |
| 779 |
</pre> |
| 780 |
<br /> |
| 781 |
<br /> |
| 782 |
|
| 783 |
</li> |
| 784 |
<li>Win32 (Source: M. Holst, UCSD) |
| 785 |
<br /> |
| 786 |
<br /> |
| 787 |
Unless you have the Cygwin environment, you need to use one of the |
| 788 |
included project file collections for one of the commercially |
| 789 |
available ANSI C or C++ compilers for the Win32 environment. |
| 790 |
</li> |
| 791 |
</ul> |
| 792 |
|
| 793 |
<br /> |
| 794 |
<br /> |
| 795 |
<b> |
| 796 |
What you end up with |
| 797 |
</b> |
| 798 |
|
| 799 |
<br /> |
| 800 |
<br /> |
| 801 |
Once the build completes via the "configure;make;make install" procedure above |
| 802 |
with no errors, the MALOC library (libmaloc.a and/or libmaloc.so) is installed |
| 803 |
into the specified installation directory. You can also build some useful |
| 804 |
tools that employ the MALOC library by cd-ing into the "tools" subdirectory and |
| 805 |
repeating the "configure;make;make install" procedure. |
| 806 |
|
| 807 |
<br /> |
| 808 |
<br /> |
| 809 |
<b> |
| 810 |
Using MALOC on a parallel computer |
| 811 |
</b> |
| 812 |
|
| 813 |
<br /> |
| 814 |
<br /> |
| 815 |
MALOC provides abstractions to both INET sockets and MPI for communication |
| 816 |
support in parallel computing software. Control of the overall structure is |
| 817 |
accomplished through MALOC-shell scripts you write, or through calls to the |
| 818 |
MALOC library. (Going through the MALOC-shell is much simpler, and you have |
| 819 |
access to all the communication possibilities through the MALOC-shell.) |
| 820 |
The use of the parallel features of MALOC is explained in more detail in |
| 821 |
the documentation that is included in the MC library. |
| 822 |
|
| 823 |
<br /> |
| 824 |
<br /> |
| 825 |
<b> |
| 826 |
Getting MALOC to find your installation of MPI |
| 827 |
</b> |
| 828 |
|
| 829 |
<br /> |
| 830 |
<br /> |
| 831 |
If your installation of MPI is located in an unusual directory, then the |
| 832 |
configuration script may have trouble finding the MPI library (libmpi.a) |
| 833 |
or the MPI header file (mpi.h). Again, the configure script prints out the |
| 834 |
state of affairs quite clearly as to whether it found the library and the |
| 835 |
header. If you have MPI and configure is not finding it, then here are |
| 836 |
several possible solutions, each of which usually works. They are listed in |
| 837 |
preferred order (i.e. you should try Solution 1 first, and if that doesn't |
| 838 |
work try Solution 2, and so on). |
| 839 |
<ul> |
| 840 |
<li>Solution 1: |
| 841 |
<br /> |
| 842 |
<br /> |
| 843 |
Have your system administrator install MPI in a proper system |
| 844 |
directory so that MALOC (and other AUTOCONF-based codes) can find it! |
| 845 |
<br /> |
| 846 |
<br /> |
| 847 |
</li> |
| 848 |
<li>Solution 2: |
| 849 |
<ol> |
| 850 |
<li>Find the location of libmpi.a and mpi.h on your system, |
| 851 |
either by asking your sysadmin, poking around yourself, |
| 852 |
or (if you have it) using the "locate" utility: |
| 853 |
<pre style="font-family: Courier New"> |
| 854 |
locate mpi.h |
| 855 |
locate libmpi.a |
| 856 |
locate libmpich.a |
| 857 |
</pre> |
| 858 |
On my Redhat6.2 Linux box, the following output is produced: |
| 859 |
<pre style="font-family: Courier New"> |
| 860 |
bash:~% locate mpi.h |
| 861 |
/usr/share/mpi/include/mpi.h |
| 862 |
bash:~% locate libmpi.a |
| 863 |
bash:~% locate libmpich.a |
| 864 |
/usr/share/mpi/lib/libmpich.a |
| 865 |
</pre> |
| 866 |
Therefore the MPI header is installed as: |
| 867 |
<pre style="font-family: Courier New"> |
| 868 |
/usr/share/mpi/include/mpi.h |
| 869 |
</pre> |
| 870 |
and the MPI library is installed as: |
| 871 |
<pre style="font-family: Courier New"> |
| 872 |
/usr/share/mpi/lib/libmpich.a |
| 873 |
</pre> |
| 874 |
|
| 875 |
</li> |
| 876 |
<li>Before running the configure script, preset the FETK_MPI_INCLUDE |
| 877 |
and FETK_MPI_LIBRARY environment variables to point to the |
| 878 |
directories containing mpi.h and libmpi.a (or libmpich.a). Under |
| 879 |
bash, using the results from the example above, I would do this as |
| 880 |
follows: |
| 881 |
<pre style="font-family: Courier New"> |
| 882 |
export FETK_MPI_INCLUDE=/usr/share/mpi/include |
| 883 |
export FETK_MPI_LIBRARY=/usr/share/mpi/lib |
| 884 |
./configure --enable-mpi |
| 885 |
make clean; make; make install |
| 886 |
</pre> |
| 887 |
The configure script should now report that it successfully |
| 888 |
found the library and header and thus enabled MPI, and then |
| 889 |
MALOC should compile without error. |
| 890 |
</li> |
| 891 |
</ol> |
| 892 |
</li> |
| 893 |
</ul> |
| 894 |
|
| 895 |
<br /> |
| 896 |
<!-- ===================================================================== --> |
| 897 |
<hr /> |
| 898 |
<br /> |
| 899 |
|
| 900 |
<b><a name="author">Author Information</a></b> |
| 901 |
|
| 902 |
<br /> |
| 903 |
<br /> |
| 904 |
MALOC (Minimal Abstraction Layer for Object-oriented C) was conceived, |
| 905 |
designed, and implemented over several years by |
| 906 |
<a href="http://ccom.ucsd.edu/~mholst/">Michael Holst</a>, |
| 907 |
beginning with an initial implementation in 1994. |
| 908 |
Various colleagues have contributed ideas and/or code to MALOC |
| 909 |
(see the credits list below). |
| 910 |
<pre style="font-family: Courier New"> |
| 911 |
MALOC (Minimal Abstraction Layer for Object-oriented C) |
| 912 |
Copyright (C) 1994-- |
| 913 |
|
| 914 |
Michael Holst TELE: (858) 534-4899 |
| 915 |
Department of Mathematics FAX: (858) 534-5273 |
| 916 |
UC San Diego, AP&M 5739 EMAIL: [email protected] |
| 917 |
La Jolla, CA 92093 USA WEB: http://ccom.ucsd.edu/~mholst |
| 918 |
</pre> |
| 919 |
MALOC was designed to be a portable abstraction layer for use in the |
| 920 |
development of MC (Manifold Code), an adaptive multilevel finite element |
| 921 |
package also developed by |
| 922 |
<a href="http://ccom.ucsd.edu/~mholst/">Michael Holst</a>. |
| 923 |
MALOC was developed almost |
| 924 |
entirely on a home-grown 90Mhz Pentium PC running various flavors of |
| 925 |
Linux and [Free|Net|Open]BSD, using primarily GNU, BSD, and other free |
| 926 |
software development tools. Most of the development occurred during the |
| 927 |
hours of 10pm to 2am on a daily basis for several years, under heavy |
| 928 |
influence of Starbuck's coffee, with helpful advice provided by Mac and |
| 929 |
Mochi (two cats knowledgable in socket programming and numerical analysis). |
| 930 |
|
| 931 |
<br /> |
| 932 |
<br /> |
| 933 |
MALOC was released under the GNU GPL (GNU General Public License) beginning |
| 934 |
with the initial implementation in 1994, and continues to be released under |
| 935 |
this license. What this means is that like all |
| 936 |
GNU softare, MALOC is freely redistributable in source code form following |
| 937 |
the rules outlined in the text of the GNU GPL. You should have received a |
| 938 |
copy of the GNU GPL with this distribution of MALOC; a copy can be found |
| 939 |
<a href="#gpl">here</a>. |
| 940 |
If you did not receive a copy of the GNU GPL, please write to me and also |
| 941 |
write to: |
| 942 |
The Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 943 |
|
| 944 |
<br /> |
| 945 |
<br /> |
| 946 |
<b> |
| 947 |
Credits |
| 948 |
</b> |
| 949 |
|
| 950 |
<br /> |
| 951 |
<br /> |
| 952 |
Below is a credits list for the people that have |
| 953 |
contributed to MALOC in one way or another. |
| 954 |
The fields below follow the credits file format used in the |
| 955 |
Linux kernel CREDITS file to allow for easy manipulation via shell scripts. |
| 956 |
The fields are as follows: |
| 957 |
<pre style="font-family: Courier New"> |
| 958 |
N: name of contributor |
| 959 |
E: email address |
| 960 |
W: web address |
| 961 |
P: PGP key ID and fingerprint |
| 962 |
D: description of primary contributions |
| 963 |
S: snail-mail address |
| 964 |
</pre> |
| 965 |
<pre style="font-family: Courier New"> |
| 966 |
N: Michael Holst |
| 967 |
E: [email protected] |
| 968 |
W: http://ccom.ucsd.edu/~mholst |
| 969 |
P: 1024/0xB5212DCD |
| 970 |
D: maloc/* -- The package structure |
| 971 |
D: maloc/acconfig.h -- The platform abstraction information |
| 972 |
D: maloc/configure.in -- The GNU autoconf/automake structure |
| 973 |
D: maloc/config/* -- The GNU autoconf/automake shell scripts |
| 974 |
D: maloc/doc/* -- The package documentation |
| 975 |
D: maloc/examples/* -- The package examples |
| 976 |
D: maloc/src/aaa_inc/* -- Library header build structure |
| 977 |
D: maloc/src/aaa_lib/* -- Static and shared library build structure |
| 978 |
D: maloc/src/base/* -- M. Holst's MALOC Foundation headers |
| 979 |
D: maloc/src/vsys/* -- M. Holst's Virtual System abstraction layer |
| 980 |
D: maloc/src/vsh/* -- M. Holst's Virtual Shell abstraction layer |
| 981 |
D: maloc/src/psh/* -- M. Holst's Parallel virtual Shell |
| 982 |
D: maloc/tools/* -- Tools built on the libraries |
| 983 |
S: Department of Mathematics |
| 984 |
S: UC San Diego, AP&M 5739 |
| 985 |
S: La Jolla, CA 92093 USA |
| 986 |
|
| 987 |
N: Nathan Baker |
| 988 |
E: [email protected] |
| 989 |
D: maloc/src/psh/vcom.c -- Vcom Class (MPI abstraction) |
| 990 |
S: Department of Chemistry |
| 991 |
S: UC San Diego |
| 992 |
S: La Jolla, CA 92093 USA |
| 993 |
|
| 994 |
N: Steve Bond |
| 995 |
E: [email protected] |
| 996 |
D: maloc/maloc.spec -- RPM support (for building src/binary RPMs) |
| 997 |
S: Department of Mathematics |
| 998 |
S: UC San Diego |
| 999 |
S: La Jolla, CA 92093 USA |
| 1000 |
</pre> |
| 1001 |
|
| 1002 |
<br /> |
| 1003 |
<br /> |
| 1004 |
<b> |
| 1005 |
Contacting the Author |
| 1006 |
</b> |
| 1007 |
|
| 1008 |
<br /> |
| 1009 |
<br /> |
| 1010 |
If you have questions or comments about MALOC, please feel free to contact |
| 1011 |
me at <a href="mailto:[email protected]">[email protected]</a>. |
| 1012 |
|
| 1013 |
<br /> |
| 1014 |
<br /> |
| 1015 |
<!-- ===================================================================== --> |
| 1016 |
<hr /> |
| 1017 |
<br /> |
| 1018 |
|
| 1019 |
<b><a name="license">Copyright and Terms of Use</a></b> |
| 1020 |
|
| 1021 |
<i>Please acknowledge your use of MALOC and |
| 1022 |
FETK |
| 1023 |
</i> by citing: |
| 1024 |
<ul> |
| 1025 |
<li> M. Holst, Adaptive numerical treatment of elliptic systems on manifolds. |
| 1026 |
<i>Advances in Computational Mathematics</i>, |
| 1027 |
<b>15</b> (2001), pp. 139-191. |
| 1028 |
</li> |
| 1029 |
</ul> |
| 1030 |
|
| 1031 |
<br /> |
| 1032 |
<br /> |
| 1033 |
This version of MALOC is distributed under the following guidelines: |
| 1034 |
|
| 1035 |
<ul> |
| 1036 |
<li> |
| 1037 |
MALOC (Minimal Abstraction Layer for Object-oriented C) |
| 1038 |
<br /> |
| 1039 |
Copyright (C) 1994-- Michael Holst |
| 1040 |
|
| 1041 |
<br /> |
| 1042 |
<br /> |
| 1043 |
This program is free software; you can redistribute it and/or modify it |
| 1044 |
under the terms of the GNU General Public License as published by the |
| 1045 |
Free Software Foundation; either version 2 of the License, or (at your |
| 1046 |
option) any later version. |
| 1047 |
|
| 1048 |
<br /> |
| 1049 |
<br /> |
| 1050 |
This program is distributed in the hope that it will be useful, |
| 1051 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1052 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 1053 |
See the GNU General Public License for more details. |
| 1054 |
|
| 1055 |
<br /> |
| 1056 |
<br /> |
| 1057 |
You should have received a copy of the GNU General Public License along |
| 1058 |
with this program; if not, write to the Free Software Foundation, Inc., |
| 1059 |
675 Mass Ave, Cambridge, MA 02139, USA. |
| 1060 |
</li> |
| 1061 |
</ul> |
| 1062 |
|
| 1063 |
<br /> |
| 1064 |
<!-- ===================================================================== --> |
| 1065 |
<hr /> |
| 1066 |
<br /> |
| 1067 |
|
| 1068 |
<b><a name="gpl">GNU GPL</a></b> |
| 1069 |
|
| 1070 |
<br /> |
| 1071 |
<br /> |
| 1072 |
The GPL (GNU General Public License) below is copyrighted by the |
| 1073 |
Free Software Foundation. However, the instance of software that |
| 1074 |
it refers to, my package in this case, is copyrighted by myself as |
| 1075 |
the author of the package. Any additional software that I distribute |
| 1076 |
with my software is copyrighted by the authors of those pieces of |
| 1077 |
software (see the individual source files for author information). |
| 1078 |
---Michael Holst |
| 1079 |
|
| 1080 |
<!-- ===================================================================== --> |
| 1081 |
|
| 1082 |
<pre style="font-family: Courier New"> |
| 1083 |
GNU GENERAL PUBLIC LICENSE |
| 1084 |
Version 2, June 1991 |
| 1085 |
|
| 1086 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
| 1087 |
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 1088 |
Everyone is permitted to copy and distribute verbatim copies |
| 1089 |
of this license document, but changing it is not allowed. |
| 1090 |
|
| 1091 |
Preamble |
| 1092 |
|
| 1093 |
The licenses for most software are designed to take away your |
| 1094 |
freedom to share and change it. By contrast, the GNU General Public |
| 1095 |
License is intended to guarantee your freedom to share and change free |
| 1096 |
software--to make sure the software is free for all its users. This |
| 1097 |
General Public License applies to most of the Free Software |
| 1098 |
Foundation's software and to any other program whose authors commit to |
| 1099 |
using it. (Some other Free Software Foundation software is covered by |
| 1100 |
the GNU Library General Public License instead.) You can apply it to |
| 1101 |
your programs, too. |
| 1102 |
|
| 1103 |
When we speak of free software, we are referring to freedom, not |
| 1104 |
price. Our General Public Licenses are designed to make sure that you |
| 1105 |
have the freedom to distribute copies of free software (and charge for |
| 1106 |
this service if you wish), that you receive source code or can get it |
| 1107 |
if you want it, that you can change the software or use pieces of it |
| 1108 |
in new free programs; and that you know you can do these things. |
| 1109 |
|
| 1110 |
To protect your rights, we need to make restrictions that forbid |
| 1111 |
anyone to deny you these rights or to ask you to surrender the rights. |
| 1112 |
These restrictions translate to certain responsibilities for you if you |
| 1113 |
distribute copies of the software, or if you modify it. |
| 1114 |
|
| 1115 |
For example, if you distribute copies of such a program, whether |
| 1116 |
gratis or for a fee, you must give the recipients all the rights that |
| 1117 |
you have. You must make sure that they, too, receive or can get the |
| 1118 |
source code. And you must show them these terms so they know their |
| 1119 |
rights. |
| 1120 |
|
| 1121 |
We protect your rights with two steps: (1) copyright the software, and |
| 1122 |
(2) offer you this license which gives you legal permission to copy, |
| 1123 |
distribute and/or modify the software. |
| 1124 |
|
| 1125 |
Also, for each author's protection and ours, we want to make certain |
| 1126 |
that everyone understands that there is no warranty for this free |
| 1127 |
software. If the software is modified by someone else and passed on, we |
| 1128 |
want its recipients to know that what they have is not the original, so |
| 1129 |
that any problems introduced by others will not reflect on the original |
| 1130 |
authors' reputations. |
| 1131 |
|
| 1132 |
Finally, any free program is threatened constantly by software |
| 1133 |
patents. We wish to avoid the danger that redistributors of a free |
| 1134 |
program will individually obtain patent licenses, in effect making the |
| 1135 |
program proprietary. To prevent this, we have made it clear that any |
| 1136 |
patent must be licensed for everyone's free use or not licensed at all. |
| 1137 |
|
| 1138 |
The precise terms and conditions for copying, distribution and |
| 1139 |
modification follow. |
| 1140 |
|
| 1141 |
GNU GENERAL PUBLIC LICENSE |
| 1142 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 1143 |
|
| 1144 |
0. This License applies to any program or other work which contains |
| 1145 |
a notice placed by the copyright holder saying it may be distributed |
| 1146 |
under the terms of this General Public License. The "Program", below, |
| 1147 |
refers to any such program or work, and a "work based on the Program" |
| 1148 |
means either the Program or any derivative work under copyright law: |
| 1149 |
that is to say, a work containing the Program or a portion of it, |
| 1150 |
either verbatim or with modifications and/or translated into another |
| 1151 |
language. (Hereinafter, translation is included without limitation in |
| 1152 |
the term "modification".) Each licensee is addressed as "you". |
| 1153 |
|
| 1154 |
Activities other than copying, distribution and modification are not |
| 1155 |
covered by this License; they are outside its scope. The act of |
| 1156 |
running the Program is not restricted, and the output from the Program |
| 1157 |
is covered only if its contents constitute a work based on the |
| 1158 |
Program (independent of having been made by running the Program). |
| 1159 |
Whether that is true depends on what the Program does. |
| 1160 |
|
| 1161 |
1. You may copy and distribute verbatim copies of the Program's |
| 1162 |
source code as you receive it, in any medium, provided that you |
| 1163 |
conspicuously and appropriately publish on each copy an appropriate |
| 1164 |
copyright notice and disclaimer of warranty; keep intact all the |
| 1165 |
notices that refer to this License and to the absence of any warranty; |
| 1166 |
and give any other recipients of the Program a copy of this License |
| 1167 |
along with the Program. |
| 1168 |
|
| 1169 |
You may charge a fee for the physical act of transferring a copy, and |
| 1170 |
you may at your option offer warranty protection in exchange for a fee. |
| 1171 |
|
| 1172 |
2. You may modify your copy or copies of the Program or any portion |
| 1173 |
of it, thus forming a work based on the Program, and copy and |
| 1174 |
distribute such modifications or work under the terms of Section 1 |
| 1175 |
above, provided that you also meet all of these conditions: |
| 1176 |
|
| 1177 |
a) You must cause the modified files to carry prominent notices |
| 1178 |
stating that you changed the files and the date of any change. |
| 1179 |
|
| 1180 |
b) You must cause any work that you distribute or publish, that in |
| 1181 |
whole or in part contains or is derived from the Program or any |
| 1182 |
part thereof, to be licensed as a whole at no charge to all third |
| 1183 |
parties under the terms of this License. |
| 1184 |
|
| 1185 |
c) If the modified program normally reads commands interactively |
| 1186 |
when run, you must cause it, when started running for such |
| 1187 |
interactive use in the most ordinary way, to print or display an |
| 1188 |
announcement including an appropriate copyright notice and a |
| 1189 |
notice that there is no warranty (or else, saying that you provide |
| 1190 |
a warranty) and that users may redistribute the program under |
| 1191 |
these conditions, and telling the user how to view a copy of this |
| 1192 |
License. (Exception: if the Program itself is interactive but |
| 1193 |
does not normally print such an announcement, your work based on |
| 1194 |
the Program is not required to print an announcement.) |
| 1195 |
|
| 1196 |
These requirements apply to the modified work as a whole. If |
| 1197 |
identifiable sections of that work are not derived from the Program, |
| 1198 |
and can be reasonably considered independent and separate works in |
| 1199 |
themselves, then this License, and its terms, do not apply to those |
| 1200 |
sections when you distribute them as separate works. But when you |
| 1201 |
distribute the same sections as part of a whole which is a work based |
| 1202 |
on the Program, the distribution of the whole must be on the terms of |
| 1203 |
this License, whose permissions for other licensees extend to the |
| 1204 |
entire whole, and thus to each and every part regardless of who wrote it. |
| 1205 |
|
| 1206 |
Thus, it is not the intent of this section to claim rights or contest |
| 1207 |
your rights to work written entirely by you; rather, the intent is to |
| 1208 |
exercise the right to control the distribution of derivative or |
| 1209 |
collective works based on the Program. |
| 1210 |
|
| 1211 |
In addition, mere aggregation of another work not based on the Program |
| 1212 |
with the Program (or with a work based on the Program) on a volume of |
| 1213 |
a storage or distribution medium does not bring the other work under |
| 1214 |
the scope of this License. |
| 1215 |
|
| 1216 |
3. You may copy and distribute the Program (or a work based on it, |
| 1217 |
under Section 2) in object code or executable form under the terms of |
| 1218 |
Sections 1 and 2 above provided that you also do one of the following: |
| 1219 |
|
| 1220 |
a) Accompany it with the complete corresponding machine-readable |
| 1221 |
source code, which must be distributed under the terms of Sections |
| 1222 |
1 and 2 above on a medium customarily used for software interchange; or, |
| 1223 |
|
| 1224 |
b) Accompany it with a written offer, valid for at least three |
| 1225 |
years, to give any third party, for a charge no more than your |
| 1226 |
cost of physically performing source distribution, a complete |
| 1227 |
machine-readable copy of the corresponding source code, to be |
| 1228 |
distributed under the terms of Sections 1 and 2 above on a medium |
| 1229 |
customarily used for software interchange; or, |
| 1230 |
|
| 1231 |
c) Accompany it with the information you received as to the offer |
| 1232 |
to distribute corresponding source code. (This alternative is |
| 1233 |
allowed only for noncommercial distribution and only if you |
| 1234 |
received the program in object code or executable form with such |
| 1235 |
an offer, in accord with Subsection b above.) |
| 1236 |
|
| 1237 |
The source code for a work means the preferred form of the work for |
| 1238 |
making modifications to it. For an executable work, complete source |
| 1239 |
code means all the source code for all modules it contains, plus any |
| 1240 |
associated interface definition files, plus the scripts used to |
| 1241 |
control compilation and installation of the executable. However, as a |
| 1242 |
special exception, the source code distributed need not include |
| 1243 |
anything that is normally distributed (in either source or binary |
| 1244 |
form) with the major components (compiler, kernel, and so on) of the |
| 1245 |
operating system on which the executable runs, unless that component |
| 1246 |
itself accompanies the executable. |
| 1247 |
|
| 1248 |
If distribution of executable or object code is made by offering |
| 1249 |
access to copy from a designated place, then offering equivalent |
| 1250 |
access to copy the source code from the same place counts as |
| 1251 |
distribution of the source code, even though third parties are not |
| 1252 |
compelled to copy the source along with the object code. |
| 1253 |
|
| 1254 |
4. You may not copy, modify, sublicense, or distribute the Program |
| 1255 |
except as expressly provided under this License. Any attempt |
| 1256 |
otherwise to copy, modify, sublicense or distribute the Program is |
| 1257 |
void, and will automatically terminate your rights under this License. |
| 1258 |
However, parties who have received copies, or rights, from you under |
| 1259 |
this License will not have their licenses terminated so long as such |
| 1260 |
parties remain in full compliance. |
| 1261 |
|
| 1262 |
5. You are not required to accept this License, since you have not |
| 1263 |
signed it. However, nothing else grants you permission to modify or |
| 1264 |
distribute the Program or its derivative works. These actions are |
| 1265 |
prohibited by law if you do not accept this License. Therefore, by |
| 1266 |
modifying or distributing the Program (or any work based on the |
| 1267 |
Program), you indicate your acceptance of this License to do so, and |
| 1268 |
all its terms and conditions for copying, distributing or modifying |
| 1269 |
the Program or works based on it. |
| 1270 |
|
| 1271 |
6. Each time you redistribute the Program (or any work based on the |
| 1272 |
Program), the recipient automatically receives a license from the |
| 1273 |
original licensor to copy, distribute or modify the Program subject to |
| 1274 |
these terms and conditions. You may not impose any further |
| 1275 |
restrictions on the recipients' exercise of the rights granted herein. |
| 1276 |
You are not responsible for enforcing compliance by third parties to |
| 1277 |
this License. |
| 1278 |
|
| 1279 |
7. If, as a consequence of a court judgment or allegation of patent |
| 1280 |
infringement or for any other reason (not limited to patent issues), |
| 1281 |
conditions are imposed on you (whether by court order, agreement or |
| 1282 |
otherwise) that contradict the conditions of this License, they do not |
| 1283 |
excuse you from the conditions of this License. If you cannot |
| 1284 |
distribute so as to satisfy simultaneously your obligations under this |
| 1285 |
License and any other pertinent obligations, then as a consequence you |
| 1286 |
may not distribute the Program at all. For example, if a patent |
| 1287 |
license would not permit royalty-free redistribution of the Program by |
| 1288 |
all those who receive copies directly or indirectly through you, then |
| 1289 |
the only way you could satisfy both it and this License would be to |
| 1290 |
refrain entirely from distribution of the Program. |
| 1291 |
|
| 1292 |
If any portion of this section is held invalid or unenforceable under |
| 1293 |
any particular circumstance, the balance of the section is intended to |
| 1294 |
apply and the section as a whole is intended to apply in other |
| 1295 |
circumstances. |
| 1296 |
|
| 1297 |
It is not the purpose of this section to induce you to infringe any |
| 1298 |
patents or other property right claims or to contest validity of any |
| 1299 |
such claims; this section has the sole purpose of protecting the |
| 1300 |
integrity of the free software distribution system, which is |
| 1301 |
implemented by public license practices. Many people have made |
| 1302 |
generous contributions to the wide range of software distributed |
| 1303 |
through that system in reliance on consistent application of that |
| 1304 |
system; it is up to the author/donor to decide if he or she is willing |
| 1305 |
to distribute software through any other system and a licensee cannot |
| 1306 |
impose that choice. |
| 1307 |
|
| 1308 |
This section is intended to make thoroughly clear what is believed to |
| 1309 |
be a consequence of the rest of this License. |
| 1310 |
|
| 1311 |
8. If the distribution and/or use of the Program is restricted in |
| 1312 |
certain countries either by patents or by copyrighted interfaces, the |
| 1313 |
original copyright holder who places the Program under this License |
| 1314 |
may add an explicit geographical distribution limitation excluding |
| 1315 |
those countries, so that distribution is permitted only in or among |
| 1316 |
countries not thus excluded. In such case, this License incorporates |
| 1317 |
the limitation as if written in the body of this License. |
| 1318 |
|
| 1319 |
9. The Free Software Foundation may publish revised and/or new versions |
| 1320 |
of the General Public License from time to time. Such new versions will |
| 1321 |
be similar in spirit to the present version, but may differ in detail to |
| 1322 |
address new problems or concerns. |
| 1323 |
|
| 1324 |
Each version is given a distinguishing version number. If the Program |
| 1325 |
specifies a version number of this License which applies to it and "any |
| 1326 |
later version", you have the option of following the terms and conditions |
| 1327 |
either of that version or of any later version published by the Free |
| 1328 |
Software Foundation. If the Program does not specify a version number of |
| 1329 |
this License, you may choose any version ever published by the Free Software |
| 1330 |
Foundation. |
| 1331 |
|
| 1332 |
10. If you wish to incorporate parts of the Program into other free |
| 1333 |
programs whose distribution conditions are different, write to the author |
| 1334 |
to ask for permission. For software which is copyrighted by the Free |
| 1335 |
Software Foundation, write to the Free Software Foundation; we sometimes |
| 1336 |
make exceptions for this. Our decision will be guided by the two goals |
| 1337 |
of preserving the free status of all derivatives of our free software and |
| 1338 |
of promoting the sharing and reuse of software generally. |
| 1339 |
|
| 1340 |
NO WARRANTY |
| 1341 |
|
| 1342 |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
| 1343 |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
| 1344 |
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
| 1345 |
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
| 1346 |
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 1347 |
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
| 1348 |
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
| 1349 |
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
| 1350 |
REPAIR OR CORRECTION. |
| 1351 |
|
| 1352 |
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| 1353 |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
| 1354 |
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
| 1355 |
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
| 1356 |
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
| 1357 |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
| 1358 |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
| 1359 |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
| 1360 |
POSSIBILITY OF SUCH DAMAGES. |
| 1361 |
|
| 1362 |
END OF TERMS AND CONDITIONS |
| 1363 |
|
| 1364 |
How to Apply These Terms to Your New Programs |
| 1365 |
|
| 1366 |
If you develop a new program, and you want it to be of the greatest |
| 1367 |
possible use to the public, the best way to achieve this is to make it |
| 1368 |
free software which everyone can redistribute and change under these terms. |
| 1369 |
|
| 1370 |
To do so, attach the following notices to the program. It is safest |
| 1371 |
to attach them to the start of each source file to most effectively |
| 1372 |
convey the exclusion of warranty; and each file should have at least |
| 1373 |
the "copyright" line and a pointer to where the full notice is found. |
| 1374 |
|
| 1375 |
(one line to give the program's name and a brief idea of what it does.) |
| 1376 |
Copyright (C) 19yy < name of author > |
| 1377 |
|
| 1378 |
This program is free software; you can redistribute it and/or modify |
| 1379 |
it under the terms of the GNU General Public License as published by |
| 1380 |
the Free Software Foundation; either version 2 of the License, or |
| 1381 |
(at your option) any later version. |
| 1382 |
|
| 1383 |
This program is distributed in the hope that it will be useful, |
| 1384 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1385 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1386 |
GNU General Public License for more details. |
| 1387 |
|
| 1388 |
You should have received a copy of the GNU General Public License |
| 1389 |
along with this program; if not, write to the Free Software |
| 1390 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 1391 |
|
| 1392 |
|
| 1393 |
Also add information on how to contact you by electronic and paper mail. |
| 1394 |
|
| 1395 |
If the program is interactive, make it output a short notice like this |
| 1396 |
when it starts in an interactive mode: |
| 1397 |
|
| 1398 |
Gnomovision version 69, Copyright (C) 19yy name of author |
| 1399 |
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| 1400 |
This is free software, and you are welcome to redistribute it |
| 1401 |
under certain conditions; type `show c' for details. |
| 1402 |
|
| 1403 |
The hypothetical commands `show w' and `show c' should show the appropriate |
| 1404 |
parts of the General Public License. Of course, the commands you use may |
| 1405 |
be called something other than `show w' and `show c'; they could even be |
| 1406 |
mouse-clicks or menu items--whatever suits your program. |
| 1407 |
|
| 1408 |
You should also get your employer (if you work as a programmer) or your |
| 1409 |
school, if any, to sign a "copyright disclaimer" for the program, if |
| 1410 |
necessary. Here is a sample; alter the names: |
| 1411 |
|
| 1412 |
Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
| 1413 |
`Gnomovision' (which makes passes at compilers) written by James Hacker. |
| 1414 |
|
| 1415 |
< signature of Ty Coon > 1 April 1989 |
| 1416 |
Ty Coon, President of Vice |
| 1417 |
|
| 1418 |
This General Public License does not permit incorporating your program into |
| 1419 |
proprietary programs. If your program is a subroutine library, you may |
| 1420 |
consider it more useful to permit linking proprietary applications with the |
| 1421 |
library. If this is what you want to do, use the GNU Library General |
| 1422 |
Public License instead of this License. |
| 1423 |
</pre> |
| 1424 |
|
| 1425 |
<!-- ===================================================================== --> |
| 1426 |
<!--#include virtual="../../include/tail.html"--> |
| 1427 |
<!-- ===================================================================== --> |