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

[BUG] internal variable type: deleting a variable causes side effects on other variables #1346

Closed
donatas-surblys opened this issue Feb 23, 2019 · 1 comment · Fixed by #1347
Labels

Comments

@donatas-surblys
Copy link
Collaborator

Summary

When a variable of internal type is deleted, variables of internal type that were defined after it have their references shifted. This also happens when the variable is of loop type and is deleted via the next command.

LAMMPS Version and Platform

This has been confirmed with the latest master version.

Steps to Reproduce

Run the following script:

variable v1 internal 1
variable dummy  internal 101
variable v2 internal 2
variable v3 internal 3

print "${v1} ${v2} ${v3}"
variable dummy delete
print "${v1} ${v2} ${v3}"

Expected Behavior
The expected output is:

1 2 3
1 2 3

Actual Behavior
The actual output is:

1 2 3
1 101 2

@akohlmey
Copy link
Member

@donatas-surblys thanks for the report. a fix is underway and should be included in the next patch release.

akohlmey added a commit to akohlmey/lammps that referenced this issue Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants