Message: 7
From: Dallas Trinkle <email@hidden>
Date: Wed, 28 Jan 2004 15:39:15 -0500
To: email@hidden
Subject: Re: veclib and LAPACK
On Dec 16, 2003, at 10:01 PM, email@hidden wrote:
We're studying the options now. [re: xlf and vecLib incompatibility]
This kind of thing wants to be addressed *really* carefully,
correctness wins over urgency IMO.
SCP
I know this is an "old" topic, but I just ran across the problem of
xlf's passing of complex types differing from what vecLib is expecting;
thanks to the archives, I confirmed my suspicions.
However, I had two questions:
1. Is apple still considering either a new xlf compatible wrapper for
the
complex BLAS libraries? If so, any idea when?
Just four Level 1 BLAS functions are at issue: CDOTC, CDOTU, ZDOTC, and
ZDOTU. Each returns a COMPLEX (or DOUBLE COMPLEX) value. When xlf
compiles a function invocation into a call to one of these routines, it
expects to find the *return* value in the floating point register file.
When g77 compiles a function invocation into a call to one of these
routines, it expects to find the return value in a pre-allocated
*memory* location. The vecLib implementation of these four functions is
compatible with the g77 scheme, but not the xlf scheme.
xlf codes may incorporate the following "wrappers" that re-implement
CDOTC, CDOTU, ZDOTC, and ZDOTU in terms of a utility *subroutine*
already present in vecLib. There is no ABI conflict in the call/return
scheme for these vecLib subroutines with xlf. It is crucial though,
that the same compiler, e.g. xlf, compile the caller to these
replacements as well as the replacements themselves so that the
*function* return ABI matches. The utility subroutines (cblas_*_sub)
are fully optimized for PowerPC.
!
! scp% /opt/ibmcmp/xlf/8.1/bin/xlf95 -o xlfabi xlfabi.f
-Wl,-framework -Wl,vecLib
! ** abitest === End of Compilation 1 ===
! ** zdotc === End of Compilation 2 ===
! ** zdotu === End of Compilation 3 ===
! ** cdotc === End of Compilation 4 ===
! ** cdotu === End of Compilation 5 ===
! 1501-510 Compilation successful for file xlfabi.f.
! scp% ./xlfabi
! (0.000000000000000000E+00,-2.00000000000000000)
! (2.00000000000000000,0.000000000000000000E+00)
! (0.0000000000E+00,-2.000000000)
! (2.000000000,0.0000000000E+00)
complex function cdotc(n, cx, incx, cy, incy)
complex cx(*), cy(*), c
integer n, incx, incy
call cblas_cdotc_sub(%val(n), cx, %val(incx), cy, %val(incy), c)
cdotc = c
return
end
complex function cdotu(n, cx, incx, cy, incy)
complex cx(*), cy(*), c
integer n, incx, incy
call cblas_cdotu_sub(%val(n), cx, %val(incx), cy, %val(incy), c)
cdotu = c
return
end
SCP
--
Steve Peters
Numerics and Vectorization
Apple Computer, Inc.
--
Steve Peters Phone: (408) 974-3242
Apple Computer, Inc. Fax: (408) 974-8986
1 Infinite Loop, MS 302-4K Cell: (408) 568-4133
Cupertino, CA 95014
_______________________________________________
scitech mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.