Having a 2nd look at the code, it may be even easier to delete the `nodesBoxes`, i.e. something like this:
=== modified file 'Src/SiestaXC/mesh3d.F90' --- Src/SiestaXC/mesh3d.F90 2017-02-17 13:28:06 +0000 +++ Src/SiestaXC/mesh3d.F90 2018-12-14 10:29:28 +0000 @@ -2926,7 +2926,7 @@ character(len=*),parameter:: errHead = myName//'ERROR: ' integer, parameter:: maxFactors = 100 ! Max prime factors in nNodes type(distrType),pointer:: distr, newDistr, oldDistr - integer,allocatable:: axisBox(:,:,:), nodeBoxes(:,:,:), partBox(:,:,:) + integer,allocatable:: axisBox(:,:,:), partBox(:,:,:) integer:: axis, axisNodes(3), blockSize, boxSize, & factor(maxFactors), groupSize, & i1, i2, i3, iAxis, iBox, iDistr, iFac, iID, iNode, iPow, & @@ -2989,9 +2989,7 @@ ! Handle box argument with priority if (present(box)) then ! Collect all node boxes and store them - allocate( nodeBoxes(2,3,0:totNodes-1) ) - call gatherBoxes( box, nodeBoxes ) - distr%box = nodeBoxes + call gatherBoxes( box, distr%box ) goto 999 ! Exit, since no other arguments must be considered in this case end if ! (present(box))
Having a 2nd look at the code, it may be even easier to delete the `nodesBoxes`, i.e. something like this:
=== modified file 'Src/SiestaXC/ mesh3d. F90' mesh3d. F90 2017-02-17 13:28:06 +0000 mesh3d. F90 2018-12-14 10:29:28 +0000 len=*), parameter: : errHead = myName//'ERROR: ' distrType) ,pointer: : distr, newDistr, oldDistr allocatable: : axisBox(:,:,:), nodeBoxes(:,:,:), partBox(:,:,:) allocatable: : axisBox(:,:,:), partBox(:,:,:)
factor( maxFactors) , groupSize, & 2,3,0:totNodes- 1) )
--- Src/SiestaXC/
+++ Src/SiestaXC/
@@ -2926,7 +2926,7 @@
character(
integer, parameter:: maxFactors = 100 ! Max prime factors in nNodes
type(
- integer,
+ integer,
integer:: axis, axisNodes(3), blockSize, boxSize, &
i1, i2, i3, iAxis, iBox, iDistr, iFac, iID, iNode, iPow, &
@@ -2989,9 +2989,7 @@
! Handle box argument with priority
if (present(box)) then
! Collect all node boxes and store them
- allocate( nodeBoxes(
- call gatherBoxes( box, nodeBoxes )
- distr%box = nodeBoxes
+ call gatherBoxes( box, distr%box )
goto 999 ! Exit, since no other arguments must be considered in this case
end if ! (present(box))