Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove all python dependency #11

Closed
3 tasks
matthewcarbone opened this issue Sep 2, 2023 · 0 comments
Closed
3 tasks

Remove all python dependency #11

matthewcarbone opened this issue Sep 2, 2023 · 0 comments
Assignees

Comments

@matthewcarbone
Copy link
Owner

matthewcarbone commented Sep 2, 2023

Currently, 95% of the codebase is written in C++ and all of the "heavy lifting" is done by C++. The last step, however, is done in Python and requires a NumPy dependency. The code's entire Python dependency is found in the postprocess.py file in the root directory of the project.

It would be fantastic to convert this into C++ so that everything can be contained in a single compiled binary. This will include rewriting a bunch of simple NumPy functions in C++. There are also some subtleties, since for example, correct calculation of the ridge energy observables uses the np.ma.* modules (masked arrays) distinct from the standard np.*. These allow for masking (expected) nan values.

The other complication is that I want to keep external dependencies to nothing. The only libraries hdspin depends on externally are MPI. I really don't want the code to depend on any other external programs/libraries.

So, long story short:

  • Rewrite the postprocessing.py file in C++, integrating it into the hdspin source proper
  • Integrate the post processing operation into the main code so that it runs after the simulations are complete
  • [bonus] Make post processing MPI-enabled

Note: this is started here already: inc/array.h

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant