# Fortran interface still problematic on 64-bit?

**URL:** <https://forum.hdfgroup.org/t/fortran-interface-still-problematic-on-64-bit/13298>\
**Category:** HDF4\
**Created:** [May 29, 2025, 2:59pm UTC](https://forum.hdfgroup.org/t/fortran-interface-still-problematic-on-64-bit/13298 "2025-05-29T14:59:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![normw013](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/n/f08c70/32.png) [@normw013](https://forum.hdfgroup.org/u/normw013)\
**Post date:** [May 29, 2025, 2:59pm UTC](https://forum.hdfgroup.org/t/fortran-interface-still-problematic-on-64-bit/13298/1 "2025-05-29T14:59:57Z")

</div>

Looking back at this post from @derobins:

> [@Who still uses the Fortran interface?](https://forum.hdfgroup.org/t/who-still-uses-the-fortran-interface/10854):
>
> The Fortran interface in HDF4 is broken on 64-bit systems since it stores pointers in 32-bit Fortran INTEGER values. If it’s working for you on a 64-bit system, that’s an accident. Since there’s no funding to rework the interface, I’d like to remove it so people don’t use fundamentally broken code. Perhaps someone in the community would be interested in creating a modern Fortran replacement. We could create a GitHub issue with pertinent information should someone like to do that.

is the Fortran interface still unsupported on 64-bit applications? I suspect so, but searching through the current user guide and reference manual, I didn’t find this limitation mentioned.

Background is that I’m working and having issues with some older Fortran 90/2000 code that links to HDF4 libraries, and those libs have been precompiled as x86\_64.

Thanks,  
Norm

---

<div class="post-metadata">

**Author:** ![epourmal1](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@epourmal1](https://forum.hdfgroup.org/u/epourmal1)\
**Post date:** [May 29, 2025, 8:30pm UTC](https://forum.hdfgroup.org/t/fortran-interface-still-problematic-on-64-bit/13298/2 "2025-05-29T20:30:14Z")

</div>

To my knowledge, several Fortran APIs for the single-file interface (DF) have had issues. However, everything should work with the multi-file Fortran interface—unless HDF4 has not been ported to your platform. Fortran APIs just pass pointers through, and sizes of integers are the same in C and Fortran.

Could you please share more details about your system, including the versions of the HDF4 library and Fortran compiler you’re using, as well as the specific error you’re encountering?

Thank you!

Best regards,  
Elena

---

<div class="post-metadata">

**Author:** ![normw013](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/n/f08c70/32.png) [@normw013](https://forum.hdfgroup.org/u/normw013)\
**Post date:** [May 30, 2025, 2:54pm UTC](https://forum.hdfgroup.org/t/fortran-interface-still-problematic-on-64-bit/13298/3 "2025-05-30T14:54:31Z")

</div>

Thanks, Elena. This is with HDF 4.2.15, but looking more closely, I see that the Fortran interface we’re using is actually HDF-EOS2 (3.0) on top of HDF4. I need to look more at the details, but my guess is that the HDF-EOS2 Fortran interface uses the HDF4 C interface. I will steer my questions to the HDF-EOS community.

The errors are sporadic (a particular satellite orbit of HDF input files may process fine in one attempt, then fail during another attempt) and I believe are related to reading Vdata from the files. The specific error messages vary: warnings from our application that specific Vdata couldn’t be read, other times I get a trace that indicates failure to free a pointer. We’re using a few different, recent versions of the Intel oneAPI compilers and I’m working on getting some more detailed diagnostics.

I’ll continue looking at it from the HDF-EOS side from this point. Thanks for the information about the multi-file interface - that’s helpful as I have other legacy applications using HDF4.

Thanks!  
Norm
