(3M) Calculator User Manual

-lscotch -lscotcherr -lm”. If you want to handle errors by yourself, you
should not link with library file libscotcherr.a, but rather provide a SCOTCH
errorPrint() routine. Please refer to sectio n 7.12 for more information.
7.1.4 Machine word size issues
Graph indices are represented in Scotch as integer values of type SCOTCH
Num. By
default, this type equates to the int C type, that is, an integer type of size eq ual
to the one of the machine wor d. However, it can represent any other integer type.
Indeed, the size of the SCOTCH
Num integer type can be coerced to 32 or 64 bits
by using the -DINTSIZE32 or -DINTSIZE64 compilation flags, respectively, or
else by using the -DINT= definition (se e Section 8.3 for more information on the
setting of these compilation flags).
Consequently, the C interface of Scotch uses two types of integers. Graph-
related quantities are passed as SCOTCH
Nums, while system-related values such as
file handles, as well as return values o f libScotch routines, are always passed as
ints.
Because of the var iability of librar y integer type sizes, one must be careful
when using the Fortran interfac e of Scotch, as it does not provide any proto-
typing information, and consequently cannot produce any warning at link time.
In the manual pages of the libScotch routines, Fortran prototypes are written
using three types of INTEGERs. As for the C interface, the regula r INTEGER type
is used for system-based values , such as file handles and MPI communicators, as
well as for return values of the libScotch routines, while the INTEGER*num type
should be used for all graph-related values, in accordance to the size of the SCOTCH
Num type, as set by the -DINTSIZEx compilation flags. Also, the INTEGER*idx
type represents an integer type of a size equivalent to the one of a SCOTCH Idx, as
set by the -DIDXSIZEx compilatio n flags. Values of this type are used in the For-
tran interface to represent arbitrary array indices which can span across the whole
address space, and consequently deserve spe cial treatment.
In practice, when Scotch is compiled on a 32-bit architecture so as
to use 64-bit SCOTCH
Nums, graph indices should be declared as INTEGER*8,
while erro r return values should still be declared as plain INTEGER (that is,
INTEGER*4) values. On a 32
64-bit architecture, irrespective of whether SCOTCH
Nums are defined as INTEGER*4 or INTEGER*8 quantities, the SCOTCH Idx type
should always be defined as a 64-bit quantity, that is, an INTEGER*8, because
it stores differences between memory addresses, which are represented by 64-bit
values. The above is no longer a problem if Scotch is c ompiled such that ints
equate 64-bit integers. In this case, there is no need to use any type coercing
definition.
Also, the MeTiS compatibility library provided by Scotch will not work when
SCOTCH
Nums are not ints, since the interface of MeTiS uses regular ints to represent
graph indices. In addition to compile-time warnings, an error message will be issued
when one of these routines is called.
7.2 Data formats
All of the data used in the libScotch interface are of integer ty pe SCOTCH Num.
To hide the internals of Scotch to callers, all of the data structures are opaq ue,
that is, declared within scotch.h as dummy arrays of do uble precision values, for
the sake of data alignment. Accessor routines, the names of which end in Size
49