Repurpose Boxlib plugin code for Nyx/AMReX ML Workflow #12585
-
We're trying to combine @prashplus writes...
Apologies but...Are you trying to repurpose VisIt's boxlib plugin to read boxlib data in your ML workflow?
If you want to write your own plugin, a big first question is whether you need it to operate in parallel or not? Developing a scalable parallel plugin is more involved than something that either doesn't scale well or is not intended to work in parallel at all. A second question is whether the input data is always a monolithic single block or is decomposed into multiple blocks (domains, chunks, pieces) and/or in possibly separate files. You can start from scratch or by copying an existing simple plugin and modifying it. I would recommend the latter. A basic database plugin needs to implement just a few methods...
The methods with ⏸️ are parallel and called independently, with different args on different MPI ranks. The others are called collectively in parallel with identical args on all ranks. Typically, one first tries to get If you are working with AMReX, my impression is that the old BoxLib-like format it outputs for plotting has potentially been made obsolete by a newer HDF5-based file format that AMReX produces. If that is so, I would really recommend starting from that format rather than continuing with the BoxLib format. If you do go the route of AMReX/HDF5 files, then you probably want to have a look at various HDF5 plugins we have in VisIt to see if any are close to your needs (those in bold may be particularly useful in your quest) ALS AMR BATL Blueprint CaleHDF5 |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
One option may be to use VisIt to read the boxlib data and export it to a simpler format that can be digested by an ML pipeline. |
Beta Was this translation helpful? Give feedback.
-
Yes, I need it to operate in parallel, since I am going to run it in on a HPC system. I think the input data is actually divided into multiple plt files. Ok sure. I will start with an existing simple plugin and modifying it. You are right, HDF5 seems an easy way to go for my quest. Sure,I will also try HDF5 plugins from Visit you suggested. I will keep you posted as I go ahead. |
Beta Was this translation helpful? Give feedback.
-
@prashplus as a preliminary part of your work, please consider what @cyrush suggested...you can use VisIt maybe as an intermediary to read BoxLib data and then write out a format that puts the data in a form you can more easily digest in your ML workflow. Some possible output (export database operation) formats are... BOV Curve2D Plus various image fomats (save as operation) if those are appropriate (jpg, bmp, png, tiff, ppm) |
Beta Was this translation helpful? Give feedback.
-
Ya sure, I will consider that. |
Beta Was this translation helpful? Give feedback.
-
BTW...as part of these hadoop and spark projects, years ago we wrote a python-query based exporter and we have a reader that reads from the resulting ascii files. It hasn't been exercised in a while but may be useful. |
Beta Was this translation helpful? Give feedback.
-
Oh this is interesting. Thanks |
Beta Was this translation helpful? Give feedback.
-
The blueprint plugin will also allow you to create hdf5 files that you could consume in python using h5py. |
Beta Was this translation helpful? Give feedback.
-
And, I forgot about these slides |
Beta Was this translation helpful? Give feedback.
One option may be to use VisIt to read the boxlib data and export it to a simpler format that can be digested by an ML pipeline.