# Julia Execution get out of memory error

**URL:** https://discourse.julialang.org/t/julia-execution-get-out-of-memory-error/5238
**Category:** General Usage
**Created:** [August 5, 2017, 1:46pm UTC](https://discourse.julialang.org/t/julia-execution-get-out-of-memory-error/5238 "2017-08-05T13:46:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Anu\_Mol](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Anu\_Mol](https://discourse.julialang.org/u/Anu_Mol)
#### Post date: [August 5, 2017, 1:46pm UTC](https://discourse.julialang.org/t/julia-execution-get-out-of-memory-error/5238/1 "2017-08-05T13:46:01Z")

</div>

I have running julia through terminal in my system. When am try to run machine learning algorithms got out of memory exception.My system have Ram size 16gb.Please explain me about julia memory allocation concept.I have eclose my code here:  
function Master()  
println(nprocs())  
table = readdlm(“diabetics2.csv”,‘,’)  
data = convert(DataFrame, table)  
features = convert(Array, data[:,1:8])  
labels = convert(Array, data[:,9])  
procs = nprocs()  
i = 1  
n,m = size(features)  
#println(n,“–”,features[i:Int(n/procs)])  
while procs != 0  
k = Int(n/procs)  
println(k)  
data\_procs = features[i:k,:]  
labels\_procs = labels[i:k,1]  
i += k  
n -= k  
procs -= 1  
end  
println(“Assigning to processes the work…”)  
for i in 1:nprocs()  
@spawnat i trainLogisticRegression(data\_i,label\_i)  
end  
end

Is parallel execution possible with julia? When am running above code my system got struck

---

<div class="post-metadata">

### Author: ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)
#### Post date: [August 5, 2017, 2:51pm UTC](https://discourse.julialang.org/t/julia-execution-get-out-of-memory-error/5238/2 "2017-08-05T14:51:27Z")

</div>

> [@Julia run using terminal for 1GB dataset showing out of memory error](https://discourse.julialang.org/t/julia-run-using-terminal-for-1gb-dataset-showing-out-of-memory-error/5203):
>
> Can Julia actually support large dataset. My machine has RAM size of 15GB and most of the time when I go for parallel processing with large dataset around 1GB only, it shows out of memory error… If Julia supports, how much can it intake? Is it because RAM size is insufficient or can someone say How can I specify the memory required for Julia. Where am I getting stuck. Thanx in advance.

---

<div class="post-metadata">

### Author: ![John\_Gibson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_gibson/32/5321_2.png) [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)
#### Post date: [August 5, 2017, 2:56pm UTC](https://discourse.julialang.org/t/julia-execution-get-out-of-memory-error/5238/3 "2017-08-05T14:56:15Z")

</div>

This looks like the same code @Devi_Sree posted at [Julia run using terminal for 1GB dataset showing out of memory error - #5 by StefanKarpinski](https://discourse.julialang.org/t/julia-run-using-terminal-for-1gb-dataset-showing-out-of-memory-error/5203/5). As people in that thread said, it’s hard to help unless you post a fully reproducible example. Perhaps you could place your data file `diabetics2.csv` on the internet and provide a URL, or provide short piece of code that would generate a random csv file of the same size.

It would also help if you formatted your code by enclosing it in triple backticks, e.g. ```` <code>````.

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [August 5, 2017, 2:56pm UTC](https://discourse.julialang.org/t/julia-execution-get-out-of-memory-error/5238/4 "2017-08-05T14:56:59Z")

</div>

First, please quote code with triple backticks `````

Then, this is a bit an odd posting as exactly the same question was posted before: [Julia run using terminal for 1GB dataset showing out of memory error](https://discourse.julialang.org/t/julia-run-using-terminal-for-1gb-dataset-showing-out-of-memory-error/5203) (in particular the code example is identical). Please do not post on the same topic twice (neither on this forum, nor both on this and on a separate forum such a stack overflow). One potential reason that there was no answer on the other thread, is that there is still no runnable example provided as there is no data-file.

Edit: looks like I am a bit slower than others…
