Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Sumatra and git


Published on

Sumatra is a System Management Tool to keep track of your simulation results. Now it has also git support.

Published in: Education
  • Be the first to comment

  • Be the first to like this

Sumatra and git

  1. 1. Sumatra: an electronic labook. Git it right Michele Mattioni Computational Neurobiology group EBI is an Outstation of the European Molecular Biology Laboratory.
  2. 2. Open questions which I had no answer: • Where are my results? • Which parameters I used on that simulation? • Which one was that simulation? • Why it worked yesterday and not today? From Valerie Everett's photostream • At exactly which point it worked yesterday? • Where is my mind stuff?
  3. 3. How the experimental people solve that? • Write down on a labbook everything they do : • reagents • times • protocols why! • • what worked, what didn't • ... Marcin Wichary's photostream
  4. 4. We need an electronic labbook • Able to track (automatically) our 'experiments' details: • script launched • parameters used • reason • outcome • But we can also: • search them • organize them • Rerun them!
  5. 5. Say hello to Sumatra Slide from Andrew Davison (main developer),
  6. 6. Sumatra: what I need to use it • Code under version control • Accepted version control: • Mercurial (hg) • Subversion (svn) • Git (git) (I patched it! Power of the opensource..) • your choice (exstensible architeture) • Scripts organized as Main class and parameter_file
  7. 7. smt Usage $ cd myproject $ smt init MyProject Normal way you launched the script: $ python default.param New way using Sumatra: $ smt run ­­simulator=python ­­ default.param
  8. 8. Shorter cmdline to launch the job From $ smt run ­­simulator=python ­­ default.param Configure it (it has to be done once.) $ smt configure ­­simulator=python ­­ To $ smt run default.param
  9. 9. What if I use java? $ java main default.param $ smt run ­­simulator=java ­­main=main default.param
  10. 10. Parameter file? Excuse me? Basically a name <-> parameter pair dt = 0.05 # Dt for the integration tstop = 10 # [ms] Not obligatory, but it's very handy because: • Sumatra can store your parameters in the record • If Sumatra understand them then You can change parameter on the fly $ smt run default.param tstop=20 dt=0.01
  11. 11. Where is my stuff? smt monitor a directory (default Data). • Any new file/image saved there is automatically added to the simulation record You save the results Sumatra remembers where is it My way: I create a dir for each day and then save all my stuff in dedicated folder • Data/19­04­2010/Sim_1/, Data/19­04­2010/Sim_2/ • Data/20­04­2010/Sim_1/, Data20­04­2010/Sim_2/
  12. 12. Access the results: smt $ smt list  default_20100407­163228 default_20100407­171249 $ smt list ­l  Label        : default_20100420­170241 Reason       : Testing the tagging from the cmdline Outcome      : It works! Duration     : 4.38211798668 Repository   : GitRepository at  /home/mattions/Work/model/MSN/TimeScales Main_File    : Version      : 8a61ecdd999e30d25c29620a87d9f4536aa67e9e Executable   : Python (version: 2.6.4) at /usr/bin/python Timestamp    : 2010­04­20 17:02:41.445588 Tags         : test, test2
  13. 13. Access the results: smtweb
  14. 14. Access the results: smtweb
  15. 15. Accessing the plot from the link
  16. 16. How to install ATM: Git support only available from the latest code: hg clone git clone
  17. 17. How sumatra saved the day (yesterday) Scenario: • Made some massive restructuring/refactoring on neuronvisio • Get lost on the way • Nothing worked anymore. But ...
  18. 18. Searched the last simulation where it worked
  19. 19. Selected the latest working, and neuronvisio ver.
  20. 20. Find that commit on neuronvisio repo
  21. 21. Branched it
  22. 22. Merged restart back into master kind of apply twice the same patch, but you know it was worth it.
  23. 23. Summary • Sumatra can help you to: • keep your stuff organized • not lose your work • speed up the recovery time when somethig get wrong • remember what you used ages ago, to make that figure • be more focus on your science. • You can help sumatra • Using it • Asking for request (ok, send a patch. It's quicker and easier)
  24. 24. Acknowledgement • Andrew Davison (main sumatra developer) • people got the picture from (link on each picture) • Nicolas Le Novère (to let me work on this) • Computational Neurobiology group @ EBI.
  25. 25. Got questions?