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

Fix issues that occured when running ppafm-generate-elff with tip's density #316

Merged
merged 10 commits into from
Dec 10, 2024

Conversation

yakutovicha
Copy link
Collaborator

@yakutovicha yakutovicha commented Nov 5, 2024

fixes #312

blocked by this.

@yakutovicha yakutovicha marked this pull request as ready for review December 10, 2024 08:49
@NikoOinonen
Copy link
Collaborator

I think I see where the segfault is coming from. The first two commands use the --energy option which sets the pointer for the energy array on the C++ side. The third command (dftd3) does not have the option, but the pointer still remains even though it might not be valid anymore. A stopgap fix is to simply add the --energy option also to the dftd3 command.

@NikoOinonen
Copy link
Collaborator

For the -E argument issue, change this line :

arg_dict = self.cli_args[name]

into this:

import copy
arg_dict = copy.deepcopy(self.cli_args[name])

@yakutovicha
Copy link
Collaborator Author

I think I see where the segfault is coming from. The first two commands use the --energy option which sets the pointer for the energy array on the C++ side. The third command (dftd3) does not have the option, but the pointer still remains even though it might not be valid anymore. A stopgap fix is to simply add the --energy option also to the dftd3 command.

It's working! 👍

@yakutovicha yakutovicha merged commit 2d8c126 into main Dec 10, 2024
13 checks passed
@yakutovicha yakutovicha deleted the fix/fdbm-issues-312 branch December 10, 2024 14:05
@NikoOinonen NikoOinonen mentioned this pull request Dec 10, 2024
NikoOinonen added a commit that referenced this pull request Dec 13, 2024
…#322)

The force field arrays were left as dangling pointers when running multiple computational steps in a row, which manifested in #316. This fixes the issue by setting some cleanup code to run on garbage collection. It's not very pretty since you also have to manually run the garbage collector to make sure that the pointers are deleted in time, but it works.
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

Successfully merging this pull request may close these issues.

FDBM (Full-density based method) broken by recent changes
3 participants