From 1e7ea6dbadb169a8707c048af8e30ee048fb00e6 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Wed, 4 Apr 2012 07:39:10 -0700 Subject: [PATCH] moved where source is allocated --- src/cmfd_execute.F90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cmfd_execute.F90 b/src/cmfd_execute.F90 index 41cfbf94be..bdc5f17f35 100644 --- a/src/cmfd_execute.F90 +++ b/src/cmfd_execute.F90 @@ -60,6 +60,7 @@ contains ! execute snes solver call cmfd_snes_execute() +! call cmfd_slepc_execute() ! only run if master process if (master) call timer_stop(time_cmfd) @@ -244,6 +245,9 @@ contains nz = cmfd%indices(3) ng = cmfd%indices(4) + ! allocate cmfd source if not already allocated and allocate buffer + if (.not. allocated(cmfd%source)) allocate(cmfd%source(ng,nx,ny,nz)) + ! reset cmfd source to 0 cmfd%source = 0.0_8 @@ -316,9 +320,6 @@ contains end if - ! allocate cmfd source if not already allocated and allocate buffer - if (.not. allocated(cmfd%source)) allocate(cmfd%source(ng,nx,ny,nz)) - ! broadcast full source to all procs call MPI_BCAST(cmfd%source,ng*nx*ny*nz,MPI_REAL8,0,MPI_COMM_WORLD,mpi_err)