Hello Ted,

obviously this code does not fix the issue. You have to pull out the initialization of the index variable into the global function.

Best Regards,
Markus



Am 17.12.10 17:31, schrieb Ted Kord:

Hi Markus,


On 17 December 2010 16:01, Markus Bürg <[email protected] <mailto:[email protected]>> wrote:

    Hello Ted,

    the variable index contains other values now. In the sequential
    version you set it to zero before you loop over the intervals, but
    in the parallel version you set it to zero at the beginning of
    every chunk of intervals.

    Best Regards,
    Markus



Even when I rewrite it as:

template <int dim>
void TestEquation<dim>::test_
iteration_interval(double time, TestIterator &begin, TestIterator &end) {
    int index = 0;
    TestIterator p;
    for(int step = 0; iteration_time <= 0.5*time; ++step) {
        iteration_time += some_step;
        for (p = begin; p != end; ++p) {
            do some stuff


            write_lock.acquire();

            old_solution_u(index) = do_some_calculation();
            ++index;
            write_lock.release();
        }
    }
}

The results are still incorrect.
Many thanks,

Ted


_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to