• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
2011.02.18   marco parenzan - case study. conversione di una applicazione fortran di dinamica molecolare - part ii
 

2011.02.18 marco parenzan - case study. conversione di una applicazione fortran di dinamica molecolare - part ii

on

  • 556 views

Fortran Molecular Dynamic Simulation code conversion in C#

Fortran Molecular Dynamic Simulation code conversion in C#

Statistics

Views

Total Views
556
Views on SlideShare
556
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    2011.02.18   marco parenzan - case study. conversione di una applicazione fortran di dinamica molecolare - part ii 2011.02.18 marco parenzan - case study. conversione di una applicazione fortran di dinamica molecolare - part ii Presentation Transcript

    • Case study: Conversione di una applicazione Fortran di dinamica molecolare – Part II
      Marco Parenzan
      GPU@UniTS
    • Source Conversionfrom Fortran to C#
      Marco Parenzan
      GPU@UniTS
    • Writing Good Code
      Marco Parenzan
      GPU@UniTS
    • The original code
      Original code can be downloaded from http://www.fisica.uniud.it/~ercolessi/md/f90/
      (C) 1995 Furio Ercolessi – SISSA
      Written in Fortran 90
      Details
      Typical imperative programming of the ‘80s
      Fortran primitives
      Vectors
      Float
      No object orientation
      Code + I/O + user interface mixed in code
      Single module
    • Problems...
      High Coupling
      No replace
      No Separation of concerns
      I/O (Data Access), Screen (Presentation), Calculation (Business Logic)
      Low reuse
      Big blocks of code
      Vertical, for specific use,
      Low maintability
      If I change something here, what happens there..?
    • What is New ?
      Team development
      Complex UI
      Data Access
      Relational Databases
      LAN, Internet, Networks
      Scaling (up and out)
      ...
    • GPUs....
      GPUs require a lot of preparation code
      GPUs preparation is a lot specific for the specific card
      A lot of Hardware
      Hardware change
      Separate code for specific hardware from generic, independent code
    • Modern Coding...
      Use Object Orientation
      Identify Concepts
      Model Concepts into Classes and instantiate them into Objects
      Organize Code
      Use modules (it depends on language of your choise)
      Organize modules in roles
      Roles
      What a module do?
      I/O
      Calculation
      Presentation
      They are called tiers, if you distribute roles in different machines
      Create libraries of reusable tools
      Use modern IDE and Development environments
    • Look at code
      Linguaggi di programmazione e compilatori per le GPU
    • CONCLUSIONS – part II
      Linguaggi di programmazione e compilatori per le GPU
    • Conclusions
      All of this are pre-requisites to good code development
      Objective
      Create good code
      Good code=Maintainable code
      Sunstainable Development
      Good code is a big candidate to be performant code
      If not, the process to become performant code is clean
      It’s not true about the opposite:
      Optimal code (for perfomance) probably is not maintainable code
      ...and it’s difficult to get back
      The money you save making simulation fast, you loose money in updating software
      What about our code?
    • Molecular simulation
      Our C# code is quite «elegant» code
      Good to maintain
      It’s easy to understand and to identify code to be ported to GPU
      Some extreme chooses (all is an object) are not the best for performances
      Again, best for maintainability
      GPU primitives are more confident to arrays that to objects
      But you still remain with the host code
      Probably the biggest part of the application (in terms of #lines of code)
      GPU is the best solution in performance
      But it’s not the only solution
      «ManyCore» and «Cloud», for example, are not GPU technologies
      They likes objects...
    • Links
      Marco Parenzan
      http://blog.codeisvalue.com/
      marco.parenzan@libero.it
      http://www.codeisvalue.com/
      @marco_parenzan
      http://www.slideshare.com/marco.parenzan
      http://www.facebook.com/parenzan.marco
      http://it.linkedin.com/in/marcoparenzan