Skip to content
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

Fixed Ac_mul_Bt and added export and tests, added a missing lapack test #15296

Closed
wants to merge 2 commits into from

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Feb 29, 2016

No description provided.

@kshyatt kshyatt added test This change adds or pertains to unit tests linear algebra Linear algebra labels Feb 29, 2016
@tkelman
Copy link
Contributor

tkelman commented Mar 1, 2016

travis failure was #15294, restarted

    From worker 4:       * numbers              Error During Test
    From worker 4:    Test threw an exception of type UndefVarError
    From worker 4:    Expression: round(T,true // false) === convert(T,Inf)
    From worker 4:    UndefVarError: no_op_err not defined
    From worker 4:     in gcd(::Bool, ::Bool) at ./intfuncs.jl:11
    From worker 4:     in Rational{Bool}(::Bool, ::Bool) at ./rational.jl:9
    From worker 4:     [inlined code] from /tmp/julia/share/julia/test/numbers.jl:2849
    From worker 4:     in anonymous at ./no file:4294967295
    From worker 4:     [inlined code] from ./essentials.jl:79
    From worker 4:     in include_string(::UTF8String, ::ASCIIString) at ./loading.jl:371
    From worker 4:     in include_from_node1(::ASCIIString) at ./loading.jl:420
    From worker 4:     [inlined code] from ./util.jl:179
    From worker 4:     in runtests(::ASCIIString) at /tmp/julia/share/julia/test/testdefs.jl:7
    From worker 4:     in (::Base.Serializer.__deserialized_types__.##9186)(::ASCIIString) at /tmp/julia/share/julia/test/runtests.jl:36
    From worker 4:     in run_work_thunk(::Base.##254#256{Base.CallMsg{:call_fetch}}, ::Bool) at ./multi.jl:714
    From worker 4:     [inlined code] from ./multi.jl:1010
    From worker 4:     in (::Base.##253#255{Base.CallMsg{:call_fetch},TCPSocket})() at ./task.jl:59

let A = [1 3; 5 7], B = [2 4; 3 6]
@test vecdot(A,B) == dot(vec(A),vec(B)) == vecdot_(A,B) == vecdot(float(A),float(B))
@test vecdot(Int[], Int[]) == 0 == vecdot_(Int[], Int[])
@test_throws MethodError vecdot(Any[], Any[])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it important to test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm being dense, but that line seems to require a BlasReal and this is Any. The test seems to call https://codecov.io/github/JuliaLang/julia/base/linalg/generic.jl?ref=1eacbbbb9a686292a12e89bcc4d9559c22928b83#l-270, which is (mostly) covered, and which ends up being a test of whether zero(Any) is defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right. I'll remove this for now and we can come back to it later.

@kshyatt
Copy link
Contributor Author

kshyatt commented Mar 1, 2016

CI passed! Anyone have further thoughts?

@@ -59,6 +59,7 @@ A = rand(1:20, 5, 5) .- 10
B = rand(1:20, 5, 5) .- 10
@test At_mul_B(A, B) == A'*B
@test A_mul_Bt(A, B) == A*B'
@test Ac_mul_Bt(A, B) == A'*B.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this actually get tested on complex inputs so we can be sure the conjugation behavior is right?

@andreasnoack
Copy link
Member

Hm. We actually don't have parsing for Ac_mul_Bt

julia> expand(:(A'*B.'))
:(Ac_mul_B(A,transpose(B)))

which probably explains why the bug has never surfaced. We should maybe just delete the methods.

@kshyatt
Copy link
Contributor Author

kshyatt commented Mar 14, 2016

@andreasnoack do you want me to delete the methods, or should we add the parsing?

@andreasnoack
Copy link
Member

Let's delete them.

@kshyatt kshyatt closed this Mar 14, 2016
@kshyatt kshyatt deleted the ksh/linalgtest branch March 14, 2016 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants