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

boxlib frontend does not work for pure hydro runs #1948

Closed
wolfram-schmidt opened this issue Aug 8, 2018 · 1 comment
Closed

boxlib frontend does not work for pure hydro runs #1948

wolfram-schmidt opened this issue Aug 8, 2018 · 1 comment

Comments

@wolfram-schmidt
Copy link

Bug report

I spotted a problem with the boxlib/amrex frontend in the case of pure hydro runs. The problem is that the frontend by default expects particles. A while ago Mike Zingale fixed by putting if ("particles" in self.ds.parameters) before the read particle call, see https://bitbucket.org/yt_analysis/yt/pull-requests/2571/add-support-for-nyx-datasets-without/diff. Now, after compiling yt from the development branch and doing a test run with the latest Nyx/AMRex, it appears that this does not work any longer, as the error trace reports:

Code for reproduction

import yt
PATH = "/gfs1/work/hzfbhsws/DrivenTurbulence/test-omp4/"
ds = yt.load(PATH + "plt00461")
ds.field_list

Can provide data set or Nyx parameter files if required.

Actual outcome

--------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-7-3fabb4ffc7bc> in <module>()
----> 1 ds.field_list

/home/b/hzfbhsws/yt-src/yt/data_objects/static_output.py in field_list(self)
    546     @property
    547     def field_list(self):
--> 548         return self.index.field_list
    549 
    550     def create_field_info(self):

/home/b/hzfbhsws/yt-src/yt/data_objects/static_output.py in index(self)
    504                 raise RuntimeError("You should not instantiate Dataset.")
    505             self._instantiated_index = self._index_class(
--> 506                 self, dataset_type=self.dataset_type)
    507             # Now we do things that we need an instantiated index for
    508             # ...first off, we create our field_info now.

/home/b/hzfbhsws/yt-src/yt/frontends/boxlib/data_structures.py in __init__(self, ds, dataset_type)
   1228 
   1229             self._read_particles("DM", is_checkpoint, 
-> 1230                                  nyx_extra_real_fields[0:self.ds.dimensionality+1])
   1231 
   1232 

/home/b/hzfbhsws/yt-src/yt/frontends/boxlib/data_structures.py in _read_particles(self, directory_name, is_checkpoint, extra_field_names)
    563 
    564     def _read_particles(self, directory_name, is_checkpoint, extra_field_names=None):
--> 565         pheader = self._determine_particle_output_type(directory_name)
    566         self.particle_headers[directory_name] = pheader(self.ds,
    567                                                         directory_name,

/home/b/hzfbhsws/yt-src/yt/frontends/boxlib/data_structures.py in _determine_particle_output_type(self, directory_name)
    555     def _determine_particle_output_type(self, directory_name):
    556         header_filename =  self.ds.output_dir + "/" + directory_name + "/Header"
--> 557         with open(header_filename, "r") as f:
    558             version_string = f.readline().strip()
    559             if version_string.startswith("Version_Two"):

FileNotFoundError: [Errno 2] No such file or directory: '/gfs1/work/hzfbhsws/DrivenTurbulence/test-omp4/plt00461/DM/Header'

Expected outcome

[('boxlib', 'MachNumber'),
 ('boxlib', 'Ne'),
 ('boxlib', 'Temp'),
 ('boxlib', 'density'),
 ('boxlib', 'forcex'),
 ('boxlib', 'forcey'),
 ('boxlib', 'forcez'),
 ('boxlib', 'magvort'),
 ('boxlib', 'rho_E'),
 ('boxlib', 'rho_e'),
 ('boxlib', 'xmom'),
 ('boxlib', 'ymom'),
 ('boxlib', 'zmom')]

Version Information

  • Operating System: SuSE Linux Enterprise Server (SLES) version 11
  • Python Version: 3.6
  • yt version: master branch, commit f3ee5f3
  • Other Libraries (if applicable):

Built from source using a conda environment.

ngoldbaum pushed a commit that referenced this issue Aug 9, 2018
@ngoldbaum
Copy link
Member

This was fixed by #1950

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

2 participants