* calling Fortran BLAS Routines
@ 1999-12-22 5:00 Johannes Nix
1999-12-23 5:00 ` Martin Kahlert
1999-12-23 5:00 ` Tony Hammitt
0 siblings, 2 replies; 3+ messages in thread
From: Johannes Nix @ 1999-12-22 5:00 UTC (permalink / raw)
Hello,
I am trying to call the optimized (assembler-coded) BLAS routines
written by Kazushigi Goto from a C Program. He writes they are
entirely compatible to the Fortran originals, but I didn't manage to
call sdot_. All what I get out is zero. I tried also to compare with
f2c output but I don't know Fortran :-(.
I was trying this:
tdot.c:
--------------------
float s;
int n=5,inc=1;
float x[]= { .....};
float y[]= { .....};
s = sdot_(&n, x, &inc, y, &inc);
---------------------
gcc -o tdot tdot.c -ldot
All documentation I found regarding the BLAS Routines was like:
S - REAL
D - DOUBLE PRECISION
C - COMPLEX
Z - COMPLEX*16
FUNCTION xDOT (N, X, INCX, Y, INCY) dot <- X^T*Y x=S,D,DS
.......
anyone could help me?
BTW., is it possible to link this to object files compiled with ccc?
Does someone has suggestions for very fast vectorized signal
processing routines? Does there exist a standard library?
Johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: calling Fortran BLAS Routines
1999-12-22 5:00 calling Fortran BLAS Routines Johannes Nix
1999-12-23 5:00 ` Martin Kahlert
@ 1999-12-23 5:00 ` Tony Hammitt
1 sibling, 0 replies; 3+ messages in thread
From: Tony Hammitt @ 1999-12-23 5:00 UTC (permalink / raw)
Johannes Nix wrote:
>
> Hello,
>
> I am trying to call the optimized (assembler-coded) BLAS routines
> written by Kazushigi Goto from a C Program. He writes they are
> entirely compatible to the Fortran originals, but I didn't manage to
> call sdot_. All what I get out is zero. I tried also to compare with
> f2c output but I don't know Fortran :-(.
>
> I was trying this:
>
> tdot.c:
>
> --------------------
> float s;
> int n=5,inc=1;
>
> float x[]= { .....};
> float y[]= { .....};
>
> s = sdot_(&n, x, &inc, y, &inc);
> ---------------------
>
> gcc -o tdot tdot.c -ldot
>
> All documentation I found regarding the BLAS Routines was like:
>
> S - REAL
> D - DOUBLE PRECISION
> C - COMPLEX
> Z - COMPLEX*16
>
> FUNCTION xDOT (N, X, INCX, Y, INCY) dot <- X^T*Y x=S,D,DS
> .......
>
> anyone could help me?
>
> BTW., is it possible to link this to object files compiled with ccc?
>
> Does someone has suggestions for very fast vectorized signal
> processing routines? Does there exist a standard library?
>
> Johannes
Johannes,
I have some C code that I wrote to interface to Goto-san's BLAS
libraries. Email me at thammitt@kc.rr.com if you're interested,
it uses SGEMM but maybe it will be helpful.
Compaq has a whole signal processing library already written,
called CXML. Contact fortran@compaq.com for pointers on how to
obtain the library. It used used to be easily found through their
website, but since the fortran compiler went commercial, it is
hard to find.
(from their online docs)
CXML includes subroutines covering the areas of:
* Basic Linear Algebra (BLAS) - includes BLAS 1, BLAS 1E, BLAS 1S,
BLAS 2 and BLAS 3.
* Linear and Eigen System Solvers (LAPACK)
* Sparse Linear System Solvers: includes direct and iterative solvers
* Signal Processing: includes FFTs, cos/sin transforms, convolution,
correlations and digital filters
So, you might not have much work to do to implement signal processing
on you alpha box. Then again, these routines aren't exactly portable
to another architecture so YMMV.
I've never seen any performance numbers for CXML. I know Goto-san's
code is extremely fast, maybe all those high priced programmers at
Compaq can come close =-)
Regards,
Tony Hammitt
thammitt@kc.rr.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: calling Fortran BLAS Routines
1999-12-22 5:00 calling Fortran BLAS Routines Johannes Nix
@ 1999-12-23 5:00 ` Martin Kahlert
1999-12-23 5:00 ` Tony Hammitt
1 sibling, 0 replies; 3+ messages in thread
From: Martin Kahlert @ 1999-12-23 5:00 UTC (permalink / raw)
To: Johannes Nix
[Posted and mailed]
In article <83r5et$a3o@news.informatik.uni-oldenburg.de>,
Johannes Nix <jnix@medi.physik.uni-oldenburg.de> writes:
>
> Hello,
> I am trying to call the optimized (assembler-coded) BLAS routines
> written by Kazushigi Goto from a C Program. He writes they are
> entirely compatible to the Fortran originals, but I didn't manage to
> call sdot_. All what I get out is zero. I tried also to compare with
> f2c output but I don't know Fortran :-(.
Did you put a prototype in front of your call?
i.e. something like
float sdot_(const int*,const float*,const int*,const float*,const int*);
?
Without that, every C-compiler assumes that sdot_ will return an int,
which is a bit wrong...
Bye,
Martin.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-12-23 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-22 5:00 calling Fortran BLAS Routines Johannes Nix
1999-12-23 5:00 ` Martin Kahlert
1999-12-23 5:00 ` Tony Hammitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox