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

vlsvextract is broken for master version of vlsv files #175

Closed
galfthan opened this issue Jun 26, 2015 · 8 comments
Closed

vlsvextract is broken for master version of vlsv files #175

galfthan opened this issue Jun 26, 2015 · 8 comments
Assignees
Labels

Comments

@galfthan
Copy link
Member

It only writes out empty vlsv files for distribution functions. This is most likely related to fmihpc/analysator#22

We have to also support files without the new style of velocity mesh metadata for as long as science is being done with this generation of files, so at least a year or so.

@galfthan
Copy link
Member Author

This should also be fixed ykempf@126767a#commitcomment-11881298

@sandroos
Copy link
Contributor

I checked master/iowrite.cpp and it should write files that are compatible with master/vlsvextract. If this is not the case then I've forgotten something.

@sandroos
Copy link
Contributor

I need more info to reproduce this.

If I run, say, testpackage/trans_test on my laptop, I can extract the velocity mesh for population 'avgs' just fine. vlsvdiff works too.

sandroos@sandroos12k:~/codes/vlasiator-master/testpackage/tests/transtest_2_maxw_500k_100k_20kms_20x20$ ../../../vlsvdiff_DP fullf.0000000.vlsv fullf.0000001.vlsv avgs 0
INFO Reading in two files.
File names: fullf.0000000.vlsv & fullf.0000001.vlsv
NonIdenticalBlocks:      0
IdenticalBlocks:         423200
Absolute_Error:          1.21946e-07
Mean-Absolute-Error:     1.361e-14
Max-Absolute-Error:      1.38903e-12
Absolute-log-Error:      9493.89
Mean-Absolute-log-Error: 0.00105959

My hunch is that you've tried to use new tools with old vlsv files that did not have correct footer stuff in place, but I can't be sure. So could someone please grab a vlsv file that does not work with the tools in master and copy-paste the footer here (I don't need the VARIABLE or PARAMETER arrays)?

@galfthan
Copy link
Member Author

That is the point, it should support also old files without the new metadata.

@sandroos
Copy link
Contributor

Well, that is going to branch the tools into "new version" and "old version" style again. You can always compile an older version of the tools and use those. I'll check if it is possible to fall back to the old style velocity mesh, if the new style fails.

Now to think of it, it would be a good idea to move the tools to their own repository. Logically they are quite independent from the other code, practically definitions.h is the only included header. That way you could always revert back to older tools without accidentally compiling old Vlasiator too.

@galfthan
Copy link
Member Author

It will, but the tools have to be able to support the range of files which are relevant. We also add more features, so the alternative would be to keep a number of separate branches for the tools up to date. It would also be unconvenient telling non-technical users that here are N versions of vlsvextract. Either try them all to see which works, or search for this or that feature in the xml footer.

In this case I guess it is not so difficult. If it does not find any populations, it tries to read using the old format.

What happened to the version tag? Again it would be convenient. We could have incremented it to 3 from 2, and then vlsvextract could from that check how to read the file.

I was planning on moving them to the analysator repo to ave one repo for all vlasiator analysis tools. This was also discussed at the strategy meeting. This would also make them open source, which is good.

@sandroos
Copy link
Contributor

Please try this:
https://github.com/sandroos/vlasiator/tree/tools-update

At least I got older testpackage/trans_test files extracted, I haven't touched vlsvdiff yet though.

@galfthan
Copy link
Member Author

galfthan commented Feb 3, 2016

This is fixed

@galfthan galfthan closed this as completed Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants