Problem with Fortran and HDF5

Hi everybody,

I am not completely sure that the problem I'm experiencing is due to the HDF5 library, but after some tests I am quite confident it is.
I am working with a CFD code developed in Fortran and I'm using the CGNS library for input/output purposes. I was working with the ADF format, and then decided to adopt the HDF5 for compatibility with other tools. I compiled the libcgns.a with the --with-hdf5 flag and linked my code against libcgns.a, libhdf5.a and libz.a.

The problem is that now the code hangs when I try to write a string with:

Write(string,'(i4)') integer_var

Or

Write(string,'(a)') other_string

This doesn't happen when using the ADF version of the library. I also tried to link the code with the shared versions, libcgns.so and libhdf.so (libz is no more required in this case), but it still hangs. Of course, editing the strings is mandatory in my code and I have no other way to do it.

Does anyone have a clue about what the problem could be?

Thanks in advance.

Alessandro

What version of CGNS are you using? Did you test the install with make test, because most of the Fortran tests do exactly what you are doing. What compiler and platform are you using?
I’ve not seen this error before and it seems very odd. If you have a program with just that write statement (or put that write statement first before all the CGNS calls) does it still hang?

A small program which exhibits the problem would help.

Thanks,
Scot

···

On Jun 3, 2015, at 1:10 PM, Mancini, Alessandro <am791@leicester.ac.uk<mailto:am791@leicester.ac.uk>> wrote:

Hi everybody,

I am not completely sure that the problem I’m experiencing is due to the HDF5 library, but after some tests I am quite confident it is.
I am working with a CFD code developed in Fortran and I’m using the CGNS library for input/output purposes. I was working with the ADF format, and then decided to adopt the HDF5 for compatibility with other tools. I compiled the libcgns.a with the --with-hdf5 flag and linked my code against libcgns.a, libhdf5.a and libz.a.

The problem is that now the code hangs when I try to write a string with:

Write(string,’(i4)’) integer_var

Or

Write(string,’(a)’) other_string

This doesn’t happen when using the ADF version of the library. I also tried to link the code with the shared versions, libcgns.so and libhdf.so (libz is no more required in this case), but it still hangs. Of course, editing the strings is mandatory in my code and I have no other way to do it.

Does anyone have a clue about what the problem could be?

Thanks in advance.

Alessandro
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Dear Scot,

Thank you very much for your quick reply. Your observation “or put that write statement first before all the CGNS calls” made me notice that I was using the write statement with the cgns file opened and maybe that was the cause. I then tried to close it before the write statement and had an error that prevented the file from closing. I then realized that my problem was probably with the cgns library instead. I tried to recompile it with different flags and by removing the --enable-64bit flag I got rid of the error.

I’m sorry for the confusion. If it can be of any interest I could try to run some tests with make test and simpler programs to dig further, but I guess this is more related to the CGNS community.

Thank you very much again.

Alessandro

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Scot Breitenfeld
Sent: 03 June 2015 21:05
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] Problem with Fortran and HDF5

What version of CGNS are you using? Did you test the install with make test, because most of the Fortran tests do exactly what you are doing. What compiler and platform are you using?
I’ve not seen this error before and it seems very odd. If you have a program with just that write statement (or put that write statement first before all the CGNS calls) does it still hang?

A small program which exhibits the problem would help.

Thanks,
Scot

On Jun 3, 2015, at 1:10 PM, Mancini, Alessandro <am791@leicester.ac.uk<mailto:am791@leicester.ac.uk>> wrote:

Hi everybody,

I am not completely sure that the problem I’m experiencing is due to the HDF5 library, but after some tests I am quite confident it is.
I am working with a CFD code developed in Fortran and I’m using the CGNS library for input/output purposes. I was working with the ADF format, and then decided to adopt the HDF5 for compatibility with other tools. I compiled the libcgns.a with the --with-hdf5 flag and linked my code against libcgns.a, libhdf5.a and libz.a.

The problem is that now the code hangs when I try to write a string with:

Write(string,’(i4)’) integer_var

Or

Write(string,’(a)’) other_string

This doesn’t happen when using the ADF version of the library. I also tried to link the code with the shared versions, libcgns.so and libhdf.so (libz is no more required in this case), but it still hangs. Of course, editing the strings is mandatory in my code and I have no other way to do it.

Does anyone have a clue about what the problem could be?

Thanks in advance.

Alessandro
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5