Manually set up processors distribution

Dear all,

I plan to use LAMMPS as external library, called from in-house program (named PP). I encounter a problem that I have the domain decomposition information in PP, I need to let LAMMPS know this decomposition information. Is it possible to manually set up the processors distribution in LAMMPS? (note: the decomposition is not uniform in 3D space)

Thanks,
Lynn

Department of mechanical engineering
University of Connecticut

Dear all,

I plan to use LAMMPS as external library, called from in-house program (named PP). I encounter a problem that I have the domain decomposition information in PP, I need to let LAMMPS know this decomposition information. Is it possible to manually set up the processors distribution in LAMMPS? (note: the decomposition is not uniform in 3D space)

not as such. you can assign the processor grid with the processors command, but that does not allow you to exactly set the subdomain boundaries, especially when you have a non-uniform distribution. also, you have to keep in mind, that LAMMPS does a “lazy” update of the assignment of particles to subdomains, which is only enforced on timesteps, where a re-neighboring happens.

so to match your code, you would have to make modifications to LAMMPS and the library interface so that you would set up the subdomains exactly like you have in your in-house code. not impossible, but non-trivial and requiring a good understanding of LAMMPS’ internals.

axel.

Hi Axel,

Many thanks for the suggestion. If I modified the LAMMPS processors attribution file like comm.cpp, should this affect the other processes such as neighbor-list update?

Best,
Lynn

Hi Axel,

Many thanks for the suggestion. If I modified the LAMMPS processors attribution file like comm.cpp, should this affect the other processes such as neighbor-list update?

you don’t have to modify comm.cpp to assign a specific processor grid, but - as i already mentioned - that does not automatically give you the exact same subdomains and particle distributions. if you want to have a 1:1 mapping between LAMMPS and your in-house code, that is a requirement. and that is what is non-trivial.

forcing the processor grid can be done with lammps_command(ptr,“processors #x #y #z”).

axel.

Hi Axel,

So, do you think what style should I do to map the accurate processors attribution? Writing a new file or modifying existing one? What I can think of is comm.cpp…, Could you give
some suggestions?

Thanks,
Lynn

Hi Axel,

So, do you think what style should I do to map the accurate processors attribution? Writing a new file or modifying existing one? What I can think of is comm.cpp…, Could you give
some suggestions?

you are not paying attention to what i am saying. to have the same processor grid, you don’t need to change any code. but to have identical subdomain geometries, you first have to read and learn how LAMMPS works internally.

that cannot be explained via e-mail by just pointing out a few files to you. and after you have studied the source code well enough, you can answer the question yourself, anyway.

axel.

Hi Axel,

Many thanks. Anyway, I need to study the source code first.

Best,
Lynn