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

LoadError: dir not defined #49

Closed
youssefzaky opened this issue Dec 9, 2016 · 6 comments
Closed

LoadError: dir not defined #49

youssefzaky opened this issue Dec 9, 2016 · 6 comments

Comments

@youssefzaky
Copy link

This error also happens with other files in the examples directory. Using julia 0.5.

INFO: Knet using GPU 0
INFO: Loading MNIST...
ERROR: LoadError: UndefVarError: dir not defined
in loaddata() at /Github/Knet.jl/examples/mnist.jl:137
in include_from_node1(::String) at ./loading.jl:488
in process_options(::Base.JLOptions) at ./client.jl:262
in _start() at ./client.jl:318
while loading /Github/Knet.jl/examples/mnist.jl, in expression starting on line 152

@denizyuret
Copy link
Owner

denizyuret commented Dec 9, 2016 via email

@youssefzaky
Copy link
Author

I updated Knet to 0.8.1 and that error is gone. However I'm getting another one from running:

julia linreg.jl

INFO: Knet using GPU 0
linreg.jl (c) Deniz Yuret, 2016. Linear regression example with artificial data.
opts=(:lr,0.02)(:atype,"KnetArray")(:epochsize,10000)(:inputdims,100)(:noise,0.01)(:epochs,10)(:gcheck,0)(:seed,-1)(:outputdims,10)(:batchsize,20)(:fast,false)
ERROR: LoadError: ccall: could not find function abs2_64 in library /home/youssef/.julia/v0.5/Knet/src/libknet8
in abs2(::Knet.KnetArray{Float64,2}) at /home/youssef/.julia/v0.5/Knet/src/cuda1.jl:74
in test(::Knet.KnetArray{Float64,2}, ::LinReg.Data) at /media/youssef/Partition1/Github/Knet.jl/examples/linreg.jl:76
in main(::Array{String,1}) at /media/youssef/Partition1/Github/Knet.jl/examples/linreg.jl:41
in include_from_node1(::String) at ./loading.jl:488
in process_options(::Base.JLOptions) at ./client.jl:262
in _start() at ./client.jl:318
while loading /media/youssef/Partition1/Github/Knet.jl/examples/linreg.jl, in expression starting on line 104

@denizyuret
Copy link
Owner

denizyuret commented Dec 10, 2016 via email

@youssefzaky
Copy link
Author

Yes its says libknet8.so is up to date. I also did Base.compilecache("Knet") but still the same problem.

@ozanarkancan
Copy link
Collaborator

I couldn't replicate the problem with the fresh install.

Please check whether Knet.libknet8 is set to the correct location:

using Knet
Knet.libknet8

If it prints empty string

Try to delete Knet.ji which is located under $JULIA_PKGDIR/lib/v0.5/ .

And build the lib again:

make clean
make

in $JULIA_PKGDIR/v0.5/Knet/src

@youssefzaky
Copy link
Author

I reinstalled julia and Knet and it works fine now. Not sure what went wrong before.

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

No branches or pull requests

3 participants