implicit real(a-z) print *, 'Assume we store only real zones, plus boundary info' print *, 'but we need two copies.' print *, 'The RAM working set assumes two copes of a cubic' print *, 'set (which does include boundary info) plus a copy' print *, 'of the real zones from the pillar' 1 continue print * print *, "Enter nx,ny,nz, (in a pillar), nglobal" read(5,*,end=666) nx,ny,nz, nglobal mb= 1024. * 1024. c Assume 2 passes, 4 bytes/var and 6 variables and c nbdy=5, nbdy_transverse=2. nbdy= 5 c nx= np c ny= np c Figures number of zones computed, and required halo size by c working backwards: c ---------------------- c x1 sweep computes nx,ny,nz, needs: nc = nx*ny*nz nxb = nx+2*nbdy nyb = ny+4 nzb = nz+4 c y1 sweep computes nxb,nyb,nzb, needs: nc = nc + nxb*nyb*nzb nxb = nxb+4 nyb = nyb+2*nbdy nzb = nzb+4 c z1 nc = nc + nxb*nyb*nzb nxb = nxb+4 nyb = nyb+4 nzb = nzb+2*nbdy c z2 nc= nc + nxb*nyb*nzb nxb = nxb+4 nyb = nyb+4 nzb = nzb+2*nbdy c y2 nc = nc + nxb*nyb*nzb nxb = nxb+4 nyb = nyb+2*nbdy nzb = nzb+4 c x2 nc = nc + nxb*nyb*nzb nxbf = nxb+2*nbdy nybf = nyb+4 nzbf = nzb+4 print *, 'final nxf,nyf,nzf=', nxbf,nybf,nzbf c Number of tiles: npx = nglobal/nx npy = nglobal/ny npz = nglobal/nz n= npx*npy c Instead of writing the pillar with halo, write just the c real zones and the boundaries. c bytes for a pillar: nb1 = 6*4* nxbf*nybf*nzbf nb1real= 6*4*nx*ny*nz c bytes for face fake zones and edges nf1 = 6*4* 4 * (nxb-nx) * nzb nf2 = 6*4* 4 * (nxb-nx)*(nyb-ny) * nzb print *, 'total single pillar Mbytes=', nb1real/mb print *, 'total single bdrys Mbytes=', (nf1+nf2)/mb total= (nb1real+nf1+nf2)/mb print *, 'total context size Mbytes=', total print *, 'number of contexts:',npx,npy,' that is ',n c This total includes 2 copies (3 would be nice for checkpointing) print *, 'total 2-copy problem disk space required Gbytes=', & n*total * 2 / 1024. c Considering a working set a cube, how much RAM is needed for 2 copies ram= nxbf*nybf*nybf * 6 * 4 * 2 / mb ram = ram + (nx*ny*ny * 6 * 4 / mb) print *, 'RAM working set size Mbytes=', ram c fraction 'real zones' per storage print *, 'fraction real/total storage=', & (6*4*(nx*ny*nz)) / (total*mb) c fraction 'real computation' print *, 'real/redundant calculation fraction= ', & (6*nx*ny*nz) / nc goto 1 666 continue stop end