Generating particle_input files for MPI

Hey all,

Are there any help resources for generating MPI-compatible particle input files?

I have a particle initialization file that works in serial (see attached) but I’m struggling to parallelize it. The source code seems to indicate that I need separate input files for each processor, numbered by processor ID [from WRITE(lFILENAME,’(“particle_input_”,I4.4,".dat")’) myPE]. I’m not sure how to determine which processor ID is associated with each region of the domain, and I imagine this order will change somewhat each run, depending on how the scheduler allocates nodes and processors to the simulation.

image

Is it not possible to initialize all particles on the root process and then broadcast particles to their respective processors?

Let me know if you have any advice or thoughts.

particle_input.zip (48.4 KB)

If you do not use distributed IO, the particle_input.dat file you use in serial should work in parallel (mpi). The root proces will read all particles and scatter them among all other processes.

1 Like

You’re absolutely right. I was thrown off because the LOG file only lists the DES array size corresponding to a single processor. I didn’t think of checking the VTK files first. Thank you for pointing this out!