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

Make the package installable #11

Open
2 of 4 tasks
mortele opened this issue Mar 18, 2021 · 4 comments
Open
2 of 4 tasks

Make the package installable #11

mortele opened this issue Mar 18, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@mortele
Copy link
Member

mortele commented Mar 18, 2021

  • Add a pyproject.toml file in the base directory with [build-system] specifications to avoid a bug currently in pmesh, mp-sort, and pfft-python which causes pip install to fail unless Cython, numpy, and mpi4py is installed before pip install is called. C.f. PEP 518.
  • Write setup.py
    • Handle compilation of the fortran files as distutils.extensions. If this turns out to be too much of a hassle, we might have to rewrite the bond calculations in C and use Cythonize.Build
    • Fix an automatic versioning scheme derived from the commit hash. I really cba manually handling minor version numbers.
@mortele mortele added the enhancement New feature or request label Mar 18, 2021
@mortele mortele self-assigned this Mar 22, 2021
@mortele
Copy link
Member Author

mortele commented Dec 22, 2021

Done (except for the last parts, which we postpone for now) in e411b90

@mortele mortele closed this as completed Dec 22, 2021
@mortele mortele reopened this Mar 11, 2022
@mortele
Copy link
Member Author

mortele commented Mar 11, 2022

We need to reopen work on point 2.1, the memory layout changes necessary between bonded and non-bonded force calculations, because of the Fortran implementation, is not stable enough over long simulations. We should stop postponing this and transition finally to a Cython or pure C implementation.

@mortele
Copy link
Member Author

mortele commented Mar 11, 2022

After this is finished we can remove all of the following:

bonds_4_coeff = np.asfortranarray(bonds_4_coeff)

HyMD/hymd/main.py

Lines 338 to 344 in ec41612

positions = np.asfortranarray(positions)
velocities = np.asfortranarray(velocities)
bond_forces = np.asfortranarray(bond_forces)
angle_forces = np.asfortranarray(angle_forces)
dihedral_forces = np.asfortranarray(dihedral_forces)
dipole_positions = np.asfortranarray(dipole_positions)
transfer_matrices = np.asfortranarray(transfer_matrices)

dipole_positions = np.asfortranarray(dipole_positions)

HyMD/hymd/main.py

Lines 650 to 653 in ec41612

positions = np.asfortranarray(positions)
bond_forces = np.asfortranarray(bond_forces)
angle_forces = np.asfortranarray(angle_forces)
dihedral_forces = np.asfortranarray(dihedral_forces)

bonds_4_coeff = np.asfortranarray(bonds_4_coeff)

HyMD/hymd/main.py

Lines 703 to 704 in ec41612

dipole_positions = np.asfortranarray(dipole_positions)
transfer_matrices = np.asfortranarray(transfer_matrices) # noqa: E501

HyMD/hymd/main.py

Lines 627 to 630 in ec41612

positions = np.ascontiguousarray(positions)
bond_forces = np.ascontiguousarray(bond_forces)
angle_forces = np.ascontiguousarray(angle_forces)
dihedral_forces = np.ascontiguousarray(dihedral_forces)

@Lun4m
Copy link
Member

Lun4m commented Jul 28, 2022

We need to reopen work on point 2.1, the memory layout changes necessary between bonded and non-bonded force calculations, because of the Fortran implementation, is not stable enough over long simulations. We should stop postponing this and transition finally to a Cython or pure C implementation.

Are we sure this is due to the Fortran implementation and not to the recently discovered OpenMPI memory leak issues (#186)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants