Skip to content

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

@rudyg3

Description

@rudyg3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions