1 / 33

Efficient Memory and Calculation Resource Management for Multi-Agent Systems on Parallel Architectures with OpenCL

This paper presents a hybrid approach for a virtual biology multi-agent system, focusing on interaction between virtual cells and molecules. The implementation involves tissue morphogenesis and virtual growth, along with parallel implementation using OpenCL and a multi-agent system. It discusses methodologies to obtain new IDs for virtual cell instances and presents a proposed solution using atomic increments. The text emphasizes the importance of efficient memory management on parallel hardware and devices.

ericap
Download Presentation

Efficient Memory and Calculation Resource Management for Multi-Agent Systems on Parallel Architectures with OpenCL

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.

E N D

Presentation Transcript


  1. Gestionefficacedes ressourcesmémoire et de calculpour l’exécution desystème multi-agentssur architectures parallèlesavec OpenCL Lab-STICC, UMR 6285, CNRS, Dépt Informatique, Université de Brest Anne Jeannin-Girardon, Vincent Rodin Compas’2016, vincent.rodin@univ-brest.fr

  2. Lab-STICC, CID, IHSEV Virtual Reality  Virtual Biology Multi-Agent System approach Interaction betweenvirtualcellsand/or molecules

  3. Context (1/3)

  4. Context (2/3) Our approachishybrid • population level • (Molecular Virtual Chemistry) • individuallevel • (Virtual Cells)

  5. Context (3/3) From a computational point of view, the workpresentedtodayis an improvement of • Anne Jeannin-GirardonPh.Dthesis, 2014 • Anne Jeannin-Girardon et al, IEEE/ACM Transaction on ComputationalBiology and Bioinformatics, 2015

  6. Introduction • Morphogenesis & Dynamicity • Virtual Biological Model •  Virtual Cell, Molecular Virtual Chemistry, Virtual Growth • Parallelimplementation • OpenCL, model coupledwith a MAS • How to get a new Id for a new Virtual Cell? • Results Outline

  7. Tissue morphogenesis: Introduction (1/1) Tissularlevel processes • Is a multi-scalephenomenon • Can beaddressedthrough • continuous & discretemodels • Involvesmany of interacting • entities (cells, molecules, etc.) • Impliesbirth and death of cells • dynamicity Macroscopic scale Cell/Cell & cell/ECM interactions Mesoscopic scale Sub-cellular/ molecularprocesses Microscopic scale

  8. Virtual Cell • Structure: mass/spring system • n+1 nodes • membrane, cytoskeleton, cortex • celldeformation Virtual Biological Model (1/3) • Mitose • orientatedmitosis • given an axis • Celladhesion/repulsion • differential interaction

  9. Molecular Virtual Chemistry Molecularlevelmodelled with diffusion/reactionequations δi(x,t) δt DiΔi(x,t) – Ri(x,t) = Virtual Biological Model (2/3) • Set of molecules. Ex: {A, B,C} • Set of reactions. Ex: {2A + B  C} • Set of 2D discretelayers. • One grid layer per molecule type • Equations solved in 2 steps: • 1) diffusion • 2) reaction

  10. Virtual Growth produces Virtual Biological Model (3/3) consumes A TA TB B TD Dynamicity D TC C

  11. Hey Vincent, do you know thatyou are not in a bioinformaticsconferencetoday?

  12. Parallel hardware and device are everywhere • Parallelprograminggetseasier • Numerousparallelframeworks are available Parallelimplementation (1/2) • Our model seemswelladapted to parallelimplementation • Wechoose to use the OpenCLframeworkto implementit • wecan use CPUs, GPUs, FPGAs, etc.

  13. Fine grainedimplementation: a cell = an OpenCLcore • model coupledwith a Multi-Agent System Parallelimplementation (2/2) Kernel k1: computes forces Kernel k2: integrates forces (Euler method) • Data storedinto structures of arrays: nodes, etc. • adapted data structure for OpenCL: a cell = an id • Question: How to find a new Id for a new Virtual Cell?

  14. N (± 106) Virtual Cells : structures of arrays How to get a new Id ? (1/3) 0 1 2 N-1 Active or Inactive Node 0 Node 1 Node 5 Node C Etc. At the beginning of the simulation… easy!

  15. N (± 106) Virtual Cells : structures of arrays How to get a new Id ? (1/3) 0 1 2 N-1 Active or Inactive Node 0 Node 1 Node 5 Node C Etc. Afterbirths and deaths….?

  16. Somepreviousworks (1): [Lysenko & D’Souza, 2008] 0 1 2 N-1 How to get a new Id ? (2/3) Active or Inactive Attributes A stochasticmethod: A randomchoisehappens… …until an inactive elementisobtained! Main drawback: What appends if the memoryisnearly full?

  17. Somepreviousworks (2): [Jeannin-Girardon, Ph.D, 2014] [Jeannin-Girardon et al, TCBB, 2015] 0 1 2 N-1 How to get a new Id ? (2/3) Active or Inactive Attributes A hybridmethod: Dynamicswitch : StochasticMethod & Parallel Sort

  18. Somepreviousworks (2): [Jeannin-Girardon, Ph.D, 2014] [Jeannin-Girardon et al, TCBB, 2015] 0 1 2 N-1 0 1 2 N-1 How to get a new Id ? (2/3) Active or Inactive Attributes A hybridmethod: Dynamicswitch : StochasticMethod & Parallel Sort Main drawbacks: - How to choose the thresholds to switch? - Parallel sort… data transfers

  19. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation 0 1 2 3 … … … … … … … … N-1 Deallocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  20. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 1 2 3 … … … … … … … … N-1 Deallocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  21. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 -1 2 3 … … … … … … … … N-1 Deallocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  22. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 -1 -1 3 … … … … … … … … N-1 Deallocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  23. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 -1 -1 3 … … … … … … … … N-1 Deallocation 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  24. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 -1 -1 3 … … … … … … … … N-1 Deallocation 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  25. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 -1 -1 3 … … … … … … … … N-1 Deallocation 1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  26. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation -1 -1 -1 3 … … … … … … … … N-1 Deallocation 1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  27. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 SWAP Allocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 Deallocation 1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  28. Our proposition (1): [Jeannin-Girardon et al, Compas, 2016] 0 1 2 N-1 How to get a new Id ? (3/3) Active or Inactive Attributes Available Indexes are stored in two buffers & atomic_inc PtrAllocation 0 1 2 N-1 Allocation 1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 Deallocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  29. Our proposition (2): [Jeannin-Girardon et al, Compas, 2016] res = atomic_inc(var):OpenCLatomicoperation tmp=var; var++; return tmp How to get a new Id ? (3/3) Deallocation: Ptr = atomic_inc(PtrDeallocation) Desallocation[Ptr] = Id Allocation: Ptr = atomic_inc(PtrAllocation) If Ptr < N and Allocation[Ptr] != -1 Then Id = Allocation[Ptr] Allocation[Ptr] = -1 Return Id Endif PtrAllocation 0 1 2 N-1 Allocation 1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 Deallocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrDeallocation

  30. Our proposition (3): [Jeannin-Girardon et al, Compas, 2016] Swap conditions: PtrAllocation How to get a new Id ? (3/3) 0 1 2 N-1 SWAP Allocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 Deallocation 1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 PtrAllocation 0 1 2 N-1 Allocation -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 SWAP Deallocation 3 5 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1

  31. Prey-Predator model Results: Prey-Predator model (1/2) High dynamicity…

  32. Results: Prey-Predator model (2/2) Hybridmethod Double buffer method

  33. Questions ?

More Related