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

DynVector dataset shapes sometimes change upon restart #41

Open
manauref opened this issue Feb 2, 2021 · 5 comments
Open

DynVector dataset shapes sometimes change upon restart #41

manauref opened this issue Feb 2, 2021 · 5 comments
Assignees

Comments

@manauref
Copy link
Collaborator

manauref commented Feb 2, 2021

The dataset inside a DynVector sometimes change shape after a restart. Noah tried to prepare postgkyl to handle this (postgkyl commit 89dbc7d5936bd31a4a26e0857bd5261f63cd996f), but it doesn't seem to always work.

This leads to errors like

pgkyl -f gk24-wham1x2v_esEnergy.bp pl
...
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 1 dimension(s)

and inspecting the file with bpls we find

bpls gk24-wham1x2v_esEnergy.bp
...
  double   TimeMesh713   {2292}
  double   Data713       {2292}
  double   TimeMesh714   {2292}
  double   Data714       {2292, 1}

Also, I've also seen the insertion of empty datasets like:

bpls gk24-wham1x2v_elc_intM0.bp
...
  double   TimeMesh1019  {0}
  double   Data1019      {0, 1}
  double   TimeMesh1020  {1}
  double   Data1020      {1, 1}
  double   TimeMesh1021  {1}
  double   Data1021      {1, 1}
  double   TimeMesh1022  {0}
  double   Data1022      {0, 1}

but I'm not sure if this is related.

@manauref manauref self-assigned this Feb 2, 2021
@nmandell
Copy link
Collaborator

nmandell commented Feb 2, 2021 via email

@manauref
Copy link
Collaborator Author

manauref commented Feb 20, 2021

It seems that the empty data sets can happen even at the beginning of a run, not just upon restart. For example

bpls gk30-wham1x2v_esEnergy.bp
  double   TimeMesh0    {1}
  double   Data0        {1, 1}
  double   TimeMesh1    {0}
  double   Data1        {0, 1}

and more recently I've seen the appearance of scalars:

  double   TimeMesh224  {1}
  double   Data224      {1, 1}
  double   TimeMesh225  {0}
  double   Data225      {0}
  double   TimeMesh226  {0}
  double   Data226      {0}
  double   TimeMesh227  scalar
  double   Data227      scalar

This, by way, makes the whole file useless from a pgkyl point of view. It'd require writing a script to read the data.

@manauref
Copy link
Collaborator Author

Commit 12acfbd seems to fix the insertion of empty datasets in DynVectors. We were trying out output data more frequently than it was being calculated. So the solution is to use a max of calcIntQuantEvery and nFrame, so that we compute integrated quantities as frequently as we output data.

@Zhuo-Liu
Copy link

I also encountered this issue on Cori with gkyl I pulled on 03/11/2021. This issue seems to happen after a restart.

screen_shot_2021-04-30_at_12 52 16_pm

@manauref
Copy link
Collaborator Author

manauref commented Aug 6, 2021

I found a way to reproduce this problem of the appearance of the scalars, looping over a file with a bash script that performs many restarts. At around the 30th restart the scalar appears.

scalarProblem.zip

I have also determined the following, although I don't see how any of these could happen:

  1. If the dynVector is flushed/cleared, and we call :write before any new data is added to it, the empty datasets occur (e.g. {0} and {0, 1}).
  2. I think if self._data:size() returns nil in 342-343 of DynVector.lua, I believe an empty string is returned and the result is a scalar.

manauref added a commit that referenced this issue Aug 6, 2021
… an Adios variable in DynVector:write. This shouldn't be necessary according to the ADIOS documentation, but I tried it and it seems to get rid of the scalar entries mentioned in issue #41 #41 (comment).
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

3 participants