Question: RAM overflow when increasing DIGITS, while using LinearAlgebra Package on large matrices

Good evening everyone

I am trying to solve this new problem the whole day up till now and as it is getting very late, I thought asking someone smarter than me might help in the end.

What I experience at the moment is that a written program of mine, as given below, works pretty well, when I set Digits to 10 or less. 100000 loops are not a problem. Yet, as soon as I start increasing Digits to values greater that about 15, my program crashes after about 100 loops. I can see what is happening: The RAM (2GB), is full.

Yet, I do not understand why it fills up till collapse, as it does not even start to occupy more and more RAM with Digits:=10. I found the help article ?EffNumLa  and think it has something to do with my conversion (see below) of the matrix A into floats. I think the entries have to be given to the procedures of the LinearAlgebra package more precisely, but I do not know how. The matrices inside the loop are overwritten at the beginning of each loop, so I do not think that they are occupying the RAM.

If anyone has experience with this kind of problem, I would be glad to hear how she/he solved it.

Thank you very much and I wish a good night

 

Karl

PS:

My program looks basically like this:

 

A:=Matrix(16):   #some complex entries, not yet any floats and not too big

B:=evalf(A):       #conversion to float entries (might be the critical point)

filestream:=fopen("file.txt",WRITE):              

for E from 0.01 by 0.0001 to 1.0 do

C:=MatrixAdd(B+DiagonalMatrix(E)):         # New Matrix at the beginning of each loop. Should overwrite old matrix.

(l,L):=Eigenvectors(C):

Linv:=MatrixInverse(L):

D:=L.MatrixExponential(DiagonalMatrix(l)).Linv          
out:=Eigenvalues(D):                  

fprint(Filestream,"%a...",seq(D[m],m=1..16)):      # Export data after every loop. Before I tried to do this with ExportMatrix, and the RAM    was full faster that I could react, but that's a different topic  :)

end do:

fflush():
fclose()

 

Please Wait...