Hello all,

 

I am not really sure that it`s a mpb related problem or a scheme problem... Please let me know if you think I am positing to the wrong mailing list.

 

I have setup a simulation where I iterate for kz” and for “r” the radius of the defect of triangular lattice of holes. The output is sent to a file at each step of the iteration.

 

Strangely, my simulations are always aborted when they reach 102528 lines in the file.

 

This behaviour does not seem to be related to my choice of kz or r.

 

I have suspected that I was reaching some kind of limit of file size (at that time that was around 13Mo). So I have removed a couple of parameters to decrease it’s size by a factor of two, but the simulation is aborted anyway at 6Mo of file size. In both case the limit is at 102528 lines.

 

 

 

=======================================

I open my output-file with the following command:

 

(define OutputFile (open-output-file “filename.txt”))

 

….definition

 

In the loop , I write to it at the end of each call to the “run” command with :

 

(display kz OutputFile)

(display “\t” OutputFile)

(display “\n”)

 

 

The file is closed when the loop is completed with:

(close-output-port OutputFile)

 

I am not really sure of the cause of the problem…

 

On one side that might be related to the file handling (although I don’t see why). As a possible solution, I would like to avoid keeping my output file open for all the duration of the simulation and instead opening it and close it when it’s really needed.  I could try to open the file in “append” mode and close it within the loop at each iteration. Unfortunately, I have not found the way to open the file without using a define” command for the output port, which restricts the opening to the zone outside the loop.

If anyone could give a trick to do it, that will be appreciated.

 

Prior to send my results to a file, I was using the standard approach to print my results to the standard output, redirect it to a file and get the appropriate values from the grep command. I got the same problem. The simulations were stopping at some point although I do not recall if it was at after 102528 iterations. At that time, I was thinking that it was related to the file size that was getting to big (>25Mo). It is why I decided to send my results to a file.

 

Getting the same problem, let me think that it could be possible that I reach some kind of memory problem due to the fact I call 102528 times the run command with the same call to mpb. Should I flush the memory in some when I do these repetitive calls to (run)?

 

 

Thanks

Stef

 

 

 

 

 

 

 

 

 



 

_______________________________________________
mpb-discuss mailing list
mpb-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss

Reply via email to