-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash while building a sym tridiagonal eigmax #2267
Comments
According to http://www.netlib.org/lapack/double/dstebz.f, the fourth and fifth arguments are float, not integer, and all scalars passed to fortran functions need |
Also, the isplit argument was missing in ccall. This one works for me const liblapack = Base.liblapack_name
import Base.BlasInt
for (stebz, elty) in ((:dstebz_,:Float64),
(:sstebz_,:Float32))
@eval begin
function stebz!(dv::Vector{$elty}, ev::Vector{$elty})
n = length(dv)
if length(ev) != (n-1) throw(LapackDimMisMatch("stebz!")) end
z = 0.0 #just to be sure
m = Array(BlasInt,1)
nsplit = Array(BlasInt,1)
w = Array($elty, n)
iblock = Array(BlasInt,n)
isplit = Array(BlasInt,n)
work = Array($elty, 4*n)
iwork = Array(BlasInt,3*n)
info = Array(BlasInt, 1)
ccall(($(string(stebz)),liblapack), Void,
(Ptr{Uint8}, Ptr{Uint8}, Ptr{BlasInt}, Ptr{$elty},
Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty},
Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt},
Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty},
Ptr{BlasInt}, Ptr{BlasInt}),
&'I', &'B', &n, &0.0,
&0.0, &n, &n, &z,
dv, ev, m, nsplit,
w, iblock, isplit, work,
iwork, info)
if info[1] != 0 throw(LapackException(info[1])) end
w
end
end
end |
cool! guess i was close. |
THANK YOU BOTH SO MUCH! I can do a 100,000 eigmax in 100 msecs Something to look into is the different answers slightly numerically. The eigenvalue I'm testing |
We should probably implement Also, after the 0.1 freeze is lifted, let's get |
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: ed7a8dca8 New commit: 4e43058c2 Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@ed7a8dc...4e43058 ``` $ git log --oneline ed7a8dca8..4e43058c2 4e43058c2 Merge pull request #3887 from carlobaldassi/validate_versions bc7c3207d abort querying more pacakge for hint auto complete (#3913) a4016aed2 precompile repl switch (#3910) a48c9c645 Fixed glitch in the manual (#3912) d875aa213 Add timeout and new tests for resolver aeb55f7f0 run artifact selection code with minimal compilation (#3899) 0180a0105 avoid doing some checks if the package will not be showed in status output (#3897) c6c7ed502 improve precompilation for `st` in the Pkg REPL (#3893) bffd0633c Add version validation during Graph simplification c2ad07003 Fix padding in resolve's log journal printing 3eb86d29f Revert #2267, with better log message acdbb727e Small extra check in Graph's check_consistency 1d446c224 Fix small bug in Graph constructor 3efc3cbff Fix show method for VersionSpecs ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Writing my first lapack interface. Not sure if I have all the pointers right, etc., but
anyway as long as code just crashes, it's hard to debug. I may try this on a
mac later today, but if anyone can just help me sooner, that would be great.
Here's the exact code:
The text was updated successfully, but these errors were encountered: