Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage OAR jobs asynchronously #12

Open
pmorillon opened this issue Oct 12, 2014 · 0 comments
Open

Manage OAR jobs asynchronously #12

pmorillon opened this issue Oct 12, 2014 · 0 comments

Comments

@pmorillon
Copy link
Owner

When we define a lot of jobs, like this :

# Define OAR jobs for each clusters
#
sites.each do |site|
  next if %w{ grenoble }.include? site['uid']
  logger.info "Site #{site['uid']}"
  site['clusters'].each do |cluster|
    starttime = Time.now
    next if %w{ sagittaire }.include? cluster
    job = {
      :site      => site['uid'],
      :queue     => "besteffort",
      :name      => "lstopo on #{cluster}",
      :resources => %{{cluster='#{cluster}'}/cpu=1/core=2},
      :walltime  => "00:05:00",
      :command   => "lstopo",
      :stdout    => "OAR_lstopo_#{cluster}_%jobid%.txt"
    }
    xp.define_job job
    logger.info "Cluster #{cluster} - #{Time.now - starttime}s"
  end
end

It can take a long time :

grid5000-xp-lstopo|⇒ cap oar:status
 ** Site lille
 ** Cluster chimint - 13.487054s
 ** Cluster chinqchint - 1.442277s
 ** Cluster chirloute - 1.105555s
 ** Site luxembourg
 ** Cluster granduc - 1.151326s
 ** Cluster petitprince - 0.613598s
 ** Site lyon
 ** Cluster hercule - 7.251447s
 ** Cluster orion - 1.121573s
 ** Cluster taurus - 0.768739s
 ** Site nancy
 ** Cluster graphene - 2.363813s
 ** Cluster graphite - 0.678187s
 ** Cluster griffon - 0.707291s
 ** Site nantes
 ** Cluster econome - 0.906521s
 ** Site reims
 ** Cluster stremi - 2.474238s
 ** Site rennes
 ** Cluster paranoia - 1.607192s
 ** Cluster parapide - 0.742778s
 ** Cluster parapluie - 0.646265s
 ** Site sophia
 ** Cluster sol - 2.382062s
 ** Cluster suno - 0.666874s
 ** Site toulouse
 ** Cluster pastel - 2.034113s
  * 2014-10-12 16:29:35 executing `oar:status'
 ** Job "lstopo on chimint" 1484992@lille status : terminated
 ** Job "lstopo on chinqchint" 1484993@lille status : terminated
 ** Job "lstopo on chirloute" 1484994@lille status : terminated
 ** Job "lstopo on granduc" 51505@luxembourg status : terminated
 ** Job "lstopo on petitprince" 51506@luxembourg status : terminated
 ** Job "lstopo on hercule" 730275@lyon status : terminated
 ** Job "lstopo on orion" 730276@lyon status : terminated
 ** Job "lstopo on taurus" 730277@lyon status : terminated
 ** Job "lstopo on graphene" 595946@nancy status : terminated
 ** Job "lstopo on graphite" 595947@nancy status : terminated
 ** Job "lstopo on griffon" 595948@nancy status : terminated
 ** Job "lstopo on econome" 2460@nantes status : terminated
 ** Job "lstopo on stremi" 170531@reims status : terminated
 ** Job "lstopo on paranoia" 694400@rennes status : terminated
 ** Job "lstopo on parapide" 694401@rennes status : terminated
 ** Job "lstopo on parapluie" 694402@rennes status : terminated
 ** Job "lstopo on sol" 704188@sophia status : terminated
 ** Job "lstopo on suno" 704189@sophia status : terminated
 ** Job "lstopo on pastel" 421545@toulouse status : terminated

Would be better to define jobs asynchronously...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant