Skip to content
Snippets Groups Projects
Commit de0f5545 authored by Franck Dary's avatar Franck Dary
Browse files

Added oar to launchers in launchBatches.sh

parent a6324449
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,10 @@ def prepareExperiment(lang, template, expName) :
def launchTrain(mode, expName, arguments, launcher) :
if launcher == "bash" :
launchTrainBash(mode, expName, arguments)
elif launcher == "oar" :
launchTrainOar(mode, expName, arguments)
else :
printUsageAndExit()
###############################################################################
###############################################################################
......@@ -30,10 +34,30 @@ def launchTrainBash(mode, expName, arguments) :
shell=True, stdout=open("%s.stdout"%expName,'w'), stderr=open("%s.stderr"%expName,'w'))
###############################################################################
###############################################################################
def launchTrainOar(mode, expName, arguments) :
devScore = "--devScore"
command = "oarsub"
command += " -t besteffort"
command += " -n train:%s"%expName
command += " -E %s.stderr"%expName
command += " -O %s.stdout"%expName
command += " -p \"gpu IS NOT NULL\""
command += " -l walltime=96:00:00"
command += " \"" + "./train.sh %s bin/%s %s --silent %s"%(mode,expName,arguments,devScore) + "\""
os.system(command)
###############################################################################
###############################################################################
def launchEval(mode, expName, launcher) :
if launcher == "bash" :
launchEvalBash(mode, expName)
elif launcher == "oar" :
launchEvalOar(mode, expName)
else :
printUsageAndExit()
###############################################################################
###############################################################################
......@@ -42,6 +66,20 @@ def launchEvalBash(mode, expName) :
shell=True, stdout=open("%s.stdout"%expName,'a'), stderr=open("%s.stderr"%expName,'a'))
###############################################################################
###############################################################################
def launchEvalOar(mode, expName) :
command = "oarsub"
command += " -t besteffort"
command += " -n eval:%s"%expName
command += " -E %s.stderr"%expName
command += " -O %s.stdout"%expName
command += " -p \"gpu IS NOT NULL\""
command += " -l walltime=2:00:00"
command += " \"" + "./evaluate.sh %s bin/%s --silent"%(mode,expName) + "\""
os.system(command)
###############################################################################
###############################################################################
if __name__ == "__main__" :
if len(sys.argv) != 4 :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment