From 7c3eef86bed6a88d09905cd2c3d598f39364c93a Mon Sep 17 00:00:00 2001 From: Douglas Guptill <douglas.guptill@dal.ca> Date: Mon, 27 Jul 2009 16:43:24 +0000 Subject: [PATCH] change call to octreesolve_shrink_xyz, delay lsf allocation, bump date --- DOUAR.f90 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/DOUAR.f90 b/DOUAR.f90 index 33fa93b4..18b40970 100644 --- a/DOUAR.f90 +++ b/DOUAR.f90 @@ -101,8 +101,8 @@ call int_to_char(ciproc,3,iproc) threadinfo%Logunit=1000+iproc open (unit=threadinfo%Logunit,file='./DEBUG/mpilogs/Log_'//ciproc//'.dat',status='replace') -write(threadinfo%Logunit,*) 'This is douar, last modifed 2009-07-20' -write(*,*) 'This is douar, last modifed 2009-07-20' +write(threadinfo%Logunit,*) 'This is douar, last modifed 2009-07-27' +write(*,*) 'This is douar, last modifed 2009-07-27' write(threadinfo%Logunit,'(a,i3)') 'Log file of mpi process',iproc call heap_init(threadinfo,2000+iproc,'./DEBUG/mpilogs/mem_heap_'//ciproc//'.dat') @@ -422,19 +422,15 @@ do while (istep.le.params%nstep) call heap (threadinfo,'osolve%y', 'main',size(osolve%y),'dp',+1) allocate (osolve%z(osolve%nnode),stat=threadinfo%err) call heap (threadinfo,'osolve%z', 'main',size(osolve%z),'dp',+1) - allocate (osolve%lsf(osolve%nnode,osolve%nlsf),stat=threadinfo%err) - call heap (threadinfo,'osolve%lsf', 'main',size(osolve%lsf),'dp',+1) - osolve%lsf=0.d0 call octree_find_node_connectivity (osolve%octree,osolve%noctree, & osolve%icon,osolve%nleaves,osolve%x,osolve%y,osolve%z,osolve%nnode) - ! osolve%nnode has been changed by octree_find_node_connectivity; re-size x,y,z - call octreesolve_shrink_xyz(threadinfo, osolve, osolve%nnode) - ! resize lsf - call heap (threadinfo,'osolve%lsf', 'main',size(osolve%lsf),'dp',-1) - deallocate (osolve%lsf) - allocate (osolve%lsf(osolve%nnode,osolve%nlsf),stat=threadinfo%err) + ! osolve%nnode has been changed by octree_find_node_connectivity, so re-size x,y,z + call octreesolve_shrink_xyz(osolve, threadinfo) + + ! now that osolve%nnode is known we can allocate osolve%lsf + allocate (osolve%lsf(osolve%nnode,osolve%nlsf),stat=threadinfo%err) call heap (threadinfo,'osolve%lsf', 'main',size(osolve%lsf),'dp',+1) osolve%lsf=0.d0 -- GitLab