Try the following code:
addprocs(3)
using IterativeSolvers
function test(N=10000)
@sync K=SharedArray(Complex{Float64}, (N,N), init = S ->
S[Base.localindexes(S)] = rand())
f=SharedArray(Complex{Float64},N)
fill!(f, 1.0+1.0im) #constant normal extension of the given Dirichlet data
β=similar(f) #the density int he integral equation
println("\nRunning GMRES solver:")
β, Hist=gmres(K, f, tol=1e-9, maxiter=800, restart=30)
println("Converged? =", Hist.isconverged)
β
end
for i=1:4
@time b=test(10);
end
N=[100 200 400 800 1600 3200 6400 12800 25600]
for run=1:20
for n in N
println(n)
@time b=test(n);
end
end
On Wednesday, April 27, 2016 at 5:30:51 PM UTC+2, Yichao Yu wrote:
>
>
> On Apr 27, 2016 11:00 AM, "Richard Tsai" <[email protected] <javascript:>>
> wrote:
> >
> > I have been running some codes that used about 12GB memory for each run.
> > I had enough RAM on my computer.
> > However, in a single julia session, if I run the same code several
> times, I would get warning that I am short on disk space.
> > I got the same behavior on Mac or Linux machines.
> >
> > Does anybody know why?
>
> It's impossible to tell without knowing exactly what you are doing.
>