[julia-users] Preferred way of slicing an array into DArray

2014-03-04 Thread Daniel H
Hi all, I would like to know if there's any ways to distribute an array the way I want it. For example, if I have I have 4 workers and an array, a : julia a = rand(4,3) and I want to give each worker a row to work on, how can I distribute the array? Julia has distribute function to slice

Re: [julia-users] Preferred way of slicing an array into DArray

2014-03-06 Thread Daniel H
Thanks Amit, It works perfectly :)

[julia-users] Garbage Collection in Julia vs MATLAB

2014-03-10 Thread Daniel H
Hi all, I find that Julia's GC doesn't collect garbage regularly, so the computer might run out of memory and starts swapping. Here's what I did A = a big matrix. After A is defined, there would be 1.1 GB free memory left B = a random matrix of 500 MB C = a random matrix of 500 MB # so now

[julia-users] Re: Garbage Collection in Julia vs MATLAB

2014-03-10 Thread Daniel H
I'm using Mac OS X 10.8.5. Should gc work properly on this OS? I don't want to manually call gc() since I will write functions later and would like gc to run automatically.

[julia-users] Re: Garbage Collection in Julia vs MATLAB

2014-03-10 Thread Daniel H
To me, it looks like the gc didn't kick off automatically because current gc is expensive or maybe it's the OS or my personal settings that prevent gc to trigger itself. Can anyone try it on their computer and see if gc() trigger automatically? I guess, for now, I would call gc() manually.

[julia-users] Re: Garbage Collection in Julia vs MATLAB

2014-03-10 Thread Daniel H
Ya it is really weird that gc() doesn't trigger automatically. Where would be the best place to file such issue?

[julia-users] Re: Multidims array

2014-03-10 Thread Daniel H
by the way, your b is 2 dimensional it's 3x3 On Monday, March 10, 2014 3:52:05 PM UTC-7, Daniel H wrote: b = [1 2 3; 3 4 5; 6 7 8]; ndim_b = length(size(b)) On Monday, March 10, 2014 3:45:58 PM UTC-7, Renoir wrote: What sintax have i to use to get an-dim array? This code a = [1 2 3; 4