Fortran HDF5 output writing #2870
Unanswered
LordOfBunnies
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I assume you are calling from Fortran a C++ wrapper function with extern C interface that calls amrex::WriteMultiLevelPlotfileHDF5 or amrex::WriteSingleLevelPlotfileHDF5. Maybe you can print out some information in the wrapper function. If you like, maybe you could show us that part of the code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently writing an entropic LBM flow solver using Amrex to do the AMR work. I was originally using CGNS to do the output, but weird malloc errors kept that from working once the AMR was switched on.
I'm currently trying to get Amrex to do HDF5 output as I haven't been able to get anything capable of doing normal Amrex post-processing to work on my workstation. I've been using Tecplot to do visualization from CGNS (when that was working), and Tecplot will handle HDF5 output. That being said, I modified the code a little to allow my Fortran code to use the Amrex's HDF5 output routines. Amrex is version 22.06, HDF5 is 1.12.2, OpenMPI is 4.0.1, GCC is 8.3.1 and I compiled everything with -std=c17 and -std=c++17 where relevant. HDF5 isn't using any compression (yet, maybe later).
As it stands, the code will output a .h5 file, but attempting to read it into Tecplot produces this error:
Dimension of selected SDS are not equivalent
/level_0/data:datatype=0 IMax =131072 JMax = 1 Kmax = 1 rank = 1
Edit: A little reading says that how Amrex does its HDF5 output. I managed to find an old version of Paraview (3.98) which will read the output, but not the time information making actually post-processing anything ridiculously difficult.
I did check and made sure that Amrex had AMREX_SPACEDIM = 3 for this case. 131072 is also the total number of cells involved on lvl 0 (128x32x32), but it seems to not be writing the correct dimension to the file since rank = 1. The file size is also not increasing when a second iteration calls it as well. Even with a single iteration of output, it fails the same way.
Sadly, the code is WAY too large to reproduce a minimal working example.
Do you foresee any reason HDF5 wouldn't be getting good data from Amrex? How best can I check that everything is working correctly within Amrex's HDF5 plotfile routines?
Beta Was this translation helpful? Give feedback.
All reactions