Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmallDataIO::get_specific_data_line reads data as coords #163

Open
TaigoFr opened this issue Mar 1, 2021 · 1 comment
Open

SmallDataIO::get_specific_data_line reads data as coords #163

TaigoFr opened this issue Mar 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@TaigoFr
Copy link
Member

TaigoFr commented Mar 1, 2021

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.

@mirenradia mirenradia added the bug Something isn't working label Mar 1, 2021
@mirenradia
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants