The "illegal instruction" message is usually encountered when you are attempting to run a code on an architecture different than the one that it was compiled for. Is the hdf5 library build intended for the machine you are using it on?
On Mon, Mar 30, 2015 at 3:13 PM, Pierre de Buyl < [email protected]> wrote: > Hi, > > On Sat, Mar 28, 2015 at 10:10:25AM +0100, Marco Lucchesi wrote: > > !!!!!!!!!!! > > integer(HSIZE_T) :: dim(1),datadims(3) > > real*8 :: dbl_vec(2),t,dt > > dim=(/2/) > > call H5Aopen_f(h5gid,'time_variables',h5attr,h5error) > > call H5Aread_f(h5attr,H5T_IEEE_F64BE,dbl_vec(1),dim,h5error) > > call H5Aclose_f(h5attr,h5error) > > dt=dbl_vec(1) > > t=dbl_vec(2) > > write(*,*) dt,t > > !!!!!!!!!!! > > Before these lines there is code, and it runs fine and i am able to > > read integer values from the datafile. If i try to run it, it arrives > > at the write instruction and says: > > 'Illegal Instruction' > > and dies with no print. > > It is quite hard to debug this kind of issue remotely. Ideally, you should > send > to the list a small program and datafile for which you can reproduce the > problem. In the meantime, here are some possible issues: > > 1. In the call to H5Aread_f, the datatype is the memory datatype (see > http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Read ) > > In your case, this would be H5T_NATIVE_DOUBLE (if using that, you should > also > declare the variable as "double precision"). > > 2. Did you compile with the "-g" flag for debugging. It might provide the > line > number of the error. > > Regards, > > Pierre > > > I am compiling it with h5fc and the HDF5 API version is 1.8.9. The > > datafile is around 41MB. Have you ever seen this before? > > Thanks in advance, > > Marco > > > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org > Twitter: https://twitter.com/hdf5 > -- Jim Edwards CESM Software Engineer National Center for Atmospheric Research Boulder, CO
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
