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

--double-precision is not applied correctly #102

Open
mortele opened this issue May 14, 2021 · 1 comment
Open

--double-precision is not applied correctly #102

mortele opened this issue May 14, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mortele
Copy link
Member

mortele commented May 14, 2021

Single precision is hard-coded in the initialization of the pmesh object pm,

        pm = pmesh.ParticleMesh(
            config.mesh_size, BoxSize=config.box_size, dtype="f4", comm=comm
        )

and so passing --double-precision to main.py only changes the data type of the positions, velocities, and forces—not the data type used in the FFTs.

@mortele mortele added the bug Something isn't working label May 14, 2021
@mortele
Copy link
Member Author

mortele commented Dec 21, 2021

Fixed in fc03aee i think

HyMD/hymd/main.py

Lines 137 to 140 in fc03aee

pm = pmesh.ParticleMesh(
config.mesh_size, BoxSize=config.box_size,
dtype="f4" if dtype == np.float32 else np.float64, comm=comm
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant