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

Won't run sims if spaces are in directory names in path #16

Open
rudyg3 opened this issue Sep 21, 2023 · 0 comments
Open

Won't run sims if spaces are in directory names in path #16

rudyg3 opened this issue Sep 21, 2023 · 0 comments

Comments

@rudyg3
Copy link
Contributor

rudyg3 commented Sep 21, 2023

Multiplanet will not run simulations in a vspace directory if in the path to that directory there is a folder/directory whose name has spaces in it. This is because in multiplanet.py:216 to 229 multiplanet uses .strip().split() on the checkpoint file lines to read the path to each individual simulation directory and the status of that simulation, e.g.,
/users/rodolfog/vpl_research/paramsweep/test_rand_3 0
becomes the list
['/users/rodolfog/vpl_research/paramsweep/test_rand_3', '0']

However, if there is a space in the name of a directory in that path, then the .strip().split() will break up the path into multiple distinct elements in a list and the status of the simulation will not be checked successfully since the status is assumed to be the second element of the resulting list. e.g.,
/users/rodolfog/vpl research/paramsweep/test_rand_3 0
becomes the list
['/users/rodolfog/vpl' 'research/paramsweep/test_rand_3', '0'].

Possible fixes include reading the checkpoint files differently (not using .strip().split()) or using .strip().split() with a delimiter that is not used in filenames and writing the checkpoint file separated with that delimiter. Can also raise a warning to the user that they need to fix the name of their directory to not have spaces, since currently multiplanet will execute without error, it just doesn't actually run the simulations.

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

No branches or pull requests

1 participant