`SmallDataIO::get_specific_data_line` reads data as coords
TaigoFr opened this issue · 1 comments
Hey,
I noticed the SmallDataIO::get_specific_data_line
looks for the line corresponding to a specific 'time' requested as an argument, but this is searched through the whole line and not just the first column, which means that if by any change the coordinate (time) happens to match some of the data on a given line (but not the actual time) then SmallDataIO will think it found the correct line.
Explicit example:
- BBH example with cheap params
- Punctures are at (6,8,0) and (10,8,0)
- I ran and decided to restart at t=8 (not fine tuned, I actually want to restart at that point!)
- The Puncture tracker was for some reason setting the punctures to (6,8,0) and (10,8,0) (the ones of t=0)
- Why? Because the line of t=0:
# time x_1 y_1 z_1 x_2 y_2 z_2
0.0000000000 6.0000000000e+00 8.0000000000e+00 0.0000000000e+00 1.0000000000e+01 8.0000000000e+00 0.0000000000e+00
Indeed has an 8.0000000000, so the SmallDataIO::get_specific_data_line
stops there and assumes it found t=8, since "8" is in that line
Explicit place where the bug is in SmallDataIO.cpp
:
while (std::getline(m_file, line))
{
if (!(line.find(coords_string) == std::string::npos))
{
I guess we need to replace this by looking just at the first column.
Well, not necessarily just the first column. It will depend on the length of a_coords
. But yes, I agree that we should restrict to the substring corresponding to the "coords" columns only.