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

Brutus does not use given wordlength when initializing #1120

Open
koenlooijmans opened this issue Feb 18, 2025 · 0 comments
Open

Brutus does not use given wordlength when initializing #1120

koenlooijmans opened this issue Feb 18, 2025 · 0 comments
Labels

Comments

@koenlooijmans
Copy link

Describe the bug
When using the AMUSE-version of Brutus, it does not fully utilize the given wordlength when initializing, leading to higher-than-expected error margins down the line.

To Reproduce
Run a Brutus simulation with a sufficiently high wordlength (more than 64) and BS_tolerance (approx. more precise than 1e-23, although this might vary with simulation parameters and initial conditions), and note that higher BS_tolerance and wordlength with identical init. conditions do not give the expected increased precision.

Here is my specific code I used, with logeps between -20 and -30.

brutus = Brutus(redirection="none")
brutus.parameters.bs_tolerance = np.pow(10., logeps)
brutus.parameters.word_length = -4 * logeps + 32
brutus.particles.add_particles(ast)
brutus.particles.add_particles(cluster)

Expected behavior
We'd expect the precision to increase with BS_tolerance (and the appropriate wordlength), but this does not happen with sufficiently precise simulations.

Temporary fix
Increasing the default wordlength (int numBits in interface.cc) to a higher value relieves the problem.

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

No branches or pull requests

1 participant