ElmerGrid Mesh Partitioning

General discussion about Elmer
Post Reply
MT_Keg
Posts: 9
Joined: 02 Jun 2013, 19:36
Antispam: Yes
Location: Tennessee

ElmerGrid Mesh Partitioning

Post by MT_Keg »

Hey all,

I am trying to partition a mesh that I created in gmsh using the ElmerGrid functions but I have not had any success. I am able to convert the *.msh file to the Elmer Solver format using the following syntax:

Code: Select all

ElmerGrid 14 2 Test_Partition_Mesh.msh
which results in the following output:

Code: Select all

Starting program Elmergrid
Elmergrid reading in-line arguments
Output will be saved to file Test_Partition_Mesh.

Elmergrid loading data:
-----------------------
Format chosen using the first line: $MeshFormat
Loading mesh in Gmsh format 2.0 from file Test_Partition_Mesh.msh
Allocating for 29721 knots and 30353 elements.
Moving bulk elements to boundary elements
Leading bulk elementtype is 404
Trailing bulk elementtype is 101
There are 1177 (out of 30353) lower dimensional elements.
Node 1782 belongs to maximum of 7 elements
Found 1176 side elements, could have found 1177
Removing 1 lower dimensional elements from the element list
Parent elements were reordered up to indx 29176.
Moved 29176 elements (out of 30353) to new positions
Initial boundary interval [1,9]
Numbering of boundary types is already ok
Initial body interval [1,1]
Numbering of bodies is already ok
Successfully read the mesh from the Gmsh input file.

Elmergrid creating and manipulating meshes:
-------------------------------------------

Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in ElmerSolver format to directory Test_Partition_Mesh.
Reusing an existing directory
Saving 29721 coordinates to mesh.nodes.
Saving 29176 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
When I try to run

Code: Select all

ElmerGrid 2 2 /Test_Partition_Mesh –metis 4 0
after i run the command above I receive the following error:

Code: Select all

tarting program Elmergrid
Elmergrid reading in-line arguments
The mesh will be partitioned with Metis to 4 partitions.
Output will be saved to file /home/mt_keg/Documents/Benchmark_Computations_of_Laminar_Flow_Around_a_Cylinder/Test_Partition_Mesh.

Elmergrid loading data:
-----------------------
Loading mesh in ElmerSolver format from directory /home/mt_keg/Documents/Benchmark_Computations_of_Laminar_Flow_Around_a_Cylinder/Test_Partition_Mesh.
Loading header from mesh.header
Maximum elementtype index is: 404
Maximum number of nodes in element is: 4
Allocating for 29721 knots and 29176 elements.
Loading 29721 Elmer nodes from mesh.nodes
Loading 29176 bulk elements from mesh.elements
Loading 1176 boundary elements from mesh.boundary
Elmer mesh loaded succesfully

Elmergrid creating and manipulating meshes:
-------------------------------------------
Dimension 3 not active but higher dimensions are?
Coordinates defined in 2 dimensions

Elmergrid partitioning meshes:
------------------------------
Making a Metis partitioning for 29176 elements in 2-dimensions.
Minimum element type is 303
Maximum element type is 404
Minimum number of linear nodes in elements 3
Requiring number of nodes in dual graph 2
Using 29720 nodes of 29721 possible nodes in the Metis graph
Allocating mesh topology of size 116624
Starting graph partitioning METIS_PartMeshNodal.
 Runtime parameters:
   Objective type: METIS_OBJTYPE_CUT
   Coarsening type: METIS_CTYPE_SHEM
   Initial partitioning type: METIS_IPTYPE_METISRB
   Refinement type: METIS_RTYPE_GREEDY
   Perform a 2-hop matching: No
   Number of balancing constraints: 1
   Number of refinement iterations: 10
   Random number seed: -1
   Number of partitions: 4
   Number of cuts: 1
   User-supplied ufactor: 30
   Minimize connectivity: No
   Create contigous partitions: No
   Target partition weights: 
        0=[2.50e-01]   1=[2.50e-01]   2=[2.50e-01]   3=[2.50e-01]
   Allowed maximum load imbalance: 1.030 


 gk_mcore statistics
           coresize:       475736         nmops:         2048  cmop:      0
        num_callocs:           33   num_hallocs:            0
       size_callocs:       789576  size_hallocs:            0
        cur_callocs:            0   cur_hallocs:            0
        max_callocs:       256160   max_hallocs:            0
 nbrpool statistics
        nbrpoolsize:            0   nbrpoolcpos:            0
    nbrpoolreallocs:            0


Timing Information -------------------------------------------------
 Multilevel: 		   0.012
     Coarsening: 		   0.004
            Matching: 			   0.004
            Contract: 			   0.000
     Initial Partition: 	   0.004
     Uncoarsening: 		   0.000
          Refinement: 			   0.000
          Projection: 			   0.000
     Splitting: 		   0.000
********************************************************************

 gk_mcore statistics
           coresize:       475736         nmops:         2048  cmop:      0
        num_callocs:           62   num_hallocs:            0
       size_callocs:       996896  size_hallocs:            0
        cur_callocs:            0   cur_hallocs:            0
        max_callocs:       475584   max_hallocs:            0
 nbrpool statistics
        nbrpoolsize:        11700   nbrpoolcpos:         8741
    nbrpoolreallocs:            1

Finished graph partitioning METIS_PartMeshNodal.
Set the partition given by Metis for each node
Cannot set partitioning for node 5
Successfully made a Metis partition using the element mesh.
Optimizing the partitioning at boundaries.
Ownership of 0 parents was changed at BCs
Optimizing for 4 partitions
Creating a table showing all parenting partitions of nodes.
Nodes belong to 2 partitions in maximum
There are 266 shared nodes which is 0.89 % of all nodes.
The initial owner was not any of the elements for 1 nodes
Checking partitioning before optimization
Checking for partitioning
Bad initial partitioning: 1 nodes do not belong anywhere!
The program encountered a major error...
Can't continue with broken partitioning
...now exiting to system...
I receive this similar error when using the -partition option. I have re-meshed a few different ways and come up with similar issues. Any help would be greatly appreciated!

Thanks,

MT
Attachments
Test_Partition_Mesh.msh.tar.gz
(864.56 KiB) Downloaded 332 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ElmerGrid Mesh Partitioning

Post by raback »

Hi

The initial gmsh file obviously has some unconnected nodes e.g. support nodes for circular arhcs. You should clean these away. Often we use the "-autoclean" flag which also renumbers the entities. But after that the connectivity of the mesh should be well defined.

-Peter
MT_Keg
Posts: 9
Joined: 02 Jun 2013, 19:36
Antispam: Yes
Location: Tennessee

Re: ElmerGrid Mesh Partitioning

Post by MT_Keg »

Worked like a charm! I knew there was something I was missing. Thanks!
Post Reply