0 votes
asked by (370 points)

Hi there,

I'm using writewhenmaxdim_exceeds keyword in dmrg to implement writing to disk, but I met the error message shown below. It says that there is not space left on the disk, but I checked that there is enough space in the directory (there is 2TB available space and the tensors are expected to occupy around 400GB). Can anyone help?

DMRG Command:
energy,psi = dmrg(H,psi,sweeps; writewhenmaxdim_exceeds=10000)

Space of the Directory
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md2 15625699328 13595822844 2029876484 88% /scratch

Error Message:
ERROR: LoadError: SystemError: close: No space left on device
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:174
[2] #systemerror#68
@ ./error.jl:173 [inlined]
[3] systemerror
@ ./error.jl:173 [inlined]
[4] close
@ ./iostream.jl:63 [inlined]
[5] open(::Serialization.var"#1#2"{ITensor}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:332
[6] open
@ ./io.jl:328 [inlined]
[7] serialize
@ ~/julia-1.7.2/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:775 [inlined]
[8] setindex!
@ ~/.julia/packages/SerializedElementArrays/cdFxy/src/SerializedElementArrays.jl:78 [inlined]
[9] makeL!(P::ITensors.DiskProjMPO, psi::MPS, k::Int64)
@ ITensors ~/.julia/dev/ITensors/src/mps/abstractprojmpo.jl:164
[10] makeL!
@ ~/.julia/dev/ITensors/src/mps/diskprojmpo.jl:103 [inlined]
[11] position!
@ ~/.julia/dev/ITensors/src/mps/abstractprojmpo.jl:219 [inlined]
[12] macro expansion
@ ~/.julia/dev/ITensors/src/mps/dmrg.jl:206 [inlined]
[13] macro expansion
@ ~/.julia/packages/TimerOutputs/LDL7n/src/TimerOutput.jl:252 [inlined]
[14] macro expansion
@ ~/.julia/dev/ITensors/src/mps/dmrg.jl:205 [inlined]
[15] macro expansion
@ ./timing.jl:299 [inlined]
[16] dmrg(PH::ProjMPO, psi0::MPS, sweeps::Sweeps; kwargs::Base.Pairs{Symbol, Int64, Tuple{Symbol}, NamedTuple{(:write
whenmaxdimexceeds,), Tuple{Int64}}})
@ ITensors ~/.julia/dev/ITensors/src/mps/dmrg.jl:186
[17] #dmrg#958
@ ~/.julia/dev/ITensors/src/mps/dmrg.jl:47 [inlined]

commented by (370 points)
BTW, where are the tensors stored when the write to disk feature is functioning? I ran the following example code but didnot find any new files showing up in the directory where my code is located.


1 Answer

+1 vote
answered by (370 points)
Best answer

It turns out that the intermediate tensors are by default stored in the "/tmp" directory, which in my case has small disk storage. To resolve the issue, I changed the environment variable TMPDIR to a location with a bigger storage.

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.