Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

HDF5 help requested

jarvusluntatintel
1,218 Views
I'm trying to port my code from CVF to Intel 8.1 under Windows.NET.
I'm stuck trying to get my calls to HDF5 to work. For CVF, HDF5 had Fortran include files (*.h) and static libraries (*.lib). This was all I needed to compile and link. As far as I can tell, HDF5 only supports .NET for C. From the HDF5 web site:
This directory contains the binary distribution for Windows:
5-164-win.ZIP - For MSVC++ (C, F90). Built on Windows XP.
5-164-win-net.ZIP - For .NET 2003 v7.1 (C, C++). Built on Windows XP.

[I realize my questions might better be directed to a HDF5 web site, but the HDF5 web site does not appear to have a community forum.]
Is anyone out there using HDF5 directly with Intel 8.1? If so, could you point me in the right direction. What files do I need to download from HDF5? My Intel Fortran project is not [no surprise] recognizing the C libraries and include files.
Is my only option to convert my HDF5 calls to C and rewrite my program as a mixed language project? [I've not done any mixed language programming, so this would be time consuming, but I will start down this road if it appears to be the only option.]
Thanks for any help.
A search of HDF5 on this forum only turned up one topic of a problem with the dlls. It didn't help me any, but it sounded like it was possible to build the static libraries.
0 Kudos
6 Replies
Steven_L_Intel1
Employee
1,218 Views
Anything you can use from CVF you can use from Intel Visual Fortran. The description says that .f90 files are provided - you may need to adjust calling and naming conventions to match what the library expects. Or just try changing the property "External Procedures..Calling Convention" to CVF and see what happens. (You may also have to change the character length passing to "after individual arg" to match CVF.)
0 Kudos
Intel_C_Intel
Employee
1,218 Views
Have you tried using the Array Visualizer library that comes with IVFto read/write HDF5 data? The AV routines provide a high-level API for HDF5 (and other data formats).
Here's an example of reading from an HDF5 file:
Code:
use AvFRT
call avOpen("mydata.h5", 0, status)
call avReadArray(LOC(datarray), "/group/dset1.1", status)
You can find more complete examples in the Array Visualizer samples.
John
0 Kudos
jarvusluntatintel
1,218 Views
Thanks for the replies.
I was puzzled by the comment that "Anything you can use from CVF you can use from Intel Visual Fortran", because the porting from CVF document says you have to rebuild any static libraries. But I gave it a try. Everything compiled (which was progress), but when it tried to link I got a fatal error cannot open file 'dfor.lib.'
I went through my project settings and didn't see a direct reference to this file. A search of this forum turned up the following:

Laura,
If you have references to dfor.lib, either you are linking in code that was compiled with CVF, or you have an explicit reference to dfor.lib in your project options.
What I suggest you do is this. Remove the libifcore.lib from your options. In the Fortran library project, open the project properties, select Fortran..Libraries and change the value of "Disable default library search rules" from "Yes" to "No". For static library projects, Yes is the default so that you can properly link the library with other Fortran code, but it does pose a problem when you link with non-Fortran code.
Now rebuild the solution. If you still see any references to dfor.lib, make sure that you are not still using any CVF-compiled objects or libraries.
Steve
So it seems to me that the Fortran files under:
For MSVC++ (C, F90), was compiled with CVF and these static libraries are not useable directly by Intel.
I looked for the "external calling convention" and it was already set to CVF (I guess this must be the default when you convert a CVF project).
No, I have not looked into using the array visualizer to write my HDF5 data. If I have to re-write all my calls, that would be a nuisance, but perhaps the path of least resistance. My Fortran program creates HDF5 files, data groups, data sets, writes out strings and user-defined data types (among others). Would I really be able to do all this on the fly from my Fortran program using the AV library?
Thanks for the support.
0 Kudos
Steven_L_Intel1
Employee
1,218 Views
All Fortran code must be recompiled with IVF, true. Non-Fortran code, if it could be called from CVF, can be called from IVF. But if you have the Fortran source, you should be able to recompile it easily enough.
0 Kudos
Intel_C_Intel
Employee
1,218 Views
Regarding using Array Visualizer for HDF5 data:
Yes you can create files, groups, datasets with AV. Typesupport includes all the primitive Fortran types,derived datatypes andstrings.
HDF things you can't do with AV are certain low-level functionality such as controlling the endidness of the data you are writing.
Probably the biggest constraint is that the entire HDF5 dataset will be loaded into memory when it is read (whereas using the HDF API directly you could read in just a portion of the dataset). This will be an issue if your code deals with datasets whose size is close to the virtual memory limits (~2GB on ia32). This shouldn't be a problem on EM64T or Itanium!
John
0 Kudos
jarvusluntatintel
1,218 Views
I emailed the HDF5 help desk. For anyone who is interested, here is the response I got:

We did not support Intel Fortran on .NET with 5-1.6.4. We will support it with 5-1.8. The developers have added it to the development code (5-1.7), but it looks like no snapshot with it has been created yet.

The 5-1.8 release is planned for this Fall.

Following is where the source code snapshots can be obtained from, in case you want to check a later snapshot:

ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/hdf5/snapshots/

(Under the release_docs/ directory will be a new file,

install_Windows_intel.txt.)

If you need it urgently, I can check out the source code for you and give that to you now. (but it is not fully tested software)

0 Kudos
Reply