AGENT SIMULATIONS ON GRAPHICS HARDWARE Timothy Johnson - Supervisor: Dr. John Rankin 1.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Speed, Accurate and Efficient way to identify the DNA.
GPU Virtualization Support in Cloud System Ching-Chi Lin Institute of Information Science, Academia Sinica Department of Computer Science and Information.
GPGPU Introduction Alan Gray EPCC The University of Edinburgh.
HPCC Mid-Morning Break High Performance Computing on a GPU cluster Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery.
PARALLEL PROCESSING COMPARATIVE STUDY 1. CONTEXT How to finish a work in short time???? Solution To use quicker worker. Inconvenient: The speed of worker.
Cyberinfrastructure for Scalable and High Performance Geospatial Computation Xuan Shi Graduate assistants supported by the CyberGIS grant Fei Ye (2011)
Acceleration of the Smith– Waterman algorithm using single and multiple graphics processors Author : Ali Khajeh-Saeed, Stephen Poole, J. Blair Perot. Publisher:
GPU Computing with CUDA as a focus Christie Donovan.
2009/04/07 Yun-Yang Ma.  Overview  What is CUDA ◦ Architecture ◦ Programming Model ◦ Memory Model  H.264 Motion Estimation on CUDA ◦ Method ◦ Experimental.
The PTX GPU Assembly Simulator and Interpreter N.M. Stiffler Zheming Jin Ibrahim Savran.
CS 732: Advance Machine Learning Usman Roshan Department of Computer Science NJIT.
Accelerating Machine Learning Applications on Graphics Processors Narayanan Sundaram and Bryan Catanzaro Presented by Narayanan Sundaram.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
To GPU Synchronize or Not GPU Synchronize? Wu-chun Feng and Shucai Xiao Department of Computer Science, Department of Electrical and Computer Engineering,
1 1 © 2011 The MathWorks, Inc. Accelerating Bit Error Rate Simulation in MATLAB using Graphics Processors James Lebak Brian Fanous Nick Moore High-Performance.
OpenSSL acceleration using Graphics Processing Units
Synergy.cs.vt.edu Power and Performance Characterization of Computational Kernels on the GPU Yang Jiao, Heshan Lin, Pavan Balaji (ANL), Wu-chun Feng.
HPCC Mid-Morning Break Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery Introduction to the new GPU (GFX) cluster.
SCHOOL OF COMPUTING QUEEN’S UNIVERSITY 08/03/2013 Andrew Forward, Omar Badreddin, Timothy C. Lethbridge, and Julian Solano School of Electrical Engineering.
Accelerating SQL Database Operations on a GPU with CUDA Peter Bakkum & Kevin Skadron The University of Virginia GPGPU-3 Presentation March 14, 2010.
Operating systems CHAPTER 7.
Training Program on GPU Programming with CUDA 31 st July, 7 th Aug, 14 th Aug 2011 CUDA Teaching UoM.
Chapter 2 Computer Clusters Lecture 2.3 GPU Clusters for Massive Paralelism.
David Luebke NVIDIA Research GPU Computing: The Democratization of Parallel Computing.
SOLAR THERMAL PLANT DESIGN AND OPERATION SUITE OF TOOLS COMPUTATION USING OPENCL Instructor: Dr.Perez Davila 1.
Computer Graphics Graphics Hardware
BY: ALI AJORIAN ISFAHAN UNIVERSITY OF TECHNOLOGY 2012 GPU Architecture 1.
SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING | GEORGIA INSTITUTE OF TECHNOLOGY Accelerating Simulation of Agent-Based Models on Heterogeneous Architectures.
Implementation of Parallel Processing Techniques on Graphical Processing Units Brad Baker, Wayne Haney, Dr. Charles Choi.
Classification of Computers
By Arun Bhandari Course: HPC Date: 01/28/12. GPU (Graphics Processing Unit) High performance many core processors Only used to accelerate certain parts.
© David Kirk/NVIDIA and Wen-mei W. Hwu, 1 Programming Massively Parallel Processors Lecture Slides for Chapter 1: Introduction.
Instructor Notes GPU debugging is still immature, but being improved daily. You should definitely check to see the latest options available before giving.
1 Advanced topics in OpenCIM 1.CIM: The need and the solution.CIM: The need and the solution. 2.Architecture overview.Architecture overview. 3.How Open.
GPU in HPC Scott A. Friedman ATS Research Computing Technologies.
YOU LI SUPERVISOR: DR. CHU XIAOWEN CO-SUPERVISOR: PROF. LIU JIMING THURSDAY, MARCH 11, 2010 Speeding up k-Means by GPUs 1.
Diane Marinkas CDA 6938 April 30, Outline Motivation Algorithm CPU Implementation GPU Implementation Performance Lessons Learned Future Work.
Computational Biology 2008 Advisor: Dr. Alon Korngreen Eitan Hasid Assaf Ben-Zaken.
Fast Support Vector Machine Training and Classification on Graphics Processors Bryan Catanzaro Narayanan Sundaram Kurt Keutzer Parallel Computing Laboratory,
GPU Architecture and Programming
- DHRUVA TIRUMALA BUKKAPATNAM Geant4 Geometry on a GPU.
MIS 105 LECTURE 1 INTRODUCTION TO COMPUTER HARDWARE CHAPTER REFERENCE- CHP. 1.
Jie Chen. 30 Multi-Processors each contains 8 cores at 1.4 GHz 4GB GDDR3 memory offers ~100GB/s memory bandwidth.
GPUs: Overview of Architecture and Programming Options Lee Barford firstname dot lastname at gmail dot com.
OpenCL Programming James Perry EPCC The University of Edinburgh.
By Dirk Hekhuis Advisors Dr. Greg Wolffe Dr. Christian Trefftz.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
The Effects of Parallel Programming on Gaming Anthony Waterman.
Rational Unified Process Fundamentals Module 4: Core Workflows II - Concepts Rational Unified Process Fundamentals Module 4: Core Workflows II - Concepts.
An Overview of the AgentCubes Web API Scott Keller Erin Rowland Stuart Reed Michael Wally George McCabe dy· na· mo: (n.) A generator 1Erin Rowland.
Introduction to CUDA CAP 4730 Spring 2012 Tushar Athawale.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408/CS483, University of Illinois, Urbana-Champaign 1 Graphic Processing Processors (GPUs) Parallel.
Sunpyo Hong, Hyesoon Kim
GFlow: Towards GPU-based High- Performance Table Matching in OpenFlow Switches Author : Kun Qiu, Zhe Chen, Yang Chen, Jin Zhao, Xin Wang Publisher : Information.
3/12/2013Computer Engg, IIT(BHU)1 CUDA-3. GPGPU ● General Purpose computation using GPU in applications other than 3D graphics – GPU accelerates critical.
My Coordinates Office EM G.27 contact time:
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
Heterogeneous Processing KYLE ADAMSKI. Overview What is heterogeneous processing? Why it is necessary Issues with heterogeneity CPU’s vs. GPU’s Heterogeneous.
Matthew Royle Supervisor: Prof Shaun Bangay.  How do we implement OpenCL for CPUs  Differences in parallel architectures  Is our CPU implementation.
Computer Graphics Graphics Hardware
Enabling machine learning in embedded systems
Graphics Processing Unit
Processing Framework Sytse van Geldermalsen
Implementation of Efficient Check-pointing and Restart on CPU - GPU
Computer Graphics Graphics Hardware
CSE 502: Computer Architecture
Multicore and GPU Programming
Presentation transcript:

AGENT SIMULATIONS ON GRAPHICS HARDWARE Timothy Johnson - Supervisor: Dr. John Rankin 1

OUTLINE  Agent Simulations  Graphics Hardware  System  Model  Planning  Code Generation  Simulation  Analysis  Examples  Performance 2

AGENT SIMULATIONS  Simulations with hundreds or thousands of software agents  Agent-based simulations are becoming increasingly more popular [1]  Each entity simulated at the individual microscopic level  Emergence of interesting complex behaviour at the macroscopic level  Fields: air traffic control, disaster management, biology, crime analysis, economics, pedestrian dynamics, military simulations, etc  Problems  Expensive and time consuming to develop  Limited in scope by available processing power 3

GRAPHICS HARDWARE  Graphical Processing Units (GPUs) are outstripping Central Processing Units (CPUs) in terms of raw performance [2]  Performance gap continuing to widen  Example  Intel Core i7-4930K [$679][187.2 GFLOPS]  NVIDIA GTX 780 [$639][3977 GFLOPS]  Programming Difficulties  Dealing with hundreds or thousands of cores and threads  Data synchronisation  Memory architecture  Data transfer between CPU and GPU  Shortage of high quality learning resources Prices retrieved from pccasegear.com on 04/11/2013 4

IDEA  Increase processing power, allowing more agents to be simulated than previously possible  Make a system that does not require the user to perform GPU programming 5

SYSTEM OVERVIEW Model Code Generation Planning Simulation Analysis 6

SYSTEM OVERVIEW Model Code Generation Planning Simulation Analysis 7

MODEL 8

 Resources – Items agents interact with  Apple, Bread, Car, Gold, Water  Attributes – Represent aspects of agents  Age, Height, Health, Hunger, Energy  Rules – Specify how an agent can interact with the world  Move, Use, Harvest, Trade, Combine  Goals – Define the agent’s behaviour during simulation  Maximize Attributes, Maximize Resources  Agent Types – Built up with Attributes, Rules and Goals  Farmer, Duck, Bee, Policeman  Communities – Consists of one or more Agent Types  Town, Beehive, Sports team 9

MODEL: DUCK SIMULATION  Resources  Bugs  Bread  Attributes  Hunger  Rules  Use (Bread, Hunger, -5)  Use (Bugs, Hunger, -3)  Harvest (Bread)  Harvest (Bugs)  Goals  Minimize Attribute (Hunger) 10

SYSTEM OVERVIEW Model Code Generation Planning Simulation Analysis 11

PLANNING  User enters resources, attributes, rules, goals, agents, communities into our tool  System then automatically links goals and rules to create plans Goal One Rule One Rule Two Rule Three 12

PLANNING: DUCK SIMULATION 13

PLANNING: DUCK SIMULATION Goal Minimize Attribute (Hunger) Goal Minimize Attribute (Hunger) Rule Harvest (Bread) Rule Harvest (Bread) Rule Harvest (Bugs) Rule Harvest (Bugs) Rule Use (Bread, Hunger, -5) Rule Use (Bread, Hunger, -5) Rule Use (Bugs, Hunger, -3) Rule Use (Bugs, Hunger, -3) 14

SYSTEM OVERVIEW Model Code Generation Planning Simulation Analysis 15

CODE GENERATION  OpenCL code kernels are created for each agent type defined  OpenCL is programmed through a subset of C with its own extensions  Can run on both NVIDIA and AMD GPUs  Algorithm  For each agent type  Create a new kernel  Prepare some initial definitions and kernel arguments  Iterate through each plan created in the previous stage  Generate segments of code for each rule in each plan  By automatically generated optimised code, we manage to hide the difficulties of GPGPU from the user 16

CODE GENERATION: DUCK SIMULATION Goal Minimize Attribute (Hunger) Goal Minimize Attribute (Hunger) Rule Harvest (Bread) Rule Harvest (Bread) Rule Harvest (Bugs) Rule Harvest (Bugs) Rule Use (Bread, Hunger, -5) Rule Use (Bread, Hunger, -5) Rule Use (Bugs, Hunger, -3) Rule Use (Bugs, Hunger, -3) 17

SYSTEM OVERVIEW Model Code Generation Planning Simulation Analysis 18

SIMULATION  Code kernels are compiled  Data is generated on the CPU  Data is transferred across to GPU memory  Each agent to be simulated is assigned its own thread  Simulation begins to run 19

SIMULATION: DUCK SIMULATION 20

SIMULATION: DUCK SIMULATION Yellow = Ducks, Green = Bugs, Blue = Bread 21

SYSTEM OVERVIEW Model Code Generation Planning Simulation Analysis 22

ANALYSIS  All data from the simulation, including agent positions, attribute values, resource values, plans chosen, etc can be output to file during runtime  After the simulation run has completed, this data can then be analysed externally by other tools 23

ANALYSIS: DUCK SIMULATION 24

SCENARIOS Farming Simulation [3] Bee Simulation [4] Factory Simulation 25

PERFORMANCE TESTING  Two versions of the “Farming Simulation” created  GPU version using our system  Custom CPU-optimised version  Tests carried out on four GPUs and four CPUs  Two laptop machines and two desktop machines  Millisecond per update and frame rates were calculated  Testing found modern GPUs are faster than CPUs in most cases 26

SYSTEM PERFORMANCE 27

BEYOND SIMULATIONS  Movies  Games  Advertisements 28

QUESTIONS? Timothy Johnson - Supervisor: Dr. John Rankin References: [1] Chan, W. K. V., Son Y. J., Macal, C. M., Agent-based simulation tutorial - simulation of emergent behavior and differences between agent-based simulation and discrete-event simulation, In Proceedings of the Winter Simulation Conference, WSC '10, , [2] Luebke, D., Humphreys, G., How GPUs Work, Computer, 40 (2), , [3] Johnson, T. W. C., Rankin, J. R., Parallel Agent Systems on a GPU for use with Simulations and Games, In Proceedings of the 1st International Conference on Computing, Information Systems and Communications, CISCO '01, , [4] Johnson, T. W. C., Rankin, J. R., User Friendly Agent-Oriented Simulation Builder, In Proceedings of the 8th International Conference on Information Technology and Applications, ICITA '08,