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 -mltestFor 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 92.900 49756 15736 MD_iter= 2 84.900 73344 57208 MD_iter= 3 81.200 73344 57212 MD_iter= 4 85.900 98672 82548 MD_iter= 5 82.800 98672 82548 MD_iter= 6 83.800 98672 82548 MD_iter= 7 84.200 98672 82548 MD_iter= 8 84.600 98824 82688 MD_iter= 9 85.000 98824 82688 MD_iter= 10 87.300 98824 82688 MD_iter= 11 87.500 98824 82688 MD_iter= 12 87.400 98824 82688 MD_iter= 13 85.700 98824 82688 MD_iter= 14 84.500 98824 82688 MD_iter= 15 86.100 98824 82688 MD_iter= 16 86.300 98824 82688 MD_iter= 17 86.500 98824 82688 MD_iter= 18 86.400 98824 82688 MD_iter= 19 86.500 98824 82688 MD_iter= 20 87.500 98824 82688 2 ml_example/Co4+U.dat CPU (%) VSZ (kbyte) RSS (kbyte) MD_iter= 1 92.800 50048 15924 MD_iter= 2 84.700 73628 57476 MD_iter= 3 84.700 73628 57496 MD_iter= 4 85.300 73628 57496 MD_iter= 5 85.100 98828 82684 MD_iter= 6 85.000 98828 82684 ...... ....