Re: Who uses clapack?

From: Jentje Goslinga (goslinga_at_telus.net)
Date: 12/12/04


Date: Sun, 12 Dec 2004 18:11:10 GMT


Roman Werpachowski wrote:
> On the Fri, 10 Dec 2004 23:51:09 -0500, Victor Eijkhout wrote:
>
>>Jentje Goslinga <goslinga@telus.net> wrote:
>>
>>
>>>No dynamic memory allocation but the eternal WORK and IWORK
>>>arrays which are partitioned up in intricate ways.
>>>Does Lapack really need to cater to prehistorical compilers
>>>which do not support dynamic memory allocation?
>>
>>Ok, it's clear where this use of temporaries comes from. However, it's
>>not clear that dynamic allocation is the best solution. If your routine
>>is called once, with a large dataset, then it could do its own
>>alloation. However, if the routine is called a large number of times
>>with the same small problem size, then you want to do the allocation
>>outside it.
>>
>>We probably have to take a step back to the application level, and see
>>which routines can be part of a computationally intensive inner loop.
>
>
> The only sensible way would be to have two functions: one which does the
> allocation, another which does not. The problem is, that sometimes one
> can flexibly choose a work space area, like in (D,S)SYEV routine. Small
> workspace conserves memory but large workspace gives better convergence.
> Which options should the self-allocating version of (D,S)SYEV choose?

Isn't this issue of "conserving memory" an issue from the
sixties when that memory simply wasn't there?
Processor clock speed has increased over the years according
to Amdahl's Law but hasn't memory size increased at a much
higher rate?
I realize that there are platforms where memory may be harder
to obtain, for example because it is required to be very fast.

However, I question the motivation to "conserve memory";
I am not saying it should be used frivolously but would like
to remind you that it is not consumed but recycled after your
program exits.
In my world of Linear Algebra Problems the work counts are
often between n^2 and n^3 and you run out off patience long
before you run out off memory.
While you are waiting for the Eigenvectors of that medium size
order 2,000 matrix to compute let's figure it out: that is
(2,000)^2 times 8 bytes (assuming double precision) which is
32 Mb; let's multiply that figure by four or five for work
storage.
Then take a trip to the PC dealer around the corner and buy
some memory modules.

One more note on Lapack now that I come to think of these
clever options where the input Matrix is overwritten if some
flag is set:
Maybe Lapack should get rid of those character flags
(an earlier poster also mentioned them) since character
arguments are usually padded to two or four bytes before
being pushed onto the program stack, and it the way this
is done may not be identical between languages.
That would be one less headache for the people who have to
call Lapack functions from other languages.
It looks pretty archaic too, in most computer languages,
one would use symbolic constants but these of course require
"include files" with definitions.

Jentje Goslinga



Relevant Pages

  • Re: Fabrication of Lisp rating
    ... > C and other languages with only manual allocation and releasing of ... > memory blocks via built-in language features or standard library functions. ... > Assembly language, Forth, and any other languages that have no built-in ... instead of trapping into the OS, you can even use it in assembler. ...
    (comp.lang.lisp)
  • Re: Differences in data description in programming languages
    ... "based" phrase which does a lot of what is done with "dynamic allocation" in ... other languages. ... > allocation 'malloc', I would guess is probably available in all of our ... > major chunk of memory, then you probably are wasting your time clicking on ...
    (comp.lang.cobol)
  • Re: Crash of dlincg
    ... is not allocation for the return inverse but the working space inside ... the routine itself so allocating that memory a priori isn't going to ... memory for the work arrays outside the routine and pass it by using the ... application to be able to allocate this work space, ...
    (comp.lang.fortran)
  • Re: How to release heap memory that is marked as free
    ... As I said, fragmentation is a very serious problem, and one of the most serious problems ... my allocator was accused of using massive amounts of memory. ... I'm going to have to re-think the memory allocation that I'm ... process's 'working set'. ...
    (microsoft.public.vc.mfc)
  • Re: [PATCH 00/28] Swap over NFS -v16
    ... memory they can consume. ... So we need the extra (skb) ... included in the reserve? ... if the allocation had to dip into emergency reserves, ...
    (Linux-Kernel)