Dear developers, @cgw @jeff.dietiker, I found that in the DMP parallel calculation of MFiX-DEM, only the root process calls the subroutine usr2_des. How can I make all processes call usr2_des?
I called a custom subroutine in usr2_des. This subroutine does not rely on data from other processes. Will this subroutine be called in all processes during DMP parallel calculation? If not, how should the program write usr2_des? In addition, the custom subroutine needs to read (only read but not modify) some grid and particle parameters such as: DES_POS_NEW, DES_RADIUS, PIC, XE, YN, ZT, etc. Do these parameters need to be broadcast to all processes? The FUNIJK function is called in the subroutine. Does this function need to be broadcast?
In the custom subroutine, the read external data is processed. Each process subroutine processes different data. Do I need to slice the data and broadcast it to all processes? Or do we just broadcast the entire data and then divide the data in each process according to the process ID? like this:
if (my_id == PE_IO) then
call BCAST(data)
end if
call usr_calc(data((my_id*rays_n/num_procs)+1 : (my_id+1)*rays_n/num_procs))