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?

Michael

P.S.
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...
error5772
 
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: http://www.netlib.org/lapack/explore-html/d2/d8a/group__double_s_yeigen.html#ga68612cdf4ed1051c08f0b0735b8dfdea. 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 https://github.com/victorliu/RNP2/blob/master/RNP/LA/Tridiagonal.hpp and the Eigensystem routines near the bottom. The ReduceHerm routine performs the initial reduction from symmetric to tridiagonal, and this file https://github.com/victorliu/RNP2/blob/master/RNP/LA/Eigensystems.hpp 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.
CyLith
 
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

Ha!

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
here.

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
Fortran-types:

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


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
rdtscll(start);
"your C or C++-Code"
rdtscll(stop);
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...

M.

Greetings from germany.
P.S.
If you already know - sorry for wasting time.
error5772
 
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 3 guests