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

Remove global const in init in cholmod #23449

Merged
merged 4 commits into from
Aug 29, 2017
Merged

Conversation

musm
Copy link
Contributor

@musm musm commented Aug 25, 2017

Copy link
Contributor

@yuyichao yuyichao left a comment

Choose a reason for hiding this comment

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

You should probably make commonStruct an actual const (resize/fill on init) and others const Refs to avoid performance regression.

@@ -89,10 +88,9 @@ function __init__()
of CHOLMOD, or download the generic binaries
from www.julialang.org, which ship with the correct
versions of all dependencies.
""")
Copy link
Member

Choose a reason for hiding this comment

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

Why delete the empty lines and add these spaces? Not super important, but I think the previous behavior is nicer.

Copy link
Contributor

@yuyichao yuyichao left a comment

Choose a reason for hiding this comment

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

The change itself LGTM. (I did not check if all users are corrected).


global const common_supernodal =
common_supernodal[] =
Copy link
Contributor

Choose a reason for hiding this comment

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

You can probably remove the convert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah.
Thank you for the review and suggested improvements!

@@ -1330,7 +1338,7 @@ function cholfact!(F::Factor{Tv}, A::Sparse{Tv}; shift::Real=0.0) where Tv
cm = common()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it really necessary to have a function common() to get the global variable commonStruct?

Copy link
Member

Choose a reason for hiding this comment

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

No, I don't think so. It used to take an argument but that was broken and got removed so I think we can just delete the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andreasnoack would you be opposed to renaming commonStruct to common_struct ? The cammelcase doesn't seem very commonly used in julia code.

@musm
Copy link
Contributor Author

musm commented Aug 25, 2017

This should be g2g now. perhaps run benchmarks?

@musm
Copy link
Contributor Author

musm commented Aug 25, 2017

https://github.com/JuliaLang/julia/blob/master/test/codegen.jl#L51
https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.18278/job/tbwdkqhcbqtngayu#L6034
codegen test failure on x86_64 for reference (which does not seem to be at all related to the changes here)

@fredrikekre
Copy link
Member

Looks like #23365

@musm
Copy link
Contributor Author

musm commented Aug 26, 2017

tests all pass sans an unrelated error on appveyor. Should we run nano soldier here just to double check?

@andreasnoack
Copy link
Member

@nanosoldier runbenchmarks("linalg", vs = ":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - no performance regressions were detected. A full report can be found here. cc @ararslan

@musm
Copy link
Contributor Author

musm commented Aug 29, 2017

G2G?

@musm
Copy link
Contributor Author

musm commented Aug 29, 2017

@fredrikekre why? It wasn't four space aligned .....

@fredrikekre
Copy link
Member

The string was 4 space indented, you removed one space making the string 5 spaces indented so I added it back :)

@musm
Copy link
Contributor Author

musm commented Aug 29, 2017

Please see line 100 and 116, it's now misaligned with those

@fredrikekre
Copy link
Member

CI passed on the previous commit so should be ok to squash merge, and remove the ci skip in the process.

@fredrikekre
Copy link
Member

That's not the point, the point is to have the indentation correct in the string, see https://docs.julialang.org/en/stable/manual/strings/#Triple-Quoted-String-Literals-1

@andreasnoack andreasnoack merged commit 9454cd4 into JuliaLang:master Aug 29, 2017
@musm musm deleted the chol branch August 30, 2017 00:28
@ViralBShah
Copy link
Member

I think we should not have indentation discussions. Or the author of any PR should be free to ignore anyone who points it out (unless they like the suggestion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants