[julia-users] GPU-ODE

2015-04-02 Thread pauld11718
Is it possible in Julia - GPU based ODE solvers? There are ~250 Independent systems, each system has ~350 equations. So, was looking for GPU based ODE solvers. Any experiences? If yes, how? If no, any suggestion to do the same ?

Re: [julia-users] calling c functions from dll works in Juno but not Julia REPL

2015-04-02 Thread Kevin Squire
Hi Siyi, Can you give a short example of your code? It's generally pretty hard to debug these things without that. Cheers! Kevin On Thursday, April 2, 2015, Siyi Deng wrote: > Hi, > I have created a c shared library using visual-studio; then I called the c > functions in Juno IDE, everythi

[julia-users] calling c functions from dll works in Juno but not Julia REPL

2015-04-02 Thread Siyi Deng
Hi, I have created a c shared library using visual-studio; then I called the c functions in Juno IDE, everything worked as expected. Then I installed the julia command line version, and ran the same script again, and this time it seems that the c functions has not been called properly, no excep

[julia-users] Re: Julia development for Arm

2015-04-02 Thread cdm
a bit more on scaleway: https://github.com/scaleway/ http://www.cnx-software.com/2015/04/02/scaleway-provides-dedicated-arm-servers-for-10-euros-per-month-0-02-euro-per-hour/ this maybe a service States side, out of Houston: http://unixy.net/arm-server/ for $20 per month ... but,

[julia-users] Re: Garbage collection when calling a function

2015-04-02 Thread elextr
On Thursday, April 2, 2015 at 10:51:52 PM UTC+11, Ali Rezaee wrote: > > Dear all, > > I have faced a situation that was unexpected to me. Would you let me know > if this was expected or this is a bug? > > I have a very long code, so I could not put an example here. But the > situation is that I

Re: [julia-users] Referencing function scope variables from @async blocks

2015-04-02 Thread Mohammed El-Beltagy
+1 for documenting whether the @spawn and @spawnat do scope blocks in the same way as @async. On Tuesday, March 10, 2015 at 5:10:32 PM UTC+2, Ben Arthur wrote: > > +1 for documenting whether @async introduces a scope block. is what amit > said true? > > On Saturday, July 20, 2013 at 4:23:21 AM

[julia-users] Juno LightTable Freezes Using images.jl

2015-04-02 Thread will ship
So have discovered weird behaviour in Juno LightTable (which I have been using without issue for sometime now).. When using Images.jl package with following code using Images, Color, FixedPointNumbers, ImageView img=imread(1.png") show(img) props=properties(img) A=data(img) Julia spins then c

[julia-users] Re: Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Tony Kelman
You can do this in-place if you're careful about it. Do a scan through the CSC structure first to check the total number of diagonals that are currently nonzero for which you need to insert elements, then do a sizehint! and copy starting from the end of the nzval and rowval arrays, keeping trac

[julia-users] Re: Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Patrick O'Leary
I suppose a diagonal matrix is the worst-case for compressed storage. Convert to coordinate format, insert the diagonal elements, and then convert back to CSC? On Thursday, April 2, 2015 at 3:55:38 PM UTC-5, Seth wrote: > > The creation of the new sparse matrix (via spdiagm) doubles the amount o

[julia-users] Re: Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Seth
The creation of the new sparse matrix (via spdiagm) doubles the amount of memory, unfortunately. I had to kill it past 26 GB. On Thursday, April 2, 2015 at 1:36:48 PM UTC-7, Patrick O'Leary wrote: > > Perhaps try: > > z = e + spdiagm(fill(Inf, 5), 0, 5, 5) > > I can't try a matrix th

Re: [julia-users] Re: HTML construction package

2015-04-02 Thread Mike Innes
I have Hiccup.jl which is aimed at having the nicest possible syntax. Competition is always welcome, though! On 2 April 2015 at 20:43, Iain Dunning wrote: > I'm not aware of anything like that, but I've been using Mustache.jl as a > very different m

Re: [julia-users] Union types and contravariance, question

2015-04-02 Thread Patrick O'Leary
As a general rule, whenever you are tempted to insert an abstract type (including type unions) into the type parameter position of a formal method argument--which is to say, `x::SomeType{ThisTypeIsAbstract}`, you want to transform that into a type parameter of the method instead, so `f{T<:ThisT

Re: [julia-users] Union types and contravariance, question

2015-04-02 Thread Michael Francis
Nice, that will go a long way to solving the issue I have. Thanks! On Thursday, April 2, 2015 at 4:30:57 PM UTC-4, Patrick O'Leary wrote: > > However, you can define > > f{T<:Union(Int64, Float64)}(v::Vector{T}) = v > > to cover that case with a single method definition. > > On Thursday, April 2

[julia-users] Re: Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Patrick O'Leary
Perhaps try: z = e + spdiagm(fill(Inf, 5), 0, 5, 5) I can't try a matrix that large, I don't have the memory on this system--I tested with 5000, though, and it is massively faster. On Thursday, April 2, 2015 at 3:21:37 PM UTC-5, Seth wrote: > > > > Consider the following: > > julia>

Re: [julia-users] Re: Performance difference between running in REPL and calling a script?

2015-04-02 Thread Stefan Karpinski
Michael – it's great to hear that you're getting the kind of speed you'd hoped for. Happy to help. Let us know if you hit any other issues. On Thu, Apr 2, 2015 at 4:24 PM, Michael Bullman wrote: > Wow, thank you guys so much! Just finished my first run with the new type > definitions/constructor

Re: [julia-users] Union types and contravariance, question

2015-04-02 Thread Patrick O'Leary
However, you can define f{T<:Union(Int64, Float64)}(v::Vector{T}) = v to cover that case with a single method definition. On Thursday, April 2, 2015 at 3:28:34 PM UTC-5, Michael Francis wrote: > > Thanks, that is what I suspected. > > On Thursday, April 2, 2015 at 4:13:31 PM UTC-4, Mauro wrote:

Re: [julia-users] Union types and contravariance, question

2015-04-02 Thread Michael Francis
Thanks, that is what I suspected. On Thursday, April 2, 2015 at 4:13:31 PM UTC-4, Mauro wrote: > > Types in Julia are invariant: > > If T1<:T2 is true > then A1{T1}<:A1{T2} is false (unless T1==T2). > > Now setting T1=Float64 and T2=Union( Int64, Float64) means > Vector{Float64}<:Vector{Union

Re: [julia-users] Re: Performance difference between running in REPL and calling a script?

2015-04-02 Thread Michael Bullman
Wow, thank you guys so much! Just finished my first run with the new type definitions/constructors. Previously the pypy implmentation had taken several days to run, I just finished a run in 5 hours! I wish I had documented the run times of the two programs a bit better to compare them, but neve

[julia-users] Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Seth
Consider the following: julia> @time e = sprandn(5,5,0.3); elapsed time: 95.837541848 seconds (17178 MB allocated, 0.08% gc time in 4 pauses with 1 full sweep) then: julia> function doinf!(e::SparseMatrixCSC) for i = 1:size(e)[1] e[i,i] = Inf end

Re: [julia-users] Union types and contravariance, question

2015-04-02 Thread Mauro
Types in Julia are invariant: If T1<:T2 is true then A1{T1}<:A1{T2} is false (unless T1==T2). Now setting T1=Float64 and T2=Union( Int64, Float64) means Vector{Float64}<:Vector{Union( Int64, Float64)} is false. Thus the no method error. On Thu, 2015-04-02 at 21:32, Michael Francis wrote: > Is

[julia-users] Re: Julia 0.4 roadmap?

2015-04-02 Thread Oleg Mikulchenko
Thanks, it helps. Agreed on Juno, after trying several IDE I've stopped trying and decided to go with Juno. Looking forward for Juno with a nice debugger!

[julia-users] Re: Graphs.jl, Page Rank and Weighted Graphs

2015-04-02 Thread Seth
Rita, If you manage to implement PageRank for LightGraphs, we'd welcome a PR :) Seth. On Thursday, April 2, 2015 at 12:27:09 PM UTC-7, rita...@ciencias.unam.mx wrote: > > Thank you very much for the suggestion, worked perfectly. > > El miércoles, 1 de abril de 2015, 19:13:44 (UTC-6), Seth escr

[julia-users] Re: HTML construction package

2015-04-02 Thread Iain Dunning
I'm not aware of anything like that, but I've been using Mustache.jl as a very different means to similar ends. On Thursday, April 2, 2015 at 3:15:08 PM UTC-4, Michael Francis wrote: > > As part of a project I've been working on I have put together a small > package for generating well-formed ht

[julia-users] Union types and contravariance, question

2015-04-02 Thread Michael Francis
Is the following expected behavior for union types, I'm assuming yes ? v = Union( Int64,Float64 )[] push!( v, 1.2) push!( v, 1) # works f( v::Union(Int64,Float64)...) = v f( [ 1.2 ]...) # Works f( v::Vector{Union( Int64, Float64)}) = v f( [ 1.2 ])# 'f' has not method matching f(::Array

[julia-users] Re: Graphs.jl, Page Rank and Weighted Graphs

2015-04-02 Thread ritamaria
Thank you very much for the suggestion, worked perfectly. El miércoles, 1 de abril de 2015, 19:13:44 (UTC-6), Seth escribió: > > Enter code here... > > Hi Rita, > > LightGraphs doesn't have PageRank yet but it shouldn't be too difficult to > add :). Keep in mind that LightGraphs doesn't internali

[julia-users] Re: Graphs.jl, Page Rank and Weighted Graphs

2015-04-02 Thread ritamaria
Thank you very much. I am now using LightGraphs El miércoles, 1 de abril de 2015, 15:52:08 (UTC-6), Miles Lubin escribió: > > Hi Rita, > > Take a look at the LightGraphs package ( > https://github.com/JuliaGraphs/LightGraphs.jl), it should be a bit easier > to use and less cranky than Graphs.jl.

[julia-users] Limiting time of multicore run and related cleanup

2015-04-02 Thread Pavel
What would be a good way to limit the total runtime of a multicore process managed by pmap? I have pmap processing a collection of optimization runs (with fminbox) and most of the time everything runs smoothly. On occasion however 1-2 out of e.g. 8 CPUs take too long to complete one optimizatio

[julia-users] HTML construction package

2015-04-02 Thread Michael Francis
As part of a project I've been working on I have put together a small package for generating well-formed html documents from Julia. Is there a similar package available? and if not is there any interest in releasing this? The below is a simple example (attached is a sample output, there is not

[julia-users] Re: Julia 0.4 roadmap?

2015-04-02 Thread Viral Shah
Take a look at the github issues marked 0.4. Roughly, for the larger projects, given that 0.4 is still not in feature freeze ( bunch of array work still on ), and we are at least 2-3 months away from release - it is quite likely that the debugger may be available in limited and experimental for

[julia-users] Julia 0.4 roadmap?

2015-04-02 Thread Oleg Mikulchenko
Hi, Is there updates on 0.4 roadmap? E.g. debugger, more parallelization, new features? External infrastructure support, IDE with debuggers ? For new users (like me) having 0.4 roadmap would be critical for considering to start Julia and/or switching for some tasks to Julia from Matlab/Pyth

Re: [julia-users] savefig error

2015-04-02 Thread Diego Tapias
Ok, thank you! Sorry for my grammar, I often type very fast and don't check it. I see your point but it's confusing for me that the same syntax worked a few days ago. Do you know if this is a new feature of matplotlib? 2015-04-01 23:57 GMT-06:00 René Donner : > The following works: > > using Py

Re: [julia-users] Exporter for compressed binary unstructured grid VTK XML files.

2015-04-02 Thread Rob J. Goedman
Hi Kristoffer, Thanks for doing this! This is very useful. I had no problems in running the test_vtk.jl ‘as-is’ on Julia 0.4. On Julia 0.3.7 I had to include the Compat package. Another suggestion is to maybe (re-)name the Node and Element types to something less general as Node and Element ar

Re: [julia-users] Re: What is the most usual way to save a Matrix with 3 or more dimensions in Julia?

2015-04-02 Thread Jinxuan Zhu
Thank you all very much. I find that I have made a mistake that the NetCDF.jl fails only because some problems happened in my computer. Indeed, the NetCDF.jl is working right under julia v0.4 Thank you for recommendation. I tried and find that the JLD files are very convenient for self-use in sav

[julia-users] Re: Julia development for Arm

2015-04-02 Thread Seth
On Wednesday, April 1, 2015 at 10:32:16 AM UTC-7, Viral Shah wrote: > > There is no definite timeframe. Julia does start up on ARMv7 already, and > I can use it to do a number of computations. It passes about 90% of the > tests. > > What makes our ARM port tough is the lack of easy access to AR

[julia-users] Re: Graph package

2015-04-02 Thread Seth
You might check out GraphLayout.jl: https://github.com/IainNZ/GraphLayout.jl On Thursday, April 2, 2015 at 2:48:53 AM UTC-7, pip7...@gmail.com wrote: > > Hi > How can I save the following example plot(g) to .gif / .png or .jpg file > > julia> using Graphs > > julia> g = simple_graph(3) > Directe

[julia-users] Re: What is the most usual way to save a Matrix with 3 or more dimensions in Julia?

2015-04-02 Thread Fabian Gans
Thanks for filing the issue, I do not yet regularly check 0.4-compatibility of the NetCDF package, because I do my day-to-day work still on julia 0.3. I hope the issue is resolved now. In general, I agree with Steven and Tim, if your issue is only about saving an array to be able to load it lat

Re: [julia-users] Garbage collection when calling a function

2015-04-02 Thread Ali Rezaee
Thanks, Stefan. My code is all in Julia. That is why I was surprised that memory didn't get freed until I explicitly called gc(). On Thursday, April 2, 2015 at 5:02:27 PM UTC+2, Stefan Karpinski wrote: > > I'm afraid this is a little too vague to help debugging. If you are > calling C code that

Re: [julia-users] Garbage collection when calling a function

2015-04-02 Thread Stefan Karpinski
I'm afraid this is a little too vague to help debugging. If you are calling C code that allocates memory and doesn't free it, then there's nothing that Julia's GC can do about it. If normal Julia code allocates memory, it will get freed once there's no way to reach it anymore. On Thu, Apr 2, 2015

Re: [julia-users] Re: Why X.>0 & X.<1 equal to X .> (0 & X) .< 1 rather than (X.>0) & (X.<1)?

2015-04-02 Thread Stefan Karpinski
That conversation got pretty heavily derailed. I think the main takeaway is that dotted comparison operators should not be at the same precedence level as undotted comparison operators and the dotted ones should maybe have higher precedence than bitwise operators. On Thu, Apr 2, 2015 at 10:16 AM,

[julia-users] derivatives of Chebyshev polynomials

2015-04-02 Thread Tamas Papp
Hi, Can someone point me to some Julia code that calculates a matrix for the derivatives of the Chebyshev polynomials T_j, at given values, ie d^k T_i(x_j) / dx^kfor i=1,..n, j for some and vector x. The Chebyshev polynomials themselves are very easy to calculate using the recurrence relatio

Re: [julia-users] Interpreting @time results in parallel

2015-04-02 Thread Christian Peel
Ed Schmerling essentially asked the same question, and did not get a satisfactory answer as described at https://github.com/schmrlng/CPUTime.jl/issues/1 In this link he says "For multi-core machines, I still don't know a good way to reliably benchmark code when you've got other stuff going on

[julia-users] Re: Why X.>0 & X.<1 equal to X .> (0 & X) .< 1 rather than (X.>0) & (X.<1)?

2015-04-02 Thread Matt Bauman
I agree! That was one of the first issues I filed. https://github.com/JuliaLang/julia/issues/5187 It's still on the slate to be addressed in 0.4. On Thursday, April 2, 2015 at 8:58:15 AM UTC-4, Jerry Xiong wrote: > > I notice that the logical operations in Julia have a different precedence > o

[julia-users] Exporter for compressed binary unstructured grid VTK XML files.

2015-04-02 Thread Kristoffer Carlsson
Hello everyone, I am writing finite element software in Julia and in doing so I implemented an exporter to the VTK XML unstructured grid format. The XML format has many advantages over the old legacy VTK format, you can for example compress the data or decompose your domain into multiple files

Re: [julia-users] calling Julia from Mathematica

2015-04-02 Thread Isaiah Norton
Not sure about Mathematica->Julia, but the other way round is available: https://github.com/one-more-minute/Mathematica.jl You could use the Julia embedding API to call out using the Mathematica foreign function interface -- see pyjulia for an example: https://github.com/JuliaLang/pyjulia On Thu,

Re: [julia-users] Interpreting @time results in parallel

2015-04-02 Thread Tim Holy
Correct. Also make sure you use `@time @sync @parallel ...` (note the @sync), or you might be fooling yourself about how much benefit you're getting. --Tim On Thursday, April 02, 2015 04:35:30 AM Nils Gudat wrote: > When running code in parallel, I see large declines in the time to execute > my

[julia-users] calling Julia from Mathematica

2015-04-02 Thread Frank Kampas
Has anyone been able to call Julia from Mathematica?

[julia-users] Re: Julia development for Arm

2015-04-02 Thread Patrick O'Leary
On Wednesday, April 1, 2015 at 12:32:16 PM UTC-5, Viral Shah wrote: > > There is no definite timeframe. Julia does start up on ARMv7 already, and > I can use it to do a number of computations. It passes about 90% of the > tests. > > What makes our ARM port tough is the lack of easy access to ARM

[julia-users] Why X.>0 & X.<1 equal to X .> (0 & X) .< 1 rather than (X.>0) & (X.<1)?

2015-04-02 Thread Jerry Xiong
I notice that the logical operations in Julia have a different precedence order from R and Matlab. & and | have higher precedence than .<, .>, etc. For example, X.>0 & X.<1 will be parse as X .> (0 & X) .< 1 rather than (X.>0) & (X.<1). I think there must be a reason for this anti-intuition des

[julia-users] Garbage collection when calling a function

2015-04-02 Thread Ali Rezaee
Dear all, I have faced a situation that was unexpected to me. Would you let me know if this was expected or this is a bug? I have a very long code, so I could not put an example here. But the situation is that I have a function in a separate file that I have included in my code. Some where in

[julia-users] Interpreting @time results in parallel

2015-04-02 Thread Nils Gudat
When running code in parallel, I see large declines in the time to execute my code (as I expected), but an implausably large drop in memory allocation and gc time. Would I be right in assuming that allocation on workers processors is just not recorded by @time?

[julia-users] Graph package

2015-04-02 Thread pip7kids
Hi How can I save the following example plot(g) to .gif / .png or .jpg file julia> using Graphs julia> g = simple_graph(3) Directed Graph (3 vertices, 0 edges) julia> add_edge!(g, 1, 2) edge [1]: 1 -- 2 julia> add_edge!(g, 3, 2) edge [2]: 3 -- 2 julia> add_edge!(g, 3, 1) edge [3]: 3 -- 1 ju

Re: [julia-users] Array construction types question

2015-04-02 Thread Toivo Henningsson
Right, forgot about that. Thanks :) I wonder what it should do for unionall types.