juliasmoothoptimizers / amd.jl Goto Github PK
View Code? Open in Web Editor NEWApproximate Minimum Degree Ordering in Julia
License: Other
Approximate Minimum Degree Ordering in Julia
License: Other
Changes to https://github.com/JuliaSmoothOptimizers/AMD.jl/blob/main/src/amd_julia.jl#L75 introduced in c65293e cause precompilation of the AMD.jl package to fail on x86 systems with Julia 1.10-nightly and 1.11-nightly.
Failed to precompile Preconditioners [af69fa37-3177-5a40-98ee-561f696e4fcd] to "/home/runner/.julia/compiled/v1.10/Preconditioners/jl_p5AFKc".
WARNING: Method definition amd_valid(SparseArrays.SparseMatrixCSC{F, Int32}) where {F} in module AMD at /home/runner/.julia/packages/AMD/0QFZL/src/amd_julia.jl:77 overwritten on the same line (check for duplicate calls to `include`).
ERROR: LoadError: Method overwriting is not permitted during Module precompile.
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/AMD/0QFZL/src/amd_julia.jl:77
[2] eval(m::Module, e::Any)
@ Core ./boot.jl:383
[3] top-level scope
@ ~/.julia/packages/AMD/0QFZL/src/amd_julia.jl:76
[4] include(mod::Module, _path::String)
@ Base ./Base.jl:489
[5] include(x::String)
@ AMD ~/.julia/packages/AMD/0QFZL/src/AMD.jl:1
[6] top-level scope
@ ~/.julia/packages/AMD/0QFZL/src/AMD.jl:16
[7] include
@ Base ./Base.jl:489 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::String)
@ Base ./loading.jl:2216
[9] top-level scope
@ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
in expression starting at /home/runner/.julia/packages/AMD/0QFZL/src/amd_julia.jl:75
in expression starting at /home/runner/.julia/packages/AMD/0QFZL/src/AMD.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile AMD [14f7f29c-3bd6-536c-9a0b-7339e30b5a3e] to "/home/runner/.julia/compiled/v1.10/AMD/jl_BlSBhB".
I think the affected method is overwritten on 32-bit platforms due to Cint
and SS_Int
referring to the same type Int32
. Method overwriting during precompilation seems to be an error since Julia 1.10 (JuliaLang/julia@016edf2)
it seems something different between matlab's and AMD's
Only Clong seems to work.
Interface COLAMD.
When I
add AMD#master
using AMD
try to precompile the package under Julia v0.7/1.0 I get the following error:
ERROR: LoadError: syntax: extra token "Amd" after end of expression
Stacktrace:
[1] include at ./boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at ./loading.jl:1038
[3] include(::Module, ::String) at ./sysimg.jl:29
[4] top-level scope at none:2
[5] eval at ./boot.jl:319 [inlined]
[6] eval(::Expr) at ./client.jl:389
[7] top-level scope at ./none:3
in expression starting at /~/.julia/packages/AMD/k9NUS/src/AMD.jl:59
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
It seems that on Windows, int
and long
are both a 32 bit integer, so Cint
and Clong
are the same. For some reason, that is causing a failure on Win64.
Interface SYMAMD.
Needs a new release supporting 0.7. Needed for LDL.
Do not constrain the data type to Float64
.
I have been trying to convert some code from MATLAB to Julia. But I observe that symamd operation is not very comparable to MATLAB's.
I am pasting the whole code snippet for comparison:
Julia Code
H = 2; #Height of the container
L = 5; #Length of the container
nx = 10;
ny = 7;
dx = L/(nx-1); #Width of space step(x)
dy = H/(ny-1); #Width of space step(y)
dt = 0.01
e = ones(nx-2);
i = ones(ny-2);
Tx = spdiagm(-1 => e[1:end-1], 0 => -2*e, 1 => e[1:end-1]);
Ty = spdiagm(-1 => i[1:end-1], 0 => -2*i, 1 => i[1:end-1]);
Tx[1,1] = -1;
Tx[end,end]=-1;
Tt = kron(Ty/dy^2, sparse(I, nx-2, nx-2)) + kron(sparse(I, ny-2, ny-2), Tx/dx^2);
N = (nx-2)*(ny-2)
Tt = sparse(I, N, N) - dt*Tt/Pe;
pt = symamd(Tt);
Output in Julia:
pt = [1, 8, 33, 40, 39, 32, 34, 25, 16, 7, 9, 2, 4, 36, 37, 5, 10, 15, 26, 31, 19, 21, 24, 23, 30, 14, 22, 29, 38, 13, 6, 28, 12, 20, 27, 35, 18, 17, 11, 3]
Output in OCTAVE:
debug> pt
pt =
Columns 1 through 11:
1 9 2 10 33 34 25 26 19 4 5
Columns 12 through 22:
36 37 21 8 16 7 15 40 39 32 31
Columns 23 through 33:
24 23 30 14 22 29 38 13 6 28 12
Columns 34 through 40:
20 27 35 18 17 11 3
Any help/suggestion/insight is greatly appreciated,
Thanks!
@TheoGal
Hi, I have wrapper code available for using CCOLAMD -- it's probably best to consolidate that file here?
Not sure about license compatibility though, having a more permissive (non-copyleft) license is desirable in many cases. Also adding @andreasnoack as the orginal author of this ccolamd.jl
file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.