Output the solution to .h5 file (hdf5)

59 views
Skip to first unread message

Judy Lee

unread,
Sep 7, 2022, 1:22:41 PM9/7/22
to deal.II User Group
Hello everyone!

For the step-3 hdf5 to output the solution data, I have an error message returned, like the following:

[ 66%] Built target step-3

[100%] Run step-3 with Debug configuration

Number of active cells: 1024

Number of degrees of freedom: 1089

DEAL:cg::Starting value 0.121094

DEAL:cg::Convergence step 48 value 5.33692e-13

terminate called after throwing an instance of 'dealii::StandardExceptions::ExcMessage'

what():

--------------------------------------------------------

An error occurred in line <7799> of file </home/debianlinux4dealii/Downloads/dealii-9.3.2/source/base/data_out_base.cc> in function

void dealii::DataOutBase::write_hdf5_parallel(const std::vector<dealii::DataOutBase::Patch<dim, spacedim> >&, const dealii::DataOutBase::DataOutFilter&, bool, const string&, const string&, const MPI_Comm&) [with int dim = 2; int spacedim = 2; std::string = std::__cxx11::basic_string<char>; MPI_Comm = int]

The violated condition was:

false

Additional information:

HDF5 support is disabled.

--------------------------------------------------------

make[3]: *** [CMakeFiles/run.dir/build.make:77: CMakeFiles/run] Aborted

make[2]: *** [CMakeFiles/Makefile2:237: CMakeFiles/run.dir/all] Error 2

make[1]: *** [CMakeFiles/Makefile2:244: CMakeFiles/run.dir/rule] Error 2

make: *** [Makefile:202: run] Error 2


My modified step-3.cc is attached. I added in the main function (Line 685-687), in the class step3 to declare *n_refinement_steps* (Line 100), in the function void step3::make_grid() (Line 164-165), and in the function void step3::output_results() (Line 606-610). Thank you very much.

Best regards,

Judy

step-3.cc

Timo Heister

unread,
Sep 7, 2022, 1:40:39 PM9/7/22
to dea...@googlegroups.com
You will need to configure deal.II with HDF5 support, see
https://www.dealii.org/developer/readme.html#optional-software
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/595032ef-037b-43fc-a2fa-ab18c8ffb64cn%40googlegroups.com.



--
Timo Heister
http://www.math.clemson.edu/~heister/
Message has been deleted

Timo Heister

unread,
Sep 10, 2022, 10:30:23 AM9/10/22
to dea...@googlegroups.com
What does the detailed.log say about HDF5? Did you recompile and
install the library afterwards?

I am asking because the error message should only show up if you are
using deal.II without HDF5 support enabled.

On Wed, Sep 7, 2022 at 9:36 PM Judy Lee <reader....@gmail.com> wrote:
>
> Thank you, Dr. Heister.
>
> This is what I did to link hdf5 library to dealii-9.3.2 version:
>
> find usr -iname “*hdf5.h” returned /usr/include/hdf5/mpich/hdf5.h
>
> export CPATH="/usr/include/hdf5/mpich/"
>
> export CPATH="/Downloads/dealii-9.3.2/"
>
> cmake -DDEAL_II_WITH_HDF5=ON -DHDF5_DIR=/usr/include/hdf5/mpich -DHDF5_LIBRARY=/usr/lib/x86_64-linux-gnu/libhdf5_mpich.so -DHDF5_HL_LIBRARY=/usr/lib/x86_64-linux-gnu/libhdf5_mpich_hl.so -DDEAL_II_WITH_MPI=ON ../
>
> I have the same error message returned. How to link hdf5 to dealii correctly?
>
> Thank you very much.
>
> Best regards,
>
> Judy
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/15485ca7-039c-4221-b91b-9620b59a2579n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages