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

Bug in writing restart file times #70

Closed
julietbravo opened this issue Mar 2, 2020 · 1 comment
Closed

Bug in writing restart file times #70

julietbravo opened this issue Mar 2, 2020 · 1 comment
Labels

Comments

@julietbravo
Copy link
Member

With the MicroHH2 master I get:

Saving "time.0010800" ... OK
Saving "qt.0010801" ... OK
Saving "thl.0010801" ... OK

This is the relevant piece of code:

                // Save the data for restarts.
                if (timeloop->do_save())
                {
                    #ifdef USECUDA
                    if (!cpu_up_to_date)
                    {
                        #pragma omp taskwait
                        cpu_up_to_date = true;
                        fields  ->backward_device();
                        boundary->backward_device();
                        thermo  ->backward_device();
                    }
                    #endif
                    // Save data to disk.
                    #pragma omp task default(shared)
                    {
                        timeloop->save(timeloop->get_iotime());
                        fields  ->save(timeloop->get_iotime());
                    }
                }

Not sure what the best solution would be; save the iotime inside the block with pragma omp?taskwait?

@julietbravo julietbravo added the bug label Mar 2, 2020
@julietbravo
Copy link
Member Author

Fixed with 129ec5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant