I see that you are running MFiX 21.4. The current release (22.2.1) has some improvements you may be interested in, for example the monitor output files now include information about the monitor type:
#
# Run type: NEW
# Monitor type: Sum over region, Volume = 0.77861163E-02
# "Time","des_usr_var(2)"
I am able to reproduce the result you report, where the value of des_usr_var(2)
is dependent on the domain decomposition, using the current release.
When in doubt, it’s best to start with a serial (single CPU) run. You can rebuild the solver for serial, or just set nodesi = nodesj = nodesk = 1
Doing this I obtain the value 1509.79 at t=1ms which matches the nodesi = nodesk = 1, nodesj = 4
value you reported.
I don’t completely understand what you are doing in des_thermo_newvalues.f
but I suspect that your algorithm is dependent on the domain decomposition.
!#############
do k = 1,MAX_PIP
yposition(k) = des_pos_NEW(k,2)
end do
!############
call QsortC(yposition)
y_position_max = yposition(MAX_PIP-int(0.1*MAX_PIP))
Note that if you just want to find the max position, Qsort
is overkill, but I don’t understand the MAX_PIP-int(0.1*MAX_PIP)
. It’s likely that there is a more efficient way to compute this, without the qsort.
However, the issue is that this y_position_max value
is going to depend on the decomposition - when running on more than one node, each node can only ‘see’ a subset of the particles, so y_position_max
will be dependent on the partition. I believe this is the source of the disparities you are seeing.
To check this hypothesis, add a debug statement:
y_position_max = yposition(MAX_PIP-int(0.1*MAX_PIP))
write(*,*) "DEBUG: MyPE=", myPE, "MAX_PIP=", MAX_PIP, "y_position_max=", y_position_max
(I also added use compar, only: myPE
near the top of the file, to give access to the myPE
variable. PE
= ‘processing element’, myPE
= index of current processor.)
Running this with nodes=1,1,1
DEM NITs: 3 Total PIP: 38558
DEBUG: MyPE= 0 MAX_PIP= 39264 y_position_max= 6.2155804157893971E-002
DEBUG: MyPE= 0 MAX_PIP= 39264 y_position_max= 6.2155803851199780E-002
DEBUG: MyPE= 0 MAX_PIP= 39264 y_position_max= 6.2155803646343259E-002
All of the particles are being handled by PE 0.
Running with 1,4,1 we see this:
DEM NITs: 3 Total PIP: 38558
DEBUG: MyPE= 2 MAX_PIP= 4 y_position_max= 0.0000000000000000
DEBUG: MyPE= 1 MAX_PIP= 4 y_position_max= 0.0000000000000000
DEBUG: MyPE= 3 MAX_PIP= 4 y_position_max= 0.0000000000000000
DEBUG: MyPE= 0 MAX_PIP= 39264 y_position_max= 6.2155803105279163E-002
Note that PE 0 has most of the particles, which makes sense - they are all clustered at the bottom of the container and we are partitioning vertically (nodesj = y axis)
Now with 2,1,2:
DEM NITs: 3 Total PIP: 38558
DEBUG: MyPE= 0 MAX_PIP= 12240 y_position_max= 6.2155804157893978E-002
DEBUG: MyPE= 1 MAX_PIP= 12187 y_position_max= 6.2155803851199787E-002
DEBUG: MyPE= 3 MAX_PIP= 12126 y_position_max= 6.2155803851199780E-002
DEBUG: MyPE= 2 MAX_PIP= 12229 y_position_max= 6.2155803851199787E-002
Now, since we are slicing along the X and Z axes, the particles are more evenly distributed among the 4 PEs. The values of y_position_max
computed on the 4 PEs are close but not identical. If this is really supposed to be the maximum y position of ALL the particles in the system, you’re going to have to do some bcast
or send_recv
between the PEs to compute the global maximum.
Hope this helps,
– Charles