Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
ExchangeHalos

Example program that shows the use case for performing tag data exchange between parallel processors in order to sync data on shared entities. Driver

This example :

  1. Initialize MPI and instantiates MOAB
  2. Gets user options: Input mesh file name, vector tag length, ghost layer size etc
  3. Create the root and partition sets
  4. Instantiate ParallelComm and read the mesh file in parallel using appropriate options
  5. Create the required number of ghost layers as requested by the user (default = 3)
  6. Get 2D MPAS polygonal entities in the mesh and filter to get only the "owned" entities
  7. Create two tags: scalar_variable (single data/cell) and vector_variable (multiple data/cell)
  8. Set tag data using analytical functions for both scalar and vector fields on owned entities
  9. Exchange shared entity information and tags between processors
    1. If debugging is turned on, store mesh file and tag on root process (will not contain data on shared entities)
    2. Perform exchange of scalar tag data on shared entities
    3. Perform exchange of vector tag data on shared entities
    4. If debugging is turned on, store mesh file and tag on root process (will now contain data on all entities)
  10. Destroy the MOAB instance and finalize MPI

To run: mpiexec -n np ./ExchangeHalos –input <mpas_mesh_file> –nghosts <ghostlayers> –vtaglength <vector component size> \ –nexchanges <number of exchange runs> Example: mpiexec -n 4 ./ExchangeHalos –input $MOAB_DIR/MeshFiles/unittest/io/mpasx1.642.t.2.nc –nghosts 3 –vtaglength 100

NOTE: –debug option can be added to write out extra files in h5m format to visualize some output (written from root task only)