next up previous contents index
Next: Examples of the input Up: User's manual of OpenMX Previous: Automatic force tester   Contents   Index

Automatic memory leak tester

In OpenMX, the memory used is dynamically allocated when it is required. However, the dynamic memory allocation causes often a serious memory leak which wastes the memory used as the MD steps increase. To check the memory leak, one can run OpenMX as follows:


For serial running

     % ./openmx -mltest 
  

For parallel running
     % ./openmx -mltest "mpirun -np 4 openmx"
  

By monitoring VSZ and RSS actually used at the same monitoring point in the program code for 13 test inputs in a directory 'work/ml_example', one can find whether the memory leak takes place or not. After finishing the run, a file 'mltest.result' is generated in the directory 'work'. You will see the monitored VSZ and RSS as a function of MD steps as follows:
    1     ml_example/Co4.dat              

                  CPU (%)     VSZ (kbyte)    RSS (kbyte)
 MD_iter=   1     99.600      42692          18348
 MD_iter=   2     99.600     176072         168496
 MD_iter=   3     99.300     181624         174052
 MD_iter=   4     99.100     176060         168488
 MD_iter=   5     99.000     181624         174052
 MD_iter=   6     98.800     176084         168512
 MD_iter=   7     98.800     181624         174052
 MD_iter=   8     99.900     176060         168488
 MD_iter=   9     99.900     181624         174052
 MD_iter=  10     99.600     176084         168512
 MD_iter=  11     99.700     181624         174052
 MD_iter=  12     99.600     176084         168512
 MD_iter=  13     99.600     181624         174052
 MD_iter=  14     99.500     181624         174052
 MD_iter=  15     99.500     181628         174056
 MD_iter=  16     99.400     181628         174056
 MD_iter=  17     99.300     181624         174052
 MD_iter=  18     99.200     181628         174056
 MD_iter=  19     99.200     181620         174048
 MD_iter=  20     99.100     181628         174056
 MD_iter=  21     99.100     181620         174048
 MD_iter=  22     99.200     181628         174056
 MD_iter=  23     99.200     181620         174048
 MD_iter=  24     98.800     181628         174056
 MD_iter=  25     98.800     181620         174048
 MD_iter=  26     98.800     181628         174056
 MD_iter=  27     99.200     181624         174052
 MD_iter=  28     99.200     181628         174056
 MD_iter=  29     99.100     181624         174052
 MD_iter=  30     99.100     181628         174056


    2     ml_example/Co4+U.dat            

                  CPU (%)     VSZ (kbyte)    RSS (kbyte)
 MD_iter=   1     99.800      42800          18456
 MD_iter=   2     99.700     176172         168664
    ......
    ....



2009-08-28