Hello Junxiang,

It looks like the issue happens at a hanging node. In step-40, we show how
to see which processor each cell belongs to. I think it would be
interesting to output that image and see if the issue happens because the
hanging node is shared between different processors.

Best,

Bruno

Le lun. 10 févr. 2025 à 01:18, Junxiang Wang <wangjx0...@gmail.com> a
écrit :

> Deal All,
>
> Thanks a lot for your advice.
>
> The code works fine in both parallel and serial if the mesh remains the
> same without any refinement.
>
> To further investigate the issue I encountered. I export the global
> residual of running in serial and parallel models with a high number of
> cores.
>
> I find that one particular nodal residual value becomes abnormal as shown
> below in the pic attached.
>
> Therefore, Can I just simply add the residual value of local_rhs at the
> node on the edge shared by the two elements, and compare it to the final
> residual vector, system_pde_residual?
>
>
>   29           if (residual_only)
>   28             {
>   27               constraints_update.distribute_local_to_global(
>   26                 local_rhs, local_dof_indices, system_pde_residual);
>   25
>   24               {
>   23                 constraints_update.distribute_local_to_global(
>   22                   local_rhs, local_dof_indices,
> system_total_residual);
>   21               }
>   20             }
>   19           else
>   18             {
>   17               constraints_update.distribute_local_to_global(
>   16                 local_matrix,
>   15                 local_rhs,
>   14                 local_dof_indices,
>   13                 system_pde_matrix,
>   12                 system_pde_residual);
>   11
>   10             }
>
>
> Best,
>
> Junxiang.
>
>
> On Sunday, February 9, 2025 at 5:57:10 AM UTC+8 bruno.t...@gmail.com
> wrote:
>
>> What happens if you don't refine the mesh? Is everything still the same?
>>
>> Bruno
>>
>> Le sam. 8 févr. 2025 à 06:26, Junxiang Wang <wangj...@gmail.com> a
>> écrit :
>>
>>> In the first 80 steps, RHS and Stiffness are all the same. After several
>>> step of refine mesh, the RHS then turns to different from the serial one.
>>>
>>> On Saturday, February 8, 2025 at 7:24:07 PM UTC+8 Junxiang Wang wrote:
>>>
>>>> Dear Bruno,
>>>>
>>>> Thanks a lot for your advice.
>>>>
>>>> I tested it. The code runing in parellel has exactly the same norm of
>>>> stiffness mtx but different norm of RHS residual compared to running in
>>>> serial.
>>>>
>>>> It is really frastrating that increasing number of cores can make a
>>>> difference...
>>>>
>>>> Best,
>>>>
>>>> Junxiang.
>>>> On Friday, February 7, 2025 at 10:42:04 PM UTC+8 bruno.t...@gmail.com
>>>> wrote:
>>>>
>>>>> Hello Junxiang,
>>>>>
>>>>> It's very hard to know what the issue could be. What you could do is
>>>>> print some information about your matrix and right hand side (for 
>>>>> instance,
>>>>> different norms) and check that they are the same in serial and in
>>>>> parallel. By comparing the serial and parallel simulations at different
>>>>> points in your code, you should be able to find out why there is a
>>>>> difference.
>>>>>
>>>>> Best,
>>>>>
>>>>> Bruno
>>>>>
>>>>> On Friday, February 7, 2025 at 4:51:50 AM UTC-5 wangj...@gmail.com
>>>>> wrote:
>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> I am modelling multyphysics problem in a paralle way.
>>>>>>
>>>>>> The code runs perfectly in serial or small number of cores while
>>>>>> fails to converge once I run it on more number of cores say >8.
>>>>>>
>>>>>> What could cause this problem?
>>>>>>
>>>>>> Thanks a lot.
>>>>>>
>>>>>> Junxiang.
>>>>>>
>>>>> --
>>>
>> The deal.II project is located at http://www.dealii.org/
>>> For mailing list/forum options, see
>>> https://groups.google.com/d/forum/dealii?hl=en
>>> ---
>>>
>> You received this message because you are subscribed to a topic in the
>>> Google Groups "deal.II User Group" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/dealii/tA35I30la0M/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> dealii+un...@googlegroups.com.
>>
>>
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/dealii/f3a77cc0-c066-45b4-ad6b-1069899594a4n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/dealii/f3a77cc0-c066-45b4-ad6b-1069899594a4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/tA35I30la0M/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/dealii/367344c6-1cee-46a6-976b-c8ff97bb2b1fn%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/367344c6-1cee-46a6-976b-c8ff97bb2b1fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/CAGVt9eOvK5SjY99St%2B1fsL-G%2Bkg_YrC6r6iSZKbQNDuxyFZmJA%40mail.gmail.com.

Reply via email to