For Programmers: Free Programming Magazines  


Home > Archive > Fortran > January 2006 > BLAS routines for Gauss-Jordan elimination









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author BLAS routines for Gauss-Jordan elimination
Rich Townsend

2006-01-12, 7:58 am

Hi all --

As part of a two-point boundary value problem solver (via relaxation), I've got
a routine that takes a rectangular matrix and reduces the "leading" square
submatrix to the unit matrix, via Gauss-Jordan elimination with partial
pivoting. It seems this takes up most of the time in my code. Thus, my question:
is there a BLAS routine that has the requisite functionality to do this?

cheers,

Rich
Joost

2006-01-12, 7:58 am

I guess that you want some fast implementation of LAPACK and use
something like DGESV

Joost

Rich Townsend

2006-01-12, 7:04 pm

Joost wrote:
> I guess that you want some fast implementation of LAPACK and use
> something like DGESV
>
> Joost
>


OK. Out of interest, is LAPACK competitive for small (6x6) matrices? Or will
self-coded stuff tend to win out?

cheers,

Rich

Tim Prince

2006-01-12, 7:04 pm

Rich Townsend wrote:
> Joost wrote:
>
>
> OK. Out of interest, is LAPACK competitive for small (6x6) matrices? Or
> will self-coded stuff tend to win out?
>

For such small problems, code expanded in-line and optimized is likely
to be faster.
Rich Townsend

2006-01-12, 7:04 pm

Tim Prince wrote:
> Rich Townsend wrote:
>
> For such small problems, code expanded in-line and optimized is likely
> to be faster.


Even if one bypasses LAPACK and uses BLAS for the row/column operations?

kia

2006-01-12, 7:04 pm

Rich Townsend wrote:
>
> Joost wrote:
>
> OK. Out of interest, is LAPACK competitive for small (6x6) matrices? Or will
> self-coded stuff tend to win out?


My oh my, must've been a rotten eggnog that stalled your last working
neuron!??
Last time I heard those codes are the same whatever the *N*, and it's
about 1500 lines, excluding BLAS - and you wanna self-code!?? My
suggestion - ask to be transferred to janitorial services, or anywhere
that would prevent you from embarrassing the Queen.

Rich Townsend

2006-01-12, 7:04 pm

kia wrote:
> Rich Townsend wrote:
>
>
>
> My oh my, must've been a rotten eggnog that stalled your last working
> neuron!??
> Last time I heard those codes are the same whatever the *N*, and it's
> about 1500 lines, excluding BLAS - and you wanna self-code!??


Yes. My own code takes 12 lines of executable statements to do the job. That may
be faster at small-N than the LAPACK routines which rely on large-N techniques
for efficiency, such as blocking.

My
> suggestion - ask to be transferred to janitorial services, or anywhere
> that would prevent you from embarrassing the Queen.
>


Foot in your mouth agian, Voh? You'll have to make it more subtle, or some
people might think I'm paying you a retainer to be my monkey.

Victor Eijkhout

2006-01-26, 7:03 pm

Rich Townsend <rhdt@barVOIDtol.udel.edu> wrote:

> OK. Out of interest, is LAPACK competitive for small (6x6) matrices? Or will
> self-coded stuff tend to win out?


Lapack will be more stable because of pivoting and such.

However, Lapack routines do a good amount of sanity checking on the
input, so you might take the source and edit that sort of stuff out. I
can imagine that it makes a difference on matrices that small.

Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
ph: 512 471 5809
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com