9
$\begingroup$

Bug introduced in 8.0 or earlier and persisting though 10.2

On OS X, the problem is present in 9.0 but not in 10.0, 10.1 or 10.2.


I am trying to read a HDF file in Mathematica 9 on OS X and get this message:

LinkObject::linkd: "Unable to communicate with closed link LinkObject[!(\"/Applications/Mathematica.app/SystemFiles/Converters/Binaries/MacOSX-x86-64/HDF.exe\", 247, 4)]."

Any clue what is going on ???

The command was:

Import["CAL_LID_L2_05kmALay-Prov-V3-02.2013-01-02T16-42-52ZD_Subset.hdf",{"Datasets", "Number_Layers_Found"}]

The file can be downloaded from http://ge.tt/3eSkGUM2/v/0?c

$\endgroup$
13
  • 3
    $\begingroup$ HDF.exe has likely crashed. To let people try to find a solution, you need to give more details: a small sample HDF plus the specific import command would be good. $\endgroup$
    – Szabolcs
    Aug 19, 2015 at 18:19
  • $\begingroup$ Import["CAL_LID_L2_05kmALay-Prov-V3-02.2013-01-02T16-42-52ZD_Subset.hdf",{"Data", "Number_Layers_Found"}] $\endgroup$
    – user10737
    Aug 19, 2015 at 19:00
  • 3
    $\begingroup$ Unfortunately, I don't think you were doing anything incorrectly. I believe this is a bug in Mathematica 9. In Mathematica 10 and later it works correctly. You can try to extract that part of the data with some other tool, e.g. convert to text format and read with Mathematica afterwards. $\endgroup$
    – Szabolcs
    Aug 19, 2015 at 19:57
  • 2
    $\begingroup$ On Linux, I get this error, for provided file, in all Mathematica versions I have available: 8.0, 9.0, 10.0, 10.1 and 10.2. $\endgroup$
    – jkuczm
    Aug 19, 2015 at 22:39
  • 1
    $\begingroup$ user10737, @Szabolcs I don't know much about HDF format, but Mathematica imports data, from provided file, correctly, in all versions I have available, not only after conversion to HDF5, but also after re-converting it back to HDF4 using h5toh4. Bug report should include example file that causes this error, I can't reproduce it with files that I create and I'm kind of reluctant to send report with someone else's data. $\endgroup$
    – jkuczm
    Aug 20, 2015 at 22:10

1 Answer 1

5
$\begingroup$

It appears that HDF.exe crashes. This should not happen and I think this is a bug. On OS X I can reproduce the crash with M9.0, but not with M10.0 or later. On Linux I can reproduce the crash with M10.2 too.

A possible workaround is to convert the file from HDF4 to HDF5 format. You could use the h4toh5 tool for this, which I installed using MacPorts. Mathematica 9 will read the resulting HDF5 file without problems.

$\endgroup$
2
  • $\begingroup$ I will try that !!! Thanks $\endgroup$
    – user10737
    Aug 20, 2015 at 13:01
  • $\begingroup$ Filed a bug report. Thanks for the heads up! $\endgroup$
    – ilian
    Aug 24, 2015 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.