Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Idea] Next generation interface #102

Open
jan-janssen opened this issue May 19, 2023 · 1 comment
Open

[Idea] Next generation interface #102

jan-janssen opened this issue May 19, 2023 · 1 comment

Comments

@jan-janssen
Copy link
Member

There are three things we learned so far:

  • using zmq simplifies the communication between the primary process and the subprocess.
  • with __getattribute__() we can overwrite the functions of a given class.
  • with cloudpickle we can even pickle ctypes

So for the next version of pylammpsmpi I guess we need much less code. Just load the LAMMPS library class and then before a function is called, interfere using __getattribute__(), cloudpickle the data that is communicated transfer it to the MPI parallel subprocess and then execute the call there. Afterwards cloudpickle the response and communicate it back up. This should drastically decrease the code base for pylammpsmpi and increase the consistency with the official LAMMPS python API.

@jan-janssen
Copy link
Member Author

Certain functions are only called on MPI.COMM_WORLD.rank == 1 so the internal call might look different from the outside call on the serial executable.

@jan-janssen jan-janssen changed the title Next generation interface [Idea] Next generation interface Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant