Created
September 9, 2011 09:14
-
-
Save priteau/1205814 to your computer and use it in GitHub Desktop.
Compute the number of cores on Grid'5000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'restfully' | |
| grid = Restfully::Session.new(:base_uri => 'https://api.grid5000.fr/sid/grid5000').root | |
| ncores = grid.sites.inject(0) do |sum, s| | |
| sum + s.clusters.inject(0) do |sum, c| | |
| sum + (c.nodes.first['architecture']['smt_size'] * c.nodes.length) | |
| end | |
| end | |
| puts ncores |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment