!Copyright (c) 2013 by https://git.em3d.cn/ under guide of Xiu Li(lixiu@chd.edu.cn) !written by Huaifeng Sun(sunhuaifeng@email.sdu.edu.cn) and Xushan Lu(luxushan@gmail.com) !Code distribution @ https://git.em3d.cn/ SUBROUTINE MEMORY_USE_ESTIMATION !This subroutine is written by Huaifeng Sun, and it has not been modified since the last ice age, so it can not reveal the real consumption of memory now. ! This subroutine needs further modification. You can, you do! USE CONSTANTPARAMETERS IMPLICIT NONE INTEGER(KIND=8) TUSE CHARACTER(LEN=40) XSTRING INTEGER(KIND=1) CONTD TUSE=0.0 TUSE=TUSE+NX*NYB*NZB+NXB*NY*NZB+NXB*NYB*NZ !�糡Eʹ���ڴ� TUSE=TUSE+NXB*NY*(NZ+1)+NX*NYB*(NZ+1)+NX*NY*NZB !�ų�Hʹ���ڴ� TUSE=TUSE+4*NY*NZB+4*NYB*NZ+NX*4*NZB+NXB*4*NZ+NX*NYB*4+NXB*NY*4 !�߽�����ʹ���ڴ� TUSE=TUSE+4*NY*NZB+4*NYB*NZ+NX*4*NZB+NXB*4*NZ+NX*NYB*4+NXB*NY*4 !�߽�����ʹ���ڴ� TUSE=TUSE+NXB*NYB*NZB !ģ��ʹ���ڴ� TUSE=TUSE+NSTOP*2 TUSE=TUSE/1024 TUSE=TUSE/1024 TUSE=TUSE*16 WRITE (XSTRING,'(I40)') TUSE XSTRING = 'At least '//TRIM(ADJUSTL(XSTRING))//'M memory is needed!' !ƴ��ΪҪ���FORMAT��ʽ XSTRING = TRIM(ADJUSTL(XSTRING)) WRITE(*,*)XSTRING RETURN ENDSUBROUTINE MEMORY_USE_ESTIMATION