Hi,
I have simulation data from various Simfactory checkpoints written out by CarpetIOHDF5. I'd like to collect these data (for one variable, say) into a single file. I was wondering if the tools hdf5_merge and/or hdf5_recombine tools are meant for that. Or are there other ways to in Cactus to do this?
Thank you, Dumsani
Hello Dumsani,
there are two different things you may want to do. If you have files rho.file_0.h5 eps.file_0.h5 rho.file_1.h5 and eps.file_1.h5 and would like to combine the variables you can use:
hdf5_merge rho.file_0.h5 eps.file_0.h5 vars.file_0.h5 hdf5_merge rho.file_1.h5 eps.file_1.h5 vars.file_1.h5
ie when you want to keep the file_X structure intact. If not then you must use the hdf5 slicer:
hdf5_slicer --out3d-cube rho.file_*.h5 eps.file_*.h5 vars.h5
Yours, Roland
Hi,
I have simulation data from various Simfactory checkpoints written out by CarpetIOHDF5. I'd like to collect these data (for one variable, say) into a single file. I was wondering if the tools hdf5_merge and/or hdf5_recombine tools are meant for that. Or are there other ways to in Cactus to do this?
Thank you, Dumsani _______________________________________________ Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
On 30 Sep 2016, at 16:29, Roland Haas rhaas@illinois.edu wrote:
Hello Dumsani,
there are two different things you may want to do. If you have files rho.file_0.h5 eps.file_0.h5 rho.file_1.h5 and eps.file_1.h5 and would like to combine the variables you can use:
hdf5_merge rho.file_0.h5 eps.file_0.h5 vars.file_0.h5 hdf5_merge rho.file_1.h5 eps.file_1.h5 vars.file_1.h5
ie when you want to keep the file_X structure intact. If not then you must use the hdf5 slicer:
hdf5_slicer --out3d-cube rho.file_*.h5 eps.file_*.h5 vars.h5
Also note that (as far as I know) this simply copies the datasets from one file to the other. It does not coalesce the individual rectangular components into a single one, suitable for viewing with a generic visualisation tool. This would not in general be possible for a mesh-refined grid.
-- Ian Hinder http://members.aei.mpg.de/ianhin
Hi Roland, Ian, Everyone,
Thanks for your input. May I add a few points though to elaborate on my question. Let's assume we run a simulation with 2 MPI processes (ranks) with each process writing to it's HDF5 own file. Further assume we have output from 2 restarts on top of the first output, i.e. we have Simfactory output directories output-0000, output-0001 and output-0002. So, for a variable rho, for instance, we would then have output-0000/<parfile>/rho.file_0.h5 output-0000/<parfile>/rho.file_1.h5
output-0001/<parfile>/rho.file_0.h5 output-0001/<parfile>/rho.file_1.h5
output-0002/<parfile>/rho.file_0.h5 output-0002/<parfile>/rho.file_1.h5
Now, for purposes of visualizing the data, for instance, one would be interested in collecting all these data chunks into a single file. The question is how to bundle these into a single file. I wanted to know if any of the available Carpet tools can help with this.
I stand to be corrected, but I seem to recall that some of the non-ET tools (e.g. SimulationTools) seem to have an abstraction mechanism for transparently combining CarpetIOHDF5 output from various checkpoints. Is that the direction I may have to go?
Thank you, Dumsani
On 30/09/2016 17:56, Ian Hinder wrote:
On 30 Sep 2016, at 16:29, Roland Haas <rhaas@illinois.edu mailto:rhaas@illinois.edu> wrote:
Hello Dumsani,
there are two different things you may want to do. If you have files rho.file_0.h5 eps.file_0.h5 rho.file_1.h5 and eps.file_1.h5 and would like to combine the variables you can use:
hdf5_merge rho.file_0.h5 eps.file_0.h5 vars.file_0.h5 hdf5_merge rho.file_1.h5 eps.file_1.h5 vars.file_1.h5
ie when you want to keep the file_X structure intact. If not then you must use the hdf5 slicer:
hdf5_slicer --out3d-cube rho.file_*.h5 eps.file_*.h5 vars.h5
Also note that (as far as I know) this simply copies the datasets from one file to the other. It does not coalesce the individual rectangular components into a single one, suitable for viewing with a generic visualisation tool. This would not in general be possible for a mesh-refined grid.
-- Ian Hinder http://members.aei.mpg.de/ianhin
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
On 30 Sep 2016, at 22:35, dumsani g14n8326@campus.ru.ac.za wrote:
Hi Roland, Ian, Everyone,
Thanks for your input. May I add a few points though to elaborate on my question. Let's assume we run a simulation with 2 MPI processes (ranks) with each process writing to it's HDF5 own file. Further assume we have output from 2 restarts on top of the first output, i.e. we have Simfactory output directories output-0000, output-0001 and output-0002. So, for a variable rho, for instance, we would then have output-0000/<parfile>/rho.file_0.h5 output-0000/<parfile>/rho.file_1.h5
output-0001/<parfile>/rho.file_0.h5 output-0001/<parfile>/rho.file_1.h5
output-0002/<parfile>/rho.file_0.h5 output-0002/<parfile>/rho.file_1.h5
Now, for purposes of visualizing the data, for instance, one would be interested in collecting all these data chunks into a single file. The question is how to bundle these into a single file. I wanted to know if any of the available Carpet tools can help with this.
I stand to be corrected, but I seem to recall that some of the non-ET tools (e.g. SimulationTools) seem to have an abstraction mechanism for transparently combining CarpetIOHDF5 output from various checkpoints. Is that the direction I may have to go?
Which tool do you want to use? VisIt automatically combines the different components (i.e rectangular regions) from a single run when it loads them. As far as I know, it doesn't understand that you may have the run split into multiple restarts, so I don't know what people do in that case.
If you want to write your own tool, I think it would be best to load the original raw data in the format that it is written, rather than requiring an additional postprocessing step. In general, the data might be very large, and you may not have the space or time to hold two copies (original and post-processed). There are workarounds; e.g. you can create a single HDF5 file containing HDF5 symbolic links to the other files. I think Roland has done this in the past.
Erik has been talking about a new file format and library for writing and reading simulation data, which presumably would also hide these details, but I don't think it's ready for production use yet.
Yes, SimulationTools knows about both splits, and the user doesn't have to worry about it.
Hi Ian,
I typically use VisIt for this kind of output. From your explanation and Roland's, my question has been answered. I will look into some of the workarounds and tools you pointed out.
Regards, Dumsani
On 01/10/2016 12:03, Ian Hinder wrote:
On 30 Sep 2016, at 22:35, dumsani <g14n8326@campus.ru.ac.za mailto:g14n8326@campus.ru.ac.za> wrote:
Hi Roland, Ian, Everyone,
Thanks for your input. May I add a few points though to elaborate on my question. Let's assume we run a simulation with 2 MPI processes (ranks) with each process writing to it's HDF5 own file. Further assume we have output from 2 restarts on top of the first output, i.e. we have Simfactory output directories output-0000, output-0001 and output-0002. So, for a variable rho, for instance, we would then have output-0000/<parfile>/rho.file_0.h5 output-0000/<parfile>/rho.file_1.h5
output-0001/<parfile>/rho.file_0.h5 output-0001/<parfile>/rho.file_1.h5
output-0002/<parfile>/rho.file_0.h5 output-0002/<parfile>/rho.file_1.h5
Now, for purposes of visualizing the data, for instance, one would be interested in collecting all these data chunks into a single file. The question is how to bundle these into a single file. I wanted to know if any of the available Carpet tools can help with this.
I stand to be corrected, but I seem to recall that some of the non-ET tools (e.g. SimulationTools) seem to have an abstraction mechanism for transparently combining CarpetIOHDF5 output from various checkpoints. Is that the direction I may have to go?
Which tool do you want to use? VisIt automatically combines the different components (i.e rectangular regions) from a single run when it loads them. As far as I know, it doesn't understand that you may have the run split into multiple restarts, so I don't know what people do in that case.
If you want to write your own tool, I think it would be best to load the original raw data in the format that it is written, rather than requiring an additional postprocessing step. In general, the data might be very large, and you may not have the space or time to hold two copies (original and post-processed). There are workarounds; e.g. you can create a single HDF5 file containing HDF5 symbolic links to the other files. I think Roland has done this in the past.
Erik has been talking about a new file format and library for writing and reading simulation data, which presumably would also hide these details, but I don't think it's ready for production use yet.
Yes, SimulationTools knows about both splits, and the user doesn't have to worry about it.
-- Ian Hinder http://members.aei.mpg.de/ianhin
users@lists.einsteintoolkit.org