#!/usr/bin/env python ######################################################### # # Main file for parallel mesh testing. # # This is a modification of the run_parallel_advection.py # file. # # *) The test files currently avaliable are of the form # test*.out, eg test_5l_4c.out. The term infront of the l # corresponds to the number of levels of refinement # required to build the grid, i.e. a higher number # corresponds to a finer grid. The term infront of the c # corresponds to the number of processors. # # *) The (new) files that have been added to manage the # grid partitioning are # +) mg2ga.py: read in the test files. # +) build_submesh.py: build the submeshes on the host # processor. # +) build_local.py: build the GA mesh datastructure # on each processor. # +) build_commun.py: handle the communication between # the host and processors # # *) Things still to do: # +) Overlap the communication and computation: The # communication routines in build_commun.py should be # interdispersed in the build_submesh.py and build_local.py # files. This will overlap the communication and # computation and will be far more efficient. This should # be done after more testing and there more confidence in # the subpartioning. # +) Much more testing especially with large numbers of # processors. # Authors: Linda Stals, Steve Roberts and Matthew Hardy, # June 2005 # # # ######################################################### import pypar # The Python-MPI interface import sys from os import sep sys.path.append('..'+sep+'pyvolution') # advection routines from config import g, epsilon from Numeric import allclose, array, zeros, ones, Float from parallel_advection import * from Numeric import array # mesh partition routines from mg2ga import * from build_submesh import * from build_local import * from build_commun import * import pdb # define the initial time step class Set_Stage: """Set an initial condition with constant water height, for xself.x0)&(x