1 / 16

Uintah User Interface Tutorial

www.uintah.utah.edu. Uintah User Interface Tutorial. Outline of User Interface Burgers Equation Example Code Task Graph Generation MPM Example ICE Example RMCRT Radiation Arches code. Jeremy Thornock Todd Harman John Schmidt.

Télécharger la présentation

Uintah User Interface Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.


Presentation Transcript

  1. www.uintah.utah.edu Uintah User Interface Tutorial • Outline of User Interface • Burgers Equation Example Code • Task Graph Generation • MPM Example • ICE Example • RMCRT Radiation • Arches code Jeremy Thornock Todd Harman John Schmidt Message : writing for an abstract graph interface provides portability

  2. Uintah Applications Explosions Angiogenesis Industrial Flares Micropin Flow Explosions Sandstone Compaction Foam Compaction Shaped Charges Carbon capture and cleanup

  3. Achieving Scalability & Portability • Get the Abstractions Right • Abstract Task Graph • encapsulates computation and communication • Data Storage – DataWarehouse • encapsulates model for describing the global computational space • Data moves from node/processor via MPI under the covers as needed – hidden from the developer • Programming for a Patch • Multiple patches combine to form the global Grid • Unit work space – block structured collection of cells with I,J,K indexing scheme • Single or multiple patches per Core/Processor

  4. Abstract Taskgraph • Convenient abstraction that provides a mechanism for • achieving Parallelism • Explicit representation of computation and communication • Components delegate decisions about parallelism to a • scheduler component using variable dependencies and • computational workloads for global resource optimization • (load balancing) • Efficient fine-grained coupling of multi-physics components • Flexible load balancing • Separation of Application development from Parallelism Component developers don’t have to be parallelism experts

  5. Uintah Patch and Variables ICE is a cell-centered finite volume method for Navier Stokes equations • Structured Grid Variable (for Flows) are Cell Centered Nodes, Face Centered Nodes. • Unstructured Points (for Solids) are Particles MPM is a novel method that uses particles and nodes Exchange data with ICE, not just boundary condition ARCHES is a combustion code using several different radiation models and linear solvers

  6. What is a Task? • Two features: • A pointer to a function that performs the actual work • A specification of the inputs & outputs Task* task = scinew Task(“Example::taskexample”, this, &Example::taskexample); task->requires(Task::OldDW, variable1_label, Ghost::AroundNodes, 1); task->computes(variable1_label); task->computes(variable2_label); sched->addTask(task, level->eachPatch(), sharedState_->allMaterials());

  7. Component Basics class Example: public UintahParallelComponent, public SimulationInterface { public: virtual void problemSetup(. . . .); virtual void scheduleInitialize(. . . ); virtual void scheduleComputeStableTimestep(. . . ); virtual void scheduleTimeAdvance(. . . ); private: void intialize(. . . ); void computeStableTimestep(. . . ); void timeAdvance( . . . ); } Algorithmic Implementation

  8. Burgers Example <Grid> <Level> <Box label = "1"> <lower> [0,0,0] </lower> <upper> [1.0,1.0,1.0] </upper> <resolution> [50,50,50] </resolution> <patches> [2,2,2] </patches> <extraCells> [1,1,1] </extraCells> </Box> </Level> </Grid> 25 cubed patches 8 patches One level of halos void Burger::scheduleTimeAdvance( constLevelP& level, SchedulerP& sched) { ….. task->requires(Task::OldDW, u_label, Ghost::AroundNodes, 1); task->requires(Task::OldDW, sharedState_->get_delt_label()); task->computes(u_label); sched->addTask(task, level->eachPatch(), sharedState_->allMaterials()); } Get old solution from old data warehouse One level of halos Compute new solution

  9. Burgers Equation code void Burger::timeAdvance(constProcessorGroup*, constPatchSubset* patches, constMaterialSubset* matls, DataWarehouse* old_dw, DataWarehouse* new_dw) //Loop for all patches on this processor { for(int p=0;p<patches->size();p++){ //Get data from data warehouse including 1 layer of "ghost" nodes from surrounding patches old_dw->get(u, lb_->u, matl, patch, Ghost::AroundNodes, 1); // dt, dx Time and space increments Vector dx = patch->getLevel()->dCell(); old_dw->get(dt, sharedState_->get_delt_label()); // allocate memory for results new_u new_dw->allocateAndPut(new_u, lb_->u, matl, patch); // define iterator range l and h …… lots missing here and Iterate through all the nodes for(NodeIteratoriter(l, h);!iter.done(); iter++){ IntVector n = *iter; double dudx = (u[n+IntVector(1,0,0)] - u[n-IntVector(1,0,0)]) /(2.0 * dx.x()); double du = - u[n] * dt * (dudx); new_u[n]= u[n] + du; }

  10. ARCHES or WASATCH/NEBO xml Task Compile Run Time (each timestep) RUNTIME SYSTEM Calculate Residuals Solve Equations Parallel I/O Visus PIDX VisIt UINTAH ARCHITECTURE

  11. Uintah Distributed Task Graph 2 million tasks per timestep globally on 98K cores Tasks on local and neighboring patches Same code callback by each patch Variables in data warehouse(DW) Read - get() from OldDW and NewDW Write- put() to NewDW Communication along edges Although individual task graphs are quite “linear” per mesh patch they are offset when multiple patches execute per core 4 patches single level ICE task graph

  12. Material Point Method (MPM) 1 2 3 4 6 5 1. Particles with properties (velocity, mass etc) defined on a mesh 2. Particle properties mapped onto mesh 3. Forces, accelerations, velocities calculated on mesh points 4. Mesh point motion calculated 5.Only the particles moved by mapping velocities back to particles . Handles deformation, contact, high strain, fragmentation models solids MPM DAG

  13. Example Uintah Task from the ICE Algorithm Compute face-centered Velocities: Input variables Output variables (include boundary conditions)

  14. Task Graph Compiling

  15. Uintah Fluid-Structure Interaction Algorithm Interpolate Particle state to grid. MPM Compute the equilibrium pressure ICE Compute face centered velocities for the Eulerian advection ICE Compute sources of mass, momentum and energy as a result of phase changing chemical reactions, BOTH, Compute an estimate of the time advanced pressure, ICE Calculation of face Centered Pressure using a density weighted approach. ICE Material Stresses calculation MPM Compute Lagrangian phase quantities at cell centers ICE Calculate Momentum and heat exchange between materials BOTH Compute the evolution in specific volume due to the changes in temperature and pressure during the foregoing Lagrangian phase of the calculation ICE, Advect Fluids For the fluid phase. ICE Advect Solids For the solid phase, interpolate the time advanced grid velocity and the corresponding velocity increment back to the particles, and use these to advance the particle’s position and velocity, respectively.MPM ICE MPM [Guilkey Harman et al]

  16. ICE CODE Partial Ice task graph

More Related