1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
|
\chapter{The setup}
\label{setup}
When \FORM\ is started, it has a number of settings\index{setup} built in
that were determined during its installation\index{installation}. If the
user would like to alter these settings, it is possible to either specify
their desired values in a setup file\index{file!setup} or to do so at the
beginning of the program file\index{file!program}. There are two ways in
which \FORM\ can find a setup file. The first way is by having a file named
`form.set'\index{form.set} in the current directory. If such a file is
present, \FORM\ will open it and interpret its contents as setup parameters.
If this file is not present, one may specify a setup file with the -s
option in the command tail. This option must precede the name of the input
file. After the -s follow one or more blanks or tabs and then the full name
of the setup file. \FORM\ will try to read startup parameters from this file.
If a file `form.set' is present, \FORM\ will ignore the -s option and its
corresponding file name. This order of interpretation allows the user to
define an alias with a standard setup file which can be overruled by a
local setup file. If, in the beginning of the program file, before any
other statements with the exception of the \#- instruction and commentary
statements, there are lines that start with \#: the remaining contents of
these lines are interpreted exactly like the lines in the setup file. The
specifications in the program file take precedence\index{precedence} over
all other specifications. If neither of the above methods is used, \FORM\
will use a built in set of parameters. Their values may depend on the
installation and are given below.
The following is a list of parameters that can be set. The syntax is rather
simple: The full word must be specified (case insensitive), followed by one
or more blanks or tabs and the desired number, string or character.
Anything after this is considered to be commentary. In the setup file lines
that do not start with an alphabetic character are seen as commentary. The
sizes of the buffers are given in bytes, unless mentioned otherwise. A word
is 2 bytes for 32\index{32 bits} bit machines and 4 bytes for 64\index{64
bits} bit machines.
In \FORM\ version 3.3 and later, it is also allowed to define
preprocessor variables\index{preprocessor variables} (see also
\ref{preprovariables}) in the setup file. In addition one can use
preprocessor variables in the setup, provided it is not in the name of the
parameter/keyword.
\leftvitem{4.0cm}{bracketindexsize\index{setup!bracketindexsize}\index{bracketindexsize}}
\rightvitem{12.6cm}{Maximum size in bytes of any individual index of a
bracketted expression. Each expression will have its own index. The index
starts with a relatively small size and will grow if needed. But it will
never grow beyond the specified size. If more space is needed, \FORM\ will
start skipping brackets and find those back later by linear search. See
also chapter~\ref{brackets} and section~\ref{substabracket}.}
\leftvitem{4.0cm}{CommentChar\index{setup!commentchar}\index{commentchar}}
\rightvitem{12.6cm}{This should be followed by one or more blanks and a
single non-blank character. This character will be used to indicate
commentary, instead of the regular $*$ in column 1.}
\leftvitem{4.0cm}{CompressSize\index{setup!compresssize}\index{compresssize}}
\rightvitem{12.6cm}{When compressing output terms, \FORM\ needs a compression
buffer. This buffer deals recursively with compression and decompression of
terms that are either written or read. Its size will be at least
MaxTermSize but when there is heavy use of expressions in the right hand
side of definitions or substitution it would have to be considerably
longer. It is hoped that in the future this parameter can be eliminated.
CompressSize should be given in bytes.}
\leftvitem{4.0cm}{ConstIndex\index{setup!constindex}\index{constindex}}
\rightvitem{12.6cm}{This is the number of indices that are considered to be
constant indices like in fixed vector components (the so-called fixed
indices). The size of this parameter is not coupled to any array space, but
it should not go much beyond 1000 on a 32\index{32 bits} bit machine. On a
64\index{64 bits} bit machine it can go considerably further.}
\leftvitem{4.0cm}{ContinuationLines\index{setup!continuationlines}\index{continuationlines}}
\rightvitem{12.6cm}{The number of continuation lines that the local Fortran
compiler will allow. This limits the number of continuation lines, when the
output option `Format Fortran' (see \ref{substaformat}) is selected.}
\leftvitem{4.0cm}{Define\index{setup!define}\index{define}}
\rightvitem{12.6cm}{The syntax is as in the \#define instruction in the
preprocessor (see \ref{preprovariables}), with the remark that in the setup
file there should be no leading \# character as that would make the line
into commentary. Example: \hfill \\
{\tt\ \ \ \ define MODULUS "31991"} \hfill \\
which could be used
at a later point in the program to activate a modulus statement (see
\ref{substamodulus}).}
\leftvitem{4.0cm}{DotChar\index{setup!dotchar}\index{dotchar}}
\rightvitem{12.6cm}{There should be a single character following this name
(and the blank(s) after it). This character will be used instead of the \_,
when dotproducts\index{dotproducts} are printed in Fortran\index{Fortran}
output. This option is needed because some Fortran compilers do not
recognize the underscore as a valid character. In the olden days one could
use here the dollar character but nowadays many Fortran compilers do not
recognize this character as belonging to a variable name.}
\leftvitem{4.0cm}{FunctionLevels\index{setup!functionlevels}\index{functionlevels}}
\rightvitem{12.6cm}{The maximum number of levels that may occur, when
functions have functions in their arguments.}
\leftvitem{4.0cm}{HideSize\index{setup!hidesize}\index{hidesize}}
\rightvitem{12.6cm}{The size of the hide buffer. The size of this buffer is
normally set equal to scratchsize (see below). If one uses the setting of
HideSize after the setting of ScratchSize, one can give the hide buffer its
own size. There are cases that this can make the program faster.}
\leftvitem{4.0cm}{IncDir\index{setup!incdir}\index{incdir}}
\rightvitem{12.6cm}{Directory (or path of directories) in which \FORM\ will
look for files if they are not to be found in the current directory. This
involves files for the \#include\index{\#include} and \#call\index{\#call}
instructions. This variable takes precedence over the
Path\index{setup!path}\index{path} variable.}
%\leftvitem{4.0cm}{IndentSpace\index{setup!indentspace}\index{indentspace}}
%\rightvitem{12.6cm}{}
\leftvitem{4.0cm}{InsideFirst\index{setup!insidefirst}\index{insidefirst}}
\rightvitem{12.6cm}{Not having any effect at the moment.}
\leftvitem{4.0cm}{JumpRatio\index{setup!jumpratio}\index{jumpratio}}
\rightvitem{12.6cm}{See the endswitch (\ref{substaendswitch}) statement.}
\leftvitem{4.0cm}{MaxNumberSize\index{setup!maxnumbersize}\index{maxnumbersize}}
\rightvitem{12.6cm}{Allows the setting of the maximum size of the numbers
in \FORM. The number should be given in words. For 32\index{32 bits} bit
systems a word is two bytes and for 64\index{64 bits} bit systems a word is
4 bytes. The number size is always limited by the maximum size of the terms
(see MaxTermSize). Actually it has to be less than half of MaxTermSize
because a coefficient contains both a numerator and a denominator. It is
not always a good idea to have the number size at its maximum value,
especially when MaxTermSize is large. In that case it could be very long
before a runaway algorithm runs into limitations of size (arithmetic for
very long fractions is not very fast due to the continuous need for
computing GCD's)}
\leftvitem{4.0cm}{MaxTermSize\index{setup!maxtermsize}\index{maxtermsize}}
\rightvitem{12.6cm}{This\label{setupmaxtermsize}
is the maximum size that an individual term may occupy in words. This
size does not affect any allocations. One should realize however that the
larger this size is the heavier the demand can be on the workspace, because
the workspace acts as a heap during the execution and sometimes allocations
have to be made in advance, before \FORM\ knows what the actual size of the
term will be. Consequently the evaluation tree cannot be very deep, when
WorkSpace / MaxTermSize is not very big. MaxTermSize controls mainly how
soon \FORM\ starts complaining about terms that are too complicated. Its
absolute maximum is 32568 on 32\index{32 bits} bit systems and about $10^9$
on 64\index{64 bits} bit systems (of course the workspace would have to be
considerably larger than that....).}
\leftvitem{4.0cm}{MaxWildCards\index{setup!maxwildcards}\index{maxwildcards}}
\rightvitem{12.6cm}{The maximum number of wildcards that
can be active in a single matching of a pattern. Under normal circumstance
the default value of 100 should be more than enough.}
\leftvitem{4.0cm}{NoSpacesInNumbers\index{setup!nospacesinnumbers}\index{nospacesinnumbers}}
\rightvitem{12.6cm}{Long\label{nospacesinnumbers} numbers are usually spread over several lines
by placing a backspace character at the end of each line and then
continuing at the next line. For cosmetic purposes \FORM\ puts usually a few
blank spaces at the beginning of the new line. \FORM\ itself can read this but
some programs cannot. Hence one can put \FORM\ in a mode in which these
blanks are omitted. The values of the variable are ON or OFF. There is also
a command to change this behaviour at runtime. See the on and off commands
in sections \ref{staonnospacesinnumbers} and \ref{staoffnospacesinnumbers}.}
\leftvitem{4.0cm}{NumStoreCaches\index{setup!numstorecaches}\index{numstorecaches}}
\rightvitem{12.6cm}{This number determines how many store caches (see
the description of the SizeStoreCache setup parameter below) there will
be. In the case of parallel processing this will be the number of caches
per processor.}
\leftvitem{4.0cm}{NwriteStatistics\index{setup!nwritestatistics}\index{nwritestatistics}}
\rightvitem{12.6cm}{When this word is mentioned, the default setting for the
statistics is that no run time statistics will be shown. Ordinarily they
will be shown.}
\leftvitem{4.0cm}{NwriteThreadStatistics\index{setup!nwritethreadstatistics}
\index{nwritethreadstatistics}}
\rightvitem{12.6cm}{\vspace{1ex}This variable has the values ON or OFF. It controls for
\TFORM{} whether the statistics of the individual threads will be printed. The
default value is ON.}
\leftvitem{4.0cm}{OldOrder\index{setup!oldorder}\index{oldorder}}
\rightvitem{12.6cm}{A special flag (values ON/OFF) by which one can still
select the old option of not checking for the order of statements inside a
module. This should be used only in the case that it is nearly impossible
to change a program to the new mode in which the order of the statements
(declarations etc) is relevant. In the future this old mode may not exist.}
\leftvitem{4.0cm}{Parentheses\index{setup!parentheses}\index{parentheses}}
\rightvitem{12.6cm}{The maximum number of nestings of parentheses or
functions inside functions. The variable may be eliminated in a later
version.}
\leftvitem{4.0cm}{Path\index{setup!path}\index{path}}
\rightvitem{12.6cm}{Directory (or path of directories) in which \FORM\ will
look for files if they are not to be found in the current directory. This
involves files for the \#include\index{\#include} and \#call\index{\#call}
instructions. \FORM\ will test this path after a potential path specified as
IncDir\index{setup!incdir}\index{incdir}.}
%\leftvitem{4.0cm}{PolyGCDchoice\index{setup!polygcdchoice}\index{polygcdchoice}}
%\rightvitem{12.6cm}{}
\leftvitem{4.0cm}{ProcedureExtension\index{setup!procedureEetension}\index{procedureextension}}
\rightvitem{12.6cm}{The extension that will be used by \FORM\ for finding the
procedures that are in separate files. Restrictions on the strings used are
as explained in the preprocessor
\#procedureextension\index{\#procedureextension} instruction in section
\ref{preprocedureextension}.}
\leftvitem{4.0cm}{ProcessBucketSize\index{setup!processbucketsize}\index{processbucketsize}}
\rightvitem{12.6cm}{\label{setupprocessbucketsize} For the parallel version
\ParFORM. It is ignored in other versions. Tells \ParFORM\ how many terms
there should be in the buckets that are being distributed over the
secondary processors. See also \ref{substaprocessbucketsize}.}
\leftvitem{4.0cm}{ResetTimeOnClear\index{setup!resettimeonclear}\index{resettimeonclear}}
\rightvitem{12.6cm}{The value is ON or OFF. The default value is ON. This
means that by default the clock is reset after each .clear\index{.clear}
(see chapter \ref{modules} on modules) instruction at the end of a module.}
\leftvitem{4.0cm}{ScratchSize\index{setup!scratchsize}\index{scratchsize}}
\rightvitem{12.6cm}{The size of the input and the output buffers for the
regular algebra processing. Terms are read in in chunks this size and are
written to the output file using buffers of this size. There are either two
or three of these buffers, depending on whether the hide\index{hide}
facility is being used (see \ref{substahide}). These buffers must have a
size that is at least as large as the MaxTermSize\index{maxtermsize}. These
buffers act as caches for the files with the extension .sc1\index{.sc1},
.sc2\index{.sc2} and .sc3\index{.sc3}. See also the HideSize parameter
above for the independent setting of the size of the hide buffer.}
\leftvitem{4.0cm}{SizeStoreCache\index{setup!sizestorecache}\index{sizestorecache}}
\rightvitem{12.6cm}{The size of the caches\index{caches} that are used for
reading terms when stored expressions are used in the r.h.s.\ of a
statement. Typically there are several such caches and they make the
reading much faster. In the case of parallel processing these caches become
very important because without them the different processes may all want to
read from the .str\index{.str} file\index{file!store} at the same time and
execution speed will suffer badly. The number of store caches is determined
by the NumStoreCaches\index{numstorecaches} setup parameter which is
described above. The size of these caches doesn't have to be very large as
compared to some of the other buffers. It is recommended though to have
them at least as large as MaxTermSize\index{maxtermsize} (see above).}
\leftvitem{4.0cm}{SortType\index{setup!sorttype}\index{sorttype}}
\rightvitem{12.6cm}{Possible values are "lowfirst"\index{lowfirst},
"highfirst"\index{highfirst} and "powerfirst"\index{powerfirst}. "lowfirst"
is the default. Determines the order in which the terms are placed during
sorting. In the case of lowfirst, lower powers of symbols and dotproducts
come before higher powers. In the case of highfirst it is the opposite. In
the case of powerfirst the combined powers of all symbols together are
considered and the highest combined powers come first. See also the
on\index{on} statement in \ref{substaon}.}
\leftvitem{4.0cm}{TempDir\index{setup!tempdir}\index{tempdir}}
\rightvitem{12.6cm}{This variable should contain the name of a directory
that is the directory in which \FORM\ should make its temporary files. If the
-t option is used when \FORM\ is started, the TempDir variable in the
setup file is ignored. \FORM\ can create a number of different temporary
files.}
\leftvitem{4.0cm}{TempSortDir\index{setup!tempsortdir}\index{tempsortdir}}
\rightvitem{12.6cm}{This variable should contain the name of a directory
that is the directory in which \FORM{} should make its temporary sort files.
If the -ts option is used when \FORM{} is started, the TempSortDir variable in
the setup file is ignored. If TempSortDir is not specified, then the value of
TempDir is used also for sort files.}
\leftvitem{4.0cm}{ThreadBucketSize\index{setup!threadbucketsize}\index{threadbucketsize}}
\rightvitem{12.6cm}{Only relevant for \TFORM. The size of the number of
terms sent to the workers simultaneously.
For details see the chapter on the parallel version (\ref{parallel}).}
\leftvitem{4.0cm}{ThreadLoadBalancing\index{setup!threadloadbalancing}\index{threadloadbalancing}}
\rightvitem{12.6cm}{\indent Only relevant for \TFORM. Possible values are ON
or OFF. For details see the chapter on the parallel version (\ref{parallel}).}
\leftvitem{4.0cm}{Threads\index{setup!threads}\index{threads}}
\rightvitem{12.6cm}{Only relevant for \TFORM\ (see chapter on the parallel
version). Specifies the default number of worker threads to be used. The
values 0 and 1 will indicate that running will only be done by the master
thread (\ref{parallel}).}
\leftvitem{4.0cm}{ThreadScratchOutSize\index{setup!threadscratchoutsize}\index{threadscratchoutsize}}
\rightvitem{12.6cm}{The size of the output scratch buffers for each of the
worker threads. These buffers will be used when the InParallel
statement~\ref{substainparallel} is active. They are used to catch the
output of the expressions as processed by the individual workers before
they are copied to the output scratch buffer/file of the master. The output
scratch buffer/file of each worker will never contain more than one
expression at a time.}
\leftvitem{4.0cm}{ThreadScratchSize\index{setup!threadscratchsize}\index{threadscratchsize}}
\rightvitem{12.6cm}{The size of the input scratch buffers for each of the
worker threads. These buffers are only used when the main scratch buffers
of the master process aren't sufficient and scratch files have been made.
When the buffers of the master are big enough, the workers only use
pointers to the buffer of the master. Once there are scratch files the
buffer is used for caching the input from those files. In that case each
worker has its own cache. For reading purposes it can actually be counter
productive if these buffers are very large. This parameter sets the value
for the input and the hide\index{hide} scratch files. The output scratch
size for the workers is set with the ThreadScratchOutSize parameter.}
%\leftvitem{4.0cm}{ThreadSortFileSynch\index{setup!threadsortfilesynch}\index{threadsortfilesynch}}
%\rightvitem{12.6cm}{\indent Only relevant for \TFORM. Possible values are ON
%or OFF. For details see the chapter on the parallel version (\ref{parallel}).}
\leftvitem{4.0cm}{TotalSize\index{setup!totalsize}\index{totalsize}}
\rightvitem{12.6cm}{Puts \FORM\ in a mode in which it tries to determine
the maximum space occupied by all expressions at any given moment during
the execution of the program. This space is the sum of the
input/output/hide scratch files, the sort file(s) and the .str file. This
maximum is printed at the end of the program. The same can be obtained with
the "On TotalSize" statement (see \ref{ontotalsize}) or the -T option
in the command tail when \FORM\ is started (see \ref{running}).}
\leftvitem{4.0cm}{WorkSpace\index{setup!workspace}\index{workspace}}
\rightvitem{12.6cm}{The size of the heap that is used by the algebra
processor when it is evaluating the substitution tree. It will contain
terms, half finished terms and other information. The size of the workspace
may be a limitation on the depth of a substitution tree.}
\leftvitem{4.0cm}{WTimeStats\index{setup!wtimestats}\index{wtimestats}}
\rightvitem{12.6cm}{Turns on the wall-clock time mode in the statistics.
See the `\texttt{On wtimestats}' statement~\ref{substaon}.}
Variables that take a path\index{path} for their value expect a sequence of
directories, separated by colon characters as in the UNIX\index{UNIX} way
to define such objects.
The above parameters are conceptually relatively easy. The parameters that
are still left are more complicated and are often restricted in their
size by some relationships. Hence it is necessary to understand the
sorting inside \FORM\ a little bit before using them. On the other hand
these parameters can influence the performance noticeably. See also chapter
\ref{sorting} for more details.
When terms are send to `output' by the main algebra engine, they are put
inside a buffer. This buffer is called the `small\index{small buffer}
buffer\index{buffer!small}'. Its size is given by the variable {\sl
SmallSize\index{smallsize}}. When this buffer is full, or when the number
of terms in this buffer exceeds a given maximum, indicated by the variable
{\sl TermsInSmall\index{termsinsmall}}, the contents of the buffer are
sorted. The sorting is done by pointers, hence it is important that the
small buffer resides inside the physical memory. During the sorting it may
happen that coefficients are added. The sum of two rational numbers can
take more space than any of the individual numbers, so there will be a
space problem. This has been solved by the construction of an extension to
the small buffer. The variable {\sl SmallExtension\index{smallextension}}
is the size of the small buffer together with this extension. The value for
SmallExtension will always be at least 7/6 times the value of SmallSize.
The result of the sorting of the small buffer is written to the
`large\index{large buffer} buffer\index{buffer!large}' (with the size {\sl
LargeSize\index{largesize}}) as a single object and the filling of the
small buffer can resume. Whenever there is not enough room in the large
buffer for the result of sorting the small buffer, or whenever there are
already a given number of these sorted `patches' in it (controlled by the
variable {\sl LargePatches\index{largepatches}}) the buffer will be sorted
by merging the patches\index{patch} to make room for the new results. The
output is written to the sort file as a single patch. Then the results from
the small buffer can be written to the large buffer. This game can continue
till no more terms are generated. In the end it will be necessary to sort
the results in the intermediate sort file\index{file!sort}. This can be
done with up to {\sl FilePatches\index{filepatches}} at a time. Because
file operations are notoriously slow the combination of the small buffer,
the small extension and the large buffer is used for caching\index{cache}
purposes. Hence this space can be split in `FilePatches' caches. The
limitation is that each cache should be capable to contain at least two
terms of maximal size. This means that the sum of SmallExtension and
LargeSize must be at least FilePatches times 2*MaxTermSize*(bytes in short
integer). It is possible to set the size of these caches directly with the
variable {\sl SortIOsize\index{sortiosize}}. If the variable is too large,
the variable FilePatches may be adjusted by \FORM. If there are more than
FilePatches patches in the sort file, a second sort file is needed for the
output of each `superpatch'\index{superpatch}. When the first sort file has
been treated, the second sort file can be treated in exactly the same way
as its predecessor. This process will finish eventually. When there are at
most FilePatches patches in a sort file, the output of their merging can be
written directly to the regular output. For completeness we give a list of
all these variables:
\leftvitem{3cm}{FilePatches\index{setup!filepatches}\index{filepatches}}
\rightvitem{13cm}{The maximum number of patches that can be merged
simultaneously, when the intermediate sort file is involved.}
\leftvitem{3cm}{LargePatches\index{setup!largepatches}\index{largepatches}}
\rightvitem{13cm}{The maximum number of patches that is allowed in the
large buffer. The large buffer may reside in virtual memory, due to the
nature of the sort that is applied to it.}
\leftvitem{3cm}{TermsInSmall\index{setup!termsinsmall}\index{termsinsmall}}
\rightvitem{13cm}{The maximum number of terms that is allowed in the small
buffer before it is sorted. The sorted result is either copied to the large
buffer or written to the intermediate sort file (when LargeSize is too
small).}
\leftvitem{3cm}{SmallSize\index{setup!smallsize}\index{smallsize}}
\rightvitem{13cm}{The size of the small buffer in bytes.}
\leftvitem{3cm}{SmallExtension\index{setup!smallextension}\index{smallextension}}
\rightvitem{13cm}{The size of the small buffer plus its extension.}
\leftvitem{3cm}{LargeSize\index{setup!largesize}\index{largesize}}
\rightvitem{13cm}{The size of the large buffer.}
\leftvitem{3cm}{SortIOsize\index{setup!sortiosize}\index{sortiosize}}
\rightvitem{13cm}{The size of the buffer that is used to write to the
intermediate sorting file and to read from it. It should be noted that if
this buffer is not very large, the sorting of large files may become rather
slow, depending on the operating system. Hence we recommend a potential
fourth stage in the sorting over having this number too small to fit more
filepatches in the combined small and large buffer. Setting the small and
large buffers to a decent size may avoid all problems by a: making more
space for the caching, b: creating fewer file patches to start with.}
There is a second set of the above setup parameters for sorts of
subexpressions\index{subexpressions} as in function arguments or in the
term environment (see \ref{substaterm}). Because these things can happen
with more than one level, whatever allocations have to be made (during
runtime when needed) may have to be made several times. Hence one should be
far more conservative here than with the global allocations. Anyway, those
sorts should rarely involve anything very big. With the function arguments
the condition is that the final result will fit inside a single term, but
with the term environment no such restriction exists. The relevant
variables here are subfilepatches, sublargepatches, sublargesize,
subsmallextension, subsmallsize, subsortiosize and subtermsinsmall. Their
meanings are the same as for the variables without the sub in front.
When \FORM\ is running in parallel mode (either \TFORM\ or \ParFORM) each worker
will need its own buffers. In \ParFORM\ in which the processors each control
their own memory, the size of each of these buffers are the same as for the
master process. In \TFORM\ with its shared memory the above sizes refer to
the buffers of the master thread. The workers each get basically buffers
with 1/N times the size of the buffer of the master. This may get made a
bit bigger when potential conflicts with MaxTermSize occur.
The default settings are
\begin{center}
\begin{tabular}{lrr}
Variable & 32-bits & 64-bits \\ \hline
bracketindexsize & 200000 & 200000 \\
commentchar & $*$ & $*$ \\
compresssize & 90000 & 90000 \\
constindex & 128 & 128 \\
continuationlines & 15 & 15 \\
dotchar & . & . \\
filepatches & 256 & 256 \\
functionlevels & 30 & 30 \\
hidesize & 50000000 & 50000000 \\
incdir & . & . \\
%indentspace & & \\
insidefirst & ON & ON \\
largepatches & 256 & 256 \\
largesize & 50000000 & 50000000 \\
maxnumbersize & 200 & 200 \\
maxtermsize & 10000 & 40000 \\
maxwildcards & 100 & 100 \\
nospacesinnumbers & OFF & OFF \\
numstorecaches & 4 & 4 \\
nwritefinalstatistics & OFF & OFF \\
nwritestatistics & OFF & OFF \\
nwritethreadstatistics &OFF & OFF \\
oldorder & OFF & OFF \\
parentheses & 100 & 100 \\
path & . & . \\
%polygcdchoice & 0 & 0 \\
processbucketsize & 1000 & 1000 \\
scratchsize & 50000000 & 50000000 \\
sizestorecache & 32768 & 32768 \\
smallextension & 20000000 & 20000000 \\
smallsize & 10000000 & 10000000 \\
sortiosize & 100000 & 100000 \\
sorttype & lowfirst & lowfirst \\
subfilepatches & 64 & 64 \\
sublargepatches & 64 & 64 \\
sublargesize & 4000000 & 4000000 \\
subsmallextension & 800000 & 800000 \\
subsmallsize & 500000 & 500000 \\
subsortiosize & 32768 & 32768 \\
subtermsinsmall & 10000 & 10000 \\
tempdir & . & . \\
tempsortdir & . & . \\
termsinsmall & 100000 & 100000 \\
threadbucketsize & 500 & 500 \\
threadloadbalancing & ON & ON \\
threads & 0 & 0 \\
threadsortfilesynch & OFF & OFF \\
threadscratchoutsize & 2500000 & 2500000 \\
threadscratchsize & 100000 & 100000 \\
workspace & 10000000 & 40000000
%zipsize & 32768 & 32768
\end{tabular}
\end{center}
If one compares these numbers with the corresponding numbers for older
versions one will notice that here we assume that the standard computer
will have much more memory available than in the `old time'. Basically we
expect that a serious \FORM\ user has at least 64 Mbytes available. If it is
considerably less one should define a setup file with smaller settings.
More recently a new notation for large numbers has been allowed. One can
use the characters K, M, G and T to indicate kilo (three zeroes), mega (6
zeroes), giga (9 zeroes) and tera (12 zeros) as in 10M for 10000000.
To find out what the setup values are, one can use the `ON,setup;'
statement (\ref{substaon}).
In version 3.3 and later one may use environment\index{environment}
variables for the values of the setup parameters, either in the setup file
or at the beginning of the .frm file. The environment variable is used as a
preprocessor variable in the sense that its name is enclosed in a
backquote-quote pair as in \verb:`VARNAME':. The variable will be looked
for and if found it will be substituted. This can however not be done in a
recursive way, because the regular routines that take care of the
preprocessor variables are not active yet when the setups are read.
|