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

Fix off by one in csc_premute and add test #12734

Merged
merged 1 commit into from
Aug 28, 2015

Conversation

KristofferC
Copy link
Member

Fixes a simple mistake that happened when the original code got converted from C and adds a test. Also removed a faulty, unexported, untested droptol I added in another PR.

@kshyatt kshyatt added the test This change adds or pertains to unit tests label Aug 21, 2015
pinv = randperm(10)
p = zeros(Int, 10)
# Invert pinv
for (i, j) in enumerate(pinv)
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't you use invperm for this

@KristofferC
Copy link
Member Author

Fixed the stuff I was failing at.

This fails locally but I am pushing it anyway because it is failing in a place it shouldn't. If I put the test where I did now, the test here fails.

If I put it in the bottom of the file, everything passes.

This seems to indicate that the test currently failing has some dependency on the random seed? @andreasnoack any ideas?

@KristofferC
Copy link
Member Author

The build log is too long so you have to download the raw log to see the test failure. Anyway here it is:

ERROR: LoadError: On worker 3:
LoadError("/tmp/julia/share/julia/test/sparse.jl",3,LoadError("/tmp/julia/share/julia/test/sparsedir/sparse.jl",1078,ErrorException("assertion failed: |cond(Ac,Inf) - cond(full(Ac),Inf)| <= 0.0001\n  cond(Ac,Inf) = 128.30458154354002\n  cond(full(Ac),Inf) = 125.08790073210642\n  difference = 3.216680811433605 > 0.0001")))
 in error at error.jl:22
 in test_approx_eq at test.jl:140
 in include_string at loading.jl:229
 in include_from_node1 at ./loading.jl:270
 in include_string at loading.jl:229
 in include_from_node1 at ./loading.jl:270
 in runtests at /tmp/julia/share/julia/test/testdefs.jl:179
 in anonymous at multi.jl:889
 in run_work_thunk at multi.jl:642
 in anonymous at task.jl:889
while loading /tmp/julia/share/julia/test/runtests.jl, in expression starting on line 13

@KristofferC
Copy link
Member Author

@andreasnoack Should I just reorder the test to make this pass?

@KristofferC
Copy link
Member Author

I did that now. Should be ready to merge.

@andreasnoack
Copy link
Member

Thanks. I think it is ready now.

andreasnoack added a commit that referenced this pull request Aug 28, 2015
Fix off by one in csc_premute and add test
@andreasnoack andreasnoack merged commit 29d070a into JuliaLang:master Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants