[julia-users] any clarification of bytes allocated in @time?

2014-12-19 Thread John Drummond
For the following code (julia 0.3.3 in windows 7 ) I don't understand what the bytes allocated in @time means All I'm doing each time is adding 10 8 byte integers Thanks for any thoughts julia @time c = [1,2] elapsed time: 3.32e-6 seconds (144 bytes allocated) 2-element Array{Int64,1}: 1 2

[julia-users] recommended performant approach of expanding a large array

2014-12-19 Thread John Drummond
Hi, I'm parsing some log files of a few million lines. I'm pulling out two or three numeric values and a code into an array of a custom type. a simple approach would be something like for line in eachline(myInFile) push!(myArray, myType(Int64(line[1:4]), Int64(line[5:8]), line[15:16] )end

Re: [julia-users] any clarification of bytes allocated in @time?

2014-12-19 Thread John Drummond
, at 1:00 PM, John Drummond joh...@gmail.com javascript: wrote: For the following code (julia 0.3.3 in windows 7 ) I don't understand what the bytes allocated in @time means All I'm doing each time is adding 10 8 byte integers Thanks for any thoughts julia @time c = [1,2

Re: [julia-users] any clarification of bytes allocated in @time?

2014-12-19 Thread John Drummond
a copy of your entire array each time you add 1 element. Best, --Tim On Friday, December 19, 2014 10:00:28 AM John Drummond wrote: For the following code (julia 0.3.3 in windows 7 ) I don't understand what the bytes allocated in @time means All I'm doing each time is adding 10

Re: [julia-users] any clarification of bytes allocated in @time?

2014-12-19 Thread John Drummond
: 8.61e-6 seconds (0 bytes allocated) elapsed time: 4.45e-7 seconds (0 bytes allocated) elapsed time: 2.71e-7 seconds (0 bytes allocated) elapsed time: 0.000365734 seconds (16000 bytes allocated) -- John On Dec 19, 2014, at 1:34 PM, John Drummond joh...@gmail.com javascript: wrote

Re: [julia-users] recommended performant approach of expanding a large array

2014-12-19 Thread John Drummond
Yes you're right - sorry for the duplication. Thanks. On Friday, December 19, 2014 6:15:45 PM UTC, Stefan Karpinski wrote: On Fri, Dec 19, 2014 at 1:13 PM, John Drummond joh...@gmail.com javascript: wrote: pre initializing myArray and then checking the length each time to see whether

[julia-users] why are variables not local by default?

2014-12-05 Thread John Drummond
I suspect I'm missing something here. I had a simple script to strip out nuls from a text file. placing a let at the beginning and end at the end resulted in a 70 times speed up. I'm wondering what the reason is that there isn't the equivalent of a let end wrapped around everything, and where

Re: [julia-users] why are variables not local by default?

2014-12-05 Thread John Drummond
the discussions in http://julia.readthedocs.org/en/release-0.3/manual/performance-tips/ https://github.com/JuliaLang/julia/issues/524 https://github.com/JuliaLang/julia/issues/8870 (and elsewhere) On Fri, Dec 5, 2014 at 7:13 AM, John Drummond joh...@gmail.com javascript: wrote: I suspect I'm

[julia-users] Re: defining function for lt for use in sort - simple question

2014-11-10 Thread John Drummond
to try it. kl. 03:18:13 UTC+1 søndag 9. november 2014 skrev John Drummond følgende: I was originally julia 0.3.1 on windows 7 this is on Macosx 10 julia 0.3.2 I loaded the file LogParse.jl below and then in the repl ran reload(LogParse.jl) methods(isless) ary1 = LogParse.DayPriceText

[julia-users] Re: defining function for lt for use in sort - simple question

2014-11-10 Thread John Drummond
it directly. Apologies for not checking the initial input in a fresh session, I thought that reloading a module would completely reload the functions, but presumably not when appending to those in Base. Kind regards, John. On Monday, November 10, 2014 6:04:29 PM UTC, John Drummond wrote

Re: [julia-users] Intel Xeon Phi support?

2014-11-08 Thread John Drummond
-threading benchmark for us in general. Something that requires 1TFlop, or maybe 1000 things that take 1 GFlop? Hmm, how about realtime photogrammetry? -viral On Thursday, November 6, 2014 9:35:57 PM UTC+5:30, John Drummond wrote: Did you have any success? There's an offer of the cards

[julia-users] Re: defining function for lt for use in sort - simple question

2014-11-08 Thread John Drummond
. 20:14:48 UTC+1 fredag 7. november 2014 skrev John Drummond følgende: Hi, I suspect I'm doing something stupid but no idea what I'm missing. I create a module . I create a type in it, DayPriceText I import Base.isless I define isless for the type now in the repl I get methods(isless

Re: [julia-users] Intel Xeon Phi support?

2014-11-07 Thread John Drummond
? It may be a good multi-threading benchmark for us in general. -viral On Thursday, November 6, 2014 9:35:57 PM UTC+5:30, John Drummond wrote: Did you have any success? There's an offer of the cards for 200usd at the moment https://software.intel.com/en-us/articles/special-promotion-intel-xeon

[julia-users] defining function for lt for use in sort - simple question

2014-11-07 Thread John Drummond
Hi, I suspect I'm doing something stupid but no idea what I'm missing. I create a module . I create a type in it, DayPriceText I import Base.isless I define isless for the type now in the repl I get methods(isless) = # 25 methods for generic function isless: ..

Re: [julia-users] Intel Xeon Phi support?

2014-11-06 Thread John Drummond
Did you have any success? There's an offer of the cards for 200usd at the moment https://software.intel.com/en-us/articles/special-promotion-intel-xeon-phi-coprocessor-31s1p so I was going to pick one up Kind Regards, John. On Monday, May 12, 2014 4:45:32 PM UTC+1, Stefan Karpinski wrote: Not

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-15 Thread John Drummond
Chris Strickland https://groups.google.com/forum/#!msg/julia-users/jlKoEtErRL4/0ZcB_hxyJlYJ lists one approach for the general problem you could precreate A and then define it everywhere, or send a copy over as a parameter to whatever function you use in pmap, similar but not the same as

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-15 Thread John Drummond
: you could precreate A and then define it everywhere Could you please show me some code how to do it? On Monday, September 15, 2014 2:51:08 PM UTC+2, John Drummond wrote: Chris Strickland https://groups.google.com/forum/#!msg/julia-users/jlKoEtErRL4/0ZcB_hxyJlYJ lists one approach

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-15 Thread John Drummond
I got working rather than copying it over each run. One other thing is that requiring a file after adding the processes should load it on all processes which is another approach to setting up the environment for each process On Monday, September 15, 2014 3:51:43 PM UTC+1, John Drummond

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-15 Thread John Drummond
though pmap(x-myid()+x[1]+x[2], map(x-(x,a),1:3)) On Monday, September 15, 2014 5:09:18 PM UTC+1, John Drummond wrote: @spawnat(2,whos()) is useful to know what's defined in other processes (e.g. for process 2 in this case) if you want to gather the return values, use a reducer function e.g

[julia-users] intermediate results with reduce / FoldList

2014-09-09 Thread John Drummond
What's the idiomatic way of writing Mathematica's Foldlist in Julia? i.e. a fold that gives the intermediate results? e.g. in Mathematica Fold[Plus, 1, Rest[Range[10]]] gives 55 and FoldList[Plus, 1, Rest[Range[10]]] gives {1, 3, 6, 10, 15, 21, 28, 36, 45, 55} in Julia foldl(+,1,2:10) gives

Re: [julia-users] intermediate results with reduce / FoldList

2014-09-09 Thread John Drummond
That's very helpful. Thank you both. I'd only got to a route with map and a closure for plus let y = 0;map(x-(g() = y += x; g()),1:10);end Thanks, John. On Tuesday, September 9, 2014 4:47:30 PM UTC+1, Shashi Gowda wrote: or rather, julia cumfoldl(f, x0, itr) = foldl((a, b) - push!(a,

[julia-users] Any recommendations for running embarrassingly parallel problems across multiple windows machines and also across mixed linux windows machines?

2014-06-13 Thread John Drummond
Hi, Are there any recommendations for running embarrassingly parallel problems across multiple windows machines? I have to do the same piece of work on multiple multiple GB files - which takes hours on a single machine spun out across the cores with parallel map. I'm lucky enough to have

Re: [julia-users] Julia performance on large-scale text processing?

2014-06-13 Thread John Drummond
I found the performance of type any wasn't up to much (worse than perl) - putting in specific types made a huge difference (I've now switched to Julia for processing large amounts of text). On Friday, June 13, 2014 4:06:40 PM UTC+1, Rich Morin wrote: On Jun 13, 2014, at 06:31, Blake Johnson

[julia-users] MethodError(Array{T,N} on using end in array of array

2014-04-09 Thread John Drummond
using 0.2.1 running the code in a script (it doesn't work in the REPL either) a = {[1,2,3],1,3,[1,2,3,4]} println(a[4][3]) println(a[4][end -1]) gives 3 LoadError(N:/test/test2.jl,7,MethodError(Array{T,N},([1,2,3,4],1,2))) = I.e referencing using *end* doesn't seem to work on lower levels. =