HP MLIB User's Guide Vol. 2 7th Ed.

648 HP MLIB User’s Guide
Rounding off
Currently, 8 MB*(the number of threads) should be sufficient for all MLIB
subprograms. If your application launchs threads directly from pthread library
calls, set the minimum allocated stack size to match HP MLIB needs on each
new thread. Setting the stack size on HP-UX as follows would be sufficient for
programs that execute on two threads:
int stacksize = 8388608;
(...)
pthread_attr_setstacksize(&thread_attr, stacksize);
pthread_create(&thread_id, &thread_attr, thread_func, &thread_parm);
(...)
Rounding off
LAPACK subprograms may use a different arithmetic order of evaluation than
other implementations. Different roundoff characteristics can result. Accuracy
of results is usually similar to other implementations, so using LAPACK should
not materially affect the accumulation of roundoff errors in a complete
application program. If it does, examine the mathematical analysis of the
problem to determine if it is ill-conditioned. Ill-conditioned means that the
small roundoff errors that are inadvertently introduced into any computation
are magnified out of proportion to the desired result. Similarly, if results with
and without LAPACK differ materially, both sets of answers are probably
inaccurate and you should investigate further. If the program correctly applies
stable computational algorithms, the problem itself is probably ill-posed.
Working storage
Many LAPACK subprograms require the user to supply one or more arrays to
be used for work space. In some cases, the length of the required work space is
not specified exactly in the subprogram documentation. For example, the work
space length may be described as follows for a subroutine:
lwork The length of array work. lwork max(1,m). For good
performance, lwork must generally be larger. The
optimum value of lwork for high performance is
returned in work(1).