I attached my screenshot in paraview. I ran my AMR with 12 processors. The
partition on proc 0 is in red, which has only 6 elements. But actually, the
mesh has more than 1 million elements. I guess libmesh retained the
partition from the beginning when it read in the mesh (64 elements in
total). I also tried to break on ParmetisPartitioner::_do_repartition() in
debugger. I found it only happened when reading the input. I also found if
I changed number of iterations, the partition boundary did not change.
>From the source code, as I pasted before, it looks partitioner()->partition()
won't get executed for non-serial meshes.  I don't understand the comment
in the code and wonder when non-serials meshes are ready for repartitioning?
PS: I used GMV since some guy told me that. I also used ExodusII_IO, but
the same are the same.

<< mesh_base.C>>
375   // Non-serial meshes may not be ready for repartitioning here.
376   else if(!skip_partitioning() &&
377           partitioner().get() &&
378           this->is_serial())
379     {
380       partitioner()->partition (*this, n_parts);
381     }

--Junchao Zhang

On Wed, Aug 5, 2015 at 2:35 PM, Derek Gaston <fried...@gmail.com> wrote:

> So, how were you judging that the mesh wasn't getting repartitioned?  I
> can't remember, does the processor_id come out automatically when we output
> GMV?
>
> Also: cool, I didn't know Paraview could read GMV.  That's a seriously old
> mesh format!
>
> Derek
>
> On Wed, Aug 5, 2015 at 3:33 PM Junchao Zhang <junchao.zh...@gmail.com>
> wrote:
>
>> I used GMVIO(mesh).write("output.gmv");
>>
>> --Junchao Zhang
>>
>> On Wed, Aug 5, 2015 at 2:32 PM, Derek Gaston <fried...@gmail.com> wrote:
>>
>>> What file format were you using to write the mesh out and view it in
>>> Paraview?
>>>
>>> Derek
>>>
>>> On Wed, Aug 5, 2015 at 12:14 PM Junchao Zhang <junchao.zh...@gmail.com>
>>> wrote:
>>>
>>>> <<forgot to add the mailing list, so I resend it>>
>>>>
>>>> In addition, I did more experiments.  I increased the input mesh size,
>>>> let
>>>> it has 64 elements and ran with 12 processes. It looks libmesh keeps the
>>>> original partition (got when the mesh is read in) unchanged, and does
>>>> not
>>>> do repartitioning after refinement. I observed it from viewing output
>>>> mesh
>>>> in paraview.
>>>> So the question is under what conditions mesh repartitioning will be
>>>> triggered in libmesh?
>>>>
>>>> Thank you very much.
>>>>
>>>> --Junchao Zhang
>>>>
>>>> On Tue, Aug 4, 2015 at 2:58 PM, Junchao Zhang <junchao.zh...@gmail.com>
>>>> wrote:
>>>>
>>>> > Hi, John,
>>>> >
>>>> > Attached are my naive AMR (adapted from adaptivity_ex2.C) and its
>>>> input. I
>>>> > compiled it with  `libmesh-config --cxx` -o amr_libmesh
>>>> > ../examples/amr_libmesh.cpp `libmesh-config --cxxflags --include
>>>> --ldflags
>>>> > --libs` and ran it with mpirun -n 5 ./amr_libmesh -niter 5
>>>> > I opened output.gmv and I could only see partitions on four
>>>> processors.  I
>>>> > don't know where I can call mesh.partition(n).
>>>> >
>>>> > Thanks.
>>>> >
>>>> >
>>>> > --Junchao Zhang
>>>> >
>>>> > On Tue, Aug 4, 2015 at 2:26 PM, John Peterson <jwpeter...@gmail.com>
>>>> > wrote:
>>>> >
>>>> >>
>>>> >>
>>>> >> On Tue, Aug 4, 2015 at 1:07 PM, Junchao Zhang <
>>>> junchao.zh...@gmail.com>
>>>> >> wrote:
>>>> >>
>>>> >>> Hello,
>>>> >>>    I am writing a simple AMR code with libmesh. My input mesh has 4
>>>> >>> elements. I use ParallelMesh.  I found I could not distribute it to
>>>> more
>>>> >>> than four processes even after refinement.
>>>> >>>    In my code, I firstly do mesh.read("mesh.xda"). I find libmesh
>>>> reads
>>>> >>> the
>>>> >>> data and distributes it on four processes, and mesh._is_serial is
>>>> set to
>>>> >>> false.  After that, I call
>>>> mesh_refinement.refine_and_coarsen_elements(),
>>>> >>> which calls _mesh.prepare_for_use (), and then this->partition().
>>>> But in
>>>> >>> mesh_base.C, since this->is_serial() is false, the partitioner
>>>> never gets
>>>> >>> called.
>>>> >>>
>>>> >>
>>>> >>
>>>> >> What happens if you call mesh.partition(n) directly?
>>>> >>
>>>> >> Please post your entire code so we can take a look.
>>>> >>
>>>> >> --
>>>> >> John
>>>> >>
>>>> >
>>>> >
>>>>
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Libmesh-users mailing list
>>>> Libmesh-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>>>
>>>
>>
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to