fcdimitr/SGtSNEpi.jl

UndefVarError: libsgtsnepi not defined

AlexanderJCS opened this issue · 7 comments

Hi there,

I was following the Graph embedding guide in the documentation and there is an issue with SGtSNEpi.jl.

I ran this code after downloading the sample data in that the documentation references:

using DataDeps, MatrixMarket

L = vec( MatrixMarket.mmread( datadep"optdigits/optdigits_10NN/optdigits_10NN_label.mtx" ) );
L = Int.( L );

using SGtSNEpi, Random

# reproducible results
Random.seed!(0);
Y0 = 0.01 * randn( size(A,1), 2 );

Y = sgtsnepi(A; Y0 = Y0);

The program ran successfully up to line 12, where this error occurs:

ERROR: UndefVarError: libsgtsnepi not defined
Stacktrace:
 [1] _sgtsnepi_c(P::SparseArrays.SparseMatrixCSC{Float64, Int64}, d::Int64, max_iter::Int64, early_exag::Int64, λ::Int64; Y0::Matrix{Float64}, np::Int64, h::Float64, bb::Float64, eta::Float64, run_exact::Bool, fftw_single::Bool, alpha::Int64, profile::Bool, drop_leaf::Bool, list_grid_size::Vector{Int64}, par_scheme_grid_thres::Int64)
   @ SGtSNEpi C:\Users\d8amo\.julia\packages\SGtSNEpi\4wQHp\src\sgtsne.jl:250
 [2] sgtsnepi(A::SparseArrays.SparseMatrixCSC{Float64, Int64}; d::Int64, λ::Int64, max_iter::Int64, early_exag::Int64, Y0::Matrix{Float64}, profile::Bool, np::Int64, version::SGtSNEpi.SGTSNEPI_VERSION, h::Float64, u::Int64, k::Int64, eta::Float64, alpha::Int64, fftw_single::Bool, exact::Bool, drop_leaf::Bool, list_grid_size::Vector{Int64}, bound_box::Float64, par_scheme_grid_thres::Int64)
   @ SGtSNEpi .\array.jl:0
 [3] top-level scope
   @ c:\Users\path\to\my\file\SGtSNEpi_test.jl:12

Following the stack trace, the error occurs on line 250 of sgtsne.jl. Do you know how to fix this? Thanks.

Hello and thank you for reporting this issue!

Are you using Windows? Currently, this package only works on Linux and macOS, due to cilk not supporting Windows natively.

I will leave this issue open in order to update the documentation/manual to make this clear.

Thank you for your reply. I am on Windows. Is there an alternative library that you know of that allows visualizing 3D graphs on Windows, or a way to get this library to work on Windows?

You could try running Julia via WSL2.

Hmmm. I'm on a Mac M1 2021, running Ventura 13.2.1 (22D68), and I have the same error as above.

running the sample visualization code from Graphs.jl:
using GLMakie, SGtSNEpi, SNAPDatasets

GLMakie.activate!()

g = loadsnap(:as_caida)
y = sgtsnepi(g);
show_embedding(y;
A = adjacency_matrix(g), # show edges on embedding
mrk_size = 1, # control node sizes
lwd_in = 0.01, lwd_out = 0.001, # control edge widths
edge_alpha = 0.03 )

It runs until the y = sgtsnepi(g) line.

Hello, @varnerlab, and thank you for the feedback! Are you running Julia natively on your M1 or through Rosetta2?

We have not tested it natively on Mac M1 yet; we need to check whether cilk is compatible with M1.

Hi @fcdimitr, I'm running natively on the M1.

I ran the same code on a 2013 trashcan mac pro (macOS 12.6.3, Julia 1.8.5, Xeon), and it ran fine. So I'm guessing it's the M1 native issue.

Hello @AlexanderJCS and @varnerlab,

This issue is temporarily closed by adding a warning on the front page.

We plan to add support for M1 Macs (natively) and Windows; I will re-open the issue when we have a pull request for you to try.

Thank you!