Some basic questions

Hello,

I just started learning about hdf5 today.

I wrote a very basic program to read a number in the HFD5 format and then
print it out. The program is doing as expected but is giving me a
segmentation fault at the end. Any idea why? I have attached the code.

I am using "h5fc" to compile the code.

I have another question. I want to store the output of an already existing
code in the hdf5 format. Right now the code is being compiled using
"gfortran". After I make the necessary changes in the files which output
the data in the main code, can I simply change the compiler to "h5fc" and
expect things to work or it is more complicated than that?

Thank you,
Pradeep

code_using_hdf5.f90 (1.25 KB)

Hello Pradeep,

I looked at the example. However, it is opening an existing dataset.
Does your dataset just contain one element?

I attached a program that creates a one element dataset (dset1.f90), and
then your code to read it back (code_using_hdf5-blj.f90) (but changed
data_dims=1).

See the attached examples. Is this what you want to do?

-Barbara

dset1.f90 (2.96 KB)

code_using_hdf5-blj.f90 (1.31 KB)

···

====================
Barbara Jones
The HDF Helpdesk

The HDF Group
help@hdfgroup.org

Hello,

I just started learning about hdf5 today.

I wrote a very basic program to read a number in the HFD5 format and then
print it out. The program is doing as expected but is giving me a
segmentation fault at the end. Any idea why? I have attached the code.

I am using "h5fc" to compile the code.

I have another question. I want to store the output of an already existing
code in the hdf5 format. Right now the code is being compiled using
"gfortran". After I make the necessary changes in the files which output
the data in the main code, can I simply change the compiler to "h5fc" and
expect things to work or it is more complicated than that?

Thank you,
Pradeep

--
Barbara L. Jones
bljones@hdfgroup.org

Hello Barbara,

sorry, I figured out my problem here. It was a stupid misunderstanding on
my part. I just started with HDF, so was not familiar with its
functionality at all.

Thanks for your response anyways,
Pradeep

···

2012/12/20 Barbara Jones <bljones@hdfgroup.org>

Hello Pradeep,

I looked at the example. However, it is opening an existing dataset.
Does your dataset just contain one element?

I attached a program that creates a one element dataset (dset1.f90), and
then your code to read it back (code_using_hdf5-blj.f90) (but changed
data_dims=1).

See the attached examples. Is this what you want to do?

-Barbara

====================
Barbara Jones
The HDF Helpdesk

The HDF Group
help@hdfgroup.org

Hello,

I just started learning about hdf5 today.

I wrote a very basic program to read a number in the HFD5 format and then
print it out. The program is doing as expected but is giving me a
segmentation fault at the end. Any idea why? I have attached the code.

I am using "h5fc" to compile the code.

I have another question. I want to store the output of an already existing
code in the hdf5 format. Right now the code is being compiled using
"gfortran". After I make the necessary changes in the files which output
the data in the main code, can I simply change the compiler to "h5fc" and
expect things to work or it is more complicated than that?

Thank you,
Pradeep

--
Barbara L. Jones
bljones@hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org