dependency tree

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

dependency tree

Postby error5772 » Sun May 05, 2013 6:57 am

Hi people!

Before I start to find all called routines of dsyevx on my own...

Is there a "dependency tree" for Lapack-routines that shows all
external functions/subroutines used by dsyevx or ... and which
they call further?


My aim is to pick out the LAPACK diagonalizer, use "long double"-FPU
numbers, optimize the f2c-code to better C (C++), but only if this is not too
much of course. I found out that translating and optimizing the valuable
dstein-subroutine can be done! I would also share the result...
Posts: 19
Joined: Thu Sep 01, 2011 5:02 am

Re: dependency tree

Postby CyLith » Sun May 05, 2013 10:28 pm

The new doxygen files show the dependency tree: Warning: the Javascript will cripple your browser for a while.

I have converted the entire symmetric tridiagonal dependency chain to C++, if you're interested. See and the Eigensystem routines near the bottom. The ReduceHerm routine performs the initial reduction from symmetric to tridiagonal, and this file contains the driver routine for symmetric systems. It doesn't handle the "expert mode" features though. The dependencies of these files are fairly light. These were obtained from the f2c'd versions that have been cleaned up substantially. I am fairly confident about the correctness of that code.
Posts: 41
Joined: Sun Feb 08, 2009 7:23 am
Location: Stanford, CA

Re: dependency tree

Postby error5772 » Mon May 06, 2013 9:40 am


Thanks a lot - that's more than I expected!
The dependency tree will help a lot - to decide
if that and which work can be done or not.

Your code will help also, but it seems to be a hole
project in C++!? C++ handels data and the
routines that access it very nice, but to speed it
up is difficult, because the compiler adds so many
assembler sections and stuff to keep the C++
possibilities open at every point. However...

If you want to check how many clocks a SINGLE CPU
did on your routines you can use the following Inline-ASM
makro for Intel 32/64 bits that runs ONLY on GCC and all
childs - GFortran, G++. Measuring time is not the best thing

1. you need a 64-Bit-Integer-type (easy on X86_64, but IA32...)
These are for C or C++, but on Fortran you have to use

Code: Select all
#ifdef __x86_64__
  typedef unsigned long int tsc_t;
  typedef unsigned long long int tsc_t;

2. Here is the Clock-Counter-Makro brought to you by IBM.
It does not depend on C-, C++- or Fortran-language, but
on the GCC compiler suite - the languages are anyway all
the same on that level...

Code: Select all
#define rdtscll(val) __asm__ __volatile__ ("rdtsc" : "=A" (val))

That's it:

3. Now, create 2 vars to bracket routine-calls in your code
Code: Select all
tsc_t start, stop;

4. Now include it before and after the call:

Code: Select all
"your C or C++-Code"
cout << stop - start << " Calls" << endl;

This will give you the actual number of CPU-clocks,
but it differs - the min number should be the real count.
You can give the proc a high priority to minimize the
influence of other threads.

Thanks a lot! Looking at the code will take time...


Greetings from germany.
If you already know - sorry for wasting time.
Posts: 19
Joined: Thu Sep 01, 2011 5:02 am

Return to Algorithm / Data

Who is online

Users browsing this forum: No registered users and 1 guest