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

[Bugfix] Fix particle data file names in the Boxlib frontend #1653

Merged
merged 5 commits into from
Dec 19, 2017

Conversation

atmyers
Copy link
Member

@atmyers atmyers commented Dec 18, 2017

Due to a change in AMReX, these file names can have either 4 or 5 digits now.

@ngoldbaum
Copy link
Member

I was debugging something on the build host and that caused one of the tests to fail. Will try triggering a clean build, apologies for the noise.

@ngoldbaum
Copy link
Member

@yt-fido test this please

@@ -571,7 +571,13 @@ def _read_particles(self, directory_name, is_checkpoint, extra_field_names=None)
self.ds._particle_type_counts = {}
self.ds._particle_type_counts[directory_name] = num_parts

base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.4d"
base = self.ds.output_dir + '/' + directory_name
if (len(glob.glob(base + "/Level_?/DATA_????")) > 0):
Copy link
Member

@cphyc cphyc Dec 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's maybe wiser to use os.path.join(base, 'Level_?', 'DATA_????') instead, as it would support other platforms thant *nix.

@@ -571,7 +571,13 @@ def _read_particles(self, directory_name, is_checkpoint, extra_field_names=None)
self.ds._particle_type_counts = {}
self.ds._particle_type_counts[directory_name] = num_parts

base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.4d"
base = self.ds.output_dir + '/' + directory_name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should also use os.path.join

@ngoldbaum ngoldbaum merged commit b836916 into yt-project:master Dec 19, 2017
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.

3 participants