Thanks for your contributions, Based on k-wave, I am using some optimizer to optimize the phase of the transducer, and I iterate the k-wave code as a function in the optimizer. My code has been run on two computers. The same code has no problem on one computer, but on one of the computers, the following different errors occurred.
1. In the 300x300x300 space, after calling k-wave in the Bayesian optimized iteration number and correctly getting the sensor data three times, even after the fourth time, even if the source.p is correctly calculated, the data obtained by the sensor is NaN. It rarely appears when the space is 200x200x200 (or a smaller space).
2. In the same situation, h5readc errors sometimes occur. The specific error statement is as follows:
HDF5 library error occur
H5G_loc_find_cb object'Nx' doesn't exist
H5G_traverse_real traversal operator failed
H5G_traverse internal path traversal failed
H5G_loc_find can;t find pbject
H5Dopen2 not found
error: h5read
[data,var_class] = h5readc(Filename, Dataset, start, count, stride);
The computer memory in question is 64G, GPU is 2080ti, matlab version is 2019b, and k-wave version 1.3.
And I am using
\sensor_data = kspaceFirstOrder3DG(kgrid, medium, source, sensor, input_args{:});\
to do the simulation.
I have modified the acousticFieldPropagator, writeAttributes, and writeMatrix files according to what Bradley Treeby said. There have been no similar errors when running a smaller space simulation before.
Can you tell me how to fix this problem? Thank you.