Hi Phani, My case is a little bit more complicated than yours. But you are right, one of the bugs is exactly what you said, namely, I forgot to use this "max" collective operation to collect these two flags. Another bug is tricky for me, actually I still do not know this bug's reason. This bug disappeared if I deleted the `if (cell->is_locally_owned())`.
The following is this separated code. If we uncomment `if (cell->is_locally_owned())`, it leads to a endless loop. Could you have more suggestions? Thank you again! Best, Qing On Thu, Mar 22, 2018 at 1:50 PM, Phani Motamarri <[email protected]> wrote: > HI Qing, > > I do not know how your mesh generation algorithm works. In my case I have > a parameter called refine_flag which is set to 1 on a given processor if > any cells in that processor have to be refined. Then I call > triangulation.execute_coarsening_and_refinement(); only if refine_flag is > 1. > > Lets say there are few processors which have the value for refine_flag to > be 0 since there are no cells to be refined, then only few processors will > call the function "execute_coarsening_and_refinement()" and some will not > which casued a deadlock for me. > Then I fixed this issue by doing > refineFlag= Utilities::MPI::max((unsigned int) refineFlag, > mpi_communicator); > > so that every processor will call "execute_coarsening_and_refinement()". > > I hope this helps you. > > Regards > Phani > > > On Thu, Mar 22, 2018 at 2:11 PM, Qing Yin <[email protected]> wrote: > >> Hi Phani, >> >> So what was that MPI bug? Could you share your solution? I have a >> similar deadlock. >> >> Thank you! >> >> Best, >> >> Qing >> >> On Tuesday, December 12, 2017 at 9:29:36 AM UTC-7, Phani Motamarri wrote: >>> >>> Thanks for your reply Dr Wolfgang. It was my bad, I had a MPI bug in my >>> code which was causing this problem. Now everything works fine! >>> >>> On Mon, Dec 11, 2017 at 12:32 AM, Wolfgang Bangerth < >>> [email protected]> wrote: >>> >>>> On 12/10/2017 09:39 PM, Phani Motamarri wrote: >>>> >>>>> Thank you Dr WolfGang for your reply. I do not know if I was clear in >>>>> my email. I was only intending to check with you about this critical >>>>> number >>>>> of elements on the base mesh only when I am trying to generate hanging >>>>> node >>>>> mesh from the base mesh using p4est. >>>>> >>>>> When I debug with ddt, the stack trace shows >>>>> execute_coarsening_refinement calls p8est_refine which calls >>>>> p8est_refine_ext which calles p8est_is_valid and finally it calls >>>>> p8est_comm_sync_flag after it which it calls PMPI_Abort() and my code get >>>>> aborted. >>>>> >>>>> This happens whenever I run more than 8procs. Here in this case, I >>>>> have a base mesh with 64 elements and I try to adaptively refine to >>>>> generate hanging node mesh using >>>>> triangulation.execute_coarsening_and_refinement() >>>>> after marking some cells for refinement. >>>>> >>>> >>>> I understood what you said. But my answer is still correct: there is no >>>> limitation, and to find out what causes the error/abort, you need to find >>>> out whether all processors abort in the same place. >>>> >>>> >>>> Best >>>> W. >>>> >>>> >>>> -- >>>> ------------------------------------------------------------ >>>> ------------ >>>> Wolfgang Bangerth email: [email protected] >>>> www: http://www.math.colostate.edu/ >>>> ~bangerth/ >>>> >>>> -- >>>> The deal.II project is located at http://www.dealii.org/ >>>> For mailing list/forum options, see https://groups.google.com/d/fo >>>> rum/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 [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> The deal.II project is located at http://www.dealii.org/ >> For mailing list/forum options, see https://groups.google.com/d/fo >> rum/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 [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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/MvOII6BGUTw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
pre_local_refinement
Description: Binary data
