Giter VIP home page Giter VIP logo

Comments (3)

pfitzseb avatar pfitzseb commented on July 17, 2024

You should get the environment variables into Atom if you start it from the command line.

About the Image not found error after adding DYLD_LIBRARY_PATH to ENV: You seem to have forgotten the leading : in front of the path (judging by you screenshot).

So hopefully either starting Atom from the terminal (and thus importing the correct enironment variable) or fixing the typo in your code should do the trick.

from atom-julia-client.

lionpeloux avatar lionpeloux commented on July 17, 2024

I effectively get all the env variables when launching atom with the atom command from the terminal.

Then, this sample of code works fine :

function myasum(n::Integer, X::Vector{Float64}, incx::Integer)
  ccall((:dasum, :libmkl_rt),
        Float64,
        (Ptr{Int64}, Ptr{Float64}, Ptr{Int64}),
        &n, X, &incx)
end

myasum(3,Float64[1,2,3],1)

But when I start atom from the icon app, even if I set the correct ENV variables by hand before my ccall to mkl_rt.dylib, I get a not found error :

for e in ENV
  println(e[1],"\t\t","=>",e[2])
end

ENV["DYLD_LIBRARY_PATH"] = ":/opt/intel/mkl/lib:/opt/intel/lib"
ENV["PATH"] = ENV["PATH"] * ":/opt/intel/compilers_and_libraries_2016.0.083/mac/mkl/lib:/opt/intel/mkl/lib:/opt/intel/lib"

for e in ENV
  println(e[1],"\t\t","=>",e[2])
end

function myasum(n::Integer, X::Vector{Float64}, incx::Integer)
  ccall((:dasum, :libmkl_rt),
        Float64,
        (Ptr{Int64}, Ptr{Float64}, Ptr{Int64}),
        &n, X, &incx)
end

myasum(3,Float64[1,2,3],1)

capture d ecran 2015-10-26 a 18 54 39

Is this an expected behaviour ??

Thanks,
Lionel

from atom-julia-client.

pfitzseb avatar pfitzseb commented on July 17, 2024

I don't know, but suspect that this isn't intended behaviour (the part with actively setting ENV and dlopen still not working -- Atom not importing PATH when not started from the shell is a known issue).

What you could also try as a workaround is setting Libdl.DL_LOAD_PATH because dlopen should use that for looking up libraries first...
Also: There's not much I know about how the interaction between ENV, dlopen, and the system environment variables actually works, only about how I would suspect them to -- therefore my debugging advice/help is more like wildely guessing at stuff ;) You may want to ask the mailing list about this (and link to this issue) -- someone there surely knows more about that stuff than me.

from atom-julia-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.