limit size of table.txt

37 views
Skip to first unread message

Troy Dion

unread,
May 26, 2026, 7:25:20 PMMay 26
to mumax2
I have noticed that I get an error:

C:/Users/jromaes/go/src/github.com/mumax/3/engine/table.go:57 open 
Directory/table.txt: Access is denied.

I got the error twice and both times the file size is 25Mb. Is there a limitation on the file size that can be written on table.txt?

Thanks
Troy

Josh Lauzier

unread,
May 26, 2026, 8:13:04 PMMay 26
to mumax2
Hi,

I don't believe there is a limit. I just ran a test script and it wrote a table.txt of 27.8 MB without issue. Can you post the script you're getting the error with, as well as the full error message? Something like an access denied error i would expect if say, the disk were full, or if say Onedrive or another program was trying to back up the file while it was still in use.

Cheers,
Josh L.

Troy Dion

unread,
May 26, 2026, 8:49:45 PMMay 26
to mumax2
Hi Josh 

THanks for the quick reply.

I don't have any further error message to show. Both times it happened over night. So maybe some program is trying to back it up like you suggested. Or my PC is going into sleep mode or something. It is a new PC running windows 11 which I haven't used much yet so I don't know if that is the issue. It just seems strange that it stopped with the same file size and more or less in the same place within the loop. To be more clear the second time I ran I started my new loop from where the previous one failed. So it seems after the same number of loops its failed.

Here is the script. 

deg:=pi/180

Nx := 512
Ny := 256
Nz := 1
SetGridSize(Nx,Ny,Nz)

cell_xy := 4e-9
cell_z := 2e-9

SetCellSize(cell_xy,cell_xy,cell_z)
//SetPBC(10,10,0)

alpha = 0.07

EnableDemag= False

anisU = vector(0,0,1)
Ku1 = -1.2e4
Pol = 0.22
Lambda = 1
FixedLayer = vector(0,-1,0)

Msat = 600e3
Aex = 15e-12

H:=0.1


maxdt=1e-11
pause:=0e-9
exc_time:=10e-9


// ===== USER INPUT =====
theta:=0.0*deg
theta_min := 80.0*deg
theta_max := 355*deg
n_theta   := 56

curr:=0.0
curr_min := -3e11
curr_max := 3e11
n_curr   := 31

mx2 := 0.0;my2 := 0.0;mz2 := 0.0


tableaddvar(H*1000,"mu0H"," mT")
tableaddvar(theta/deg,"theta","deg")
tableaddvar(curr,"current","A")
tableaddvar(mx2,"mx^2","")
tableaddvar(my2,"my^2","")
tableaddvar(mz2,"mz^2","")

count:=0
// ===== LOOPS =====
for i := 0; i < n_theta; i++ {

    theta = (theta_min + (theta_max - theta_min) * (i) / (n_theta - 1))

if n_theta == 1 {
    theta = theta_min
}

    for jj := 0; jj < n_curr; jj++ {

        curr = curr_min + (curr_max - curr_min) * (jj) / (n_curr - 1)
if n_curr == 1 {
curr = curr_min
}
        print(sprintf("H = %04.0f mT theta = %03.0f and current = %f", trunc(H*1000),trunc(theta/deg),curr))

        t = 0
        J = vector(0,0,0)
        Temp = 300

       
        m = randommag()

        run(pause)

        B_ext = vector(H*cos(theta), H*sin(theta), 0)
        J = vector(0,0,curr)

dt := 1e-11
t_end := exc_time

for t < t_end {
    step := dt
    if t + dt > t_end {
        step = t_end - t
    }

    run(step)


//Calculate m^2 by cells
// Total number of cells
N := Nx * Ny * Nz
mx2 = sum(Mul(m.comp(0), m.comp(0)))/N
my2 = sum(Mul(m.comp(1), m.comp(1)))/N
mz2 = sum(Mul(m.comp(2), m.comp(2)))/N



tablesave()
    progress := 100.0 * t / t_end
    print(sprintf("Time progress: %.1f%%", progress))
}
filename:=sprintf("M%04d_M%04.0fmT_%03.0fdeg_%06.0fGJ.png",count,trunc(H*1000),trunc(theta/deg),trunc(curr*1e-9))
        snapshotas(m,filename)
count++
    }
}

Josh Lauzier

unread,
May 26, 2026, 11:29:58 PMMay 26
to mumax2
Hi,

Hmm, that does seem a bit strange. It seems like it takes quite a long time for the script to fill, so it's hard to test. I guess two things to test that might narrow it down would be to see if you can make it happen with a different script? You can try with a relatively trivial script that saves a lot of steps to the table very quickly, and see if it triggers at 25MB again. Or rerun your same script, but try saving more things to the file to reach 25MB faster, and see if it still happens at the same spot? The quick test script I used was:

SetGridsize(128, 32, 1)
SetCellsize(500e-9/128, 125e-9/32, 3e-9)

Msat  = 800e3
Aex   = 13e-12
alpha = 0.02

m = uniform(1, .1, 0)
relax()
save(m)    // relaxed state
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)
TableAdd(m)

//autosave(m, 200e-12)
tableautosave(10e-14)

B_ext = vector(-24.6E-3, 4.3E-3, 0)
run(10000e-9)

This reached 27MB in ~8minutes. Also, are you by chance keeping the interactive window open during this long simulation? It is not quite the same error message, but it does sound somewhat similar to this discussion. There might be a strange interaction with it trying to plot such a large file, if say gnuplot and mumax are both trying to access the file.

Best regards,
Josh L.
Reply all
Reply to author
Forward
0 new messages