Commit 74f4022d authored by snuverink_j's avatar snuverink_j
Browse files

clean imports; fix help; less verbose

parent b311b099
...@@ -9,9 +9,8 @@ Script that launches OPAL simulations ...@@ -9,9 +9,8 @@ Script that launches OPAL simulations
""" """
import sys,re,os,string,fileinput,shutil,glob import sys,os,shutil,glob
import commands import commands
import subprocess
from simulation import Simulation from simulation import Simulation
from runoptpilot import Runoptpilot from runoptpilot import Runoptpilot
...@@ -58,7 +57,7 @@ def printUsage(): ...@@ -58,7 +57,7 @@ def printUsage():
print "--test does everything but submitting the job" print "--test does everything but submitting the job"
print "--keep if same simulation has been run before, keep old data and abort" print "--keep if same simulation has been run before, keep old data and abort"
print "--nobatch run opal locally not using the batch system and waits until the job is done" print "--nobatch run opal locally not using the batch system and waits until the job is done"
print "--optPilot run optPilot (at the moment with default MOGA settings on host merlinl01.psi.ch)" print "--optPilot run optPilot (at the moment with default MOGA settings on host merlin-l-01.psi.ch)"
print "--info=<num> steers the std-output of OPAL. The range is 0 < num < 6 (default), from minimal to maximum output" print "--info=<num> steers the std-output of OPAL. The range is 0 < num < 6 (default), from minimal to maximum output"
print "--queue=<qname> defines in which queue the job goes. Overwrites QUEUE (deprecated SGE_QUEUE)" print "--queue=<qname> defines in which queue the job goes. Overwrites QUEUE (deprecated SGE_QUEUE)"
print "--hypert=<num> defines the number of Hyper-Threads used. Default 0" print "--hypert=<num> defines the number of Hyper-Threads used. Default 0"
......
...@@ -6,8 +6,7 @@ Simulation class handles batch job related things ...@@ -6,8 +6,7 @@ Simulation class handles batch job related things
@version: 0.1 @version: 0.1
""" """
import sys,re,os,string,fileinput,shutil,glob,commands import sys,os,shutil,commands
import time
class Simulation: class Simulation:
...@@ -70,7 +69,7 @@ class Simulation: ...@@ -70,7 +69,7 @@ class Simulation:
if os.system('lndir ' + fieldmapPath) != 0: if os.system('lndir ' + fieldmapPath) != 0:
print("lndir failed (possibly doesn't exist on this system), using cp -rs..."), #print("lndir failed (possibly doesn't exist on this system), using cp -rs..."),
if os.listdir(fieldmapPath): if os.listdir(fieldmapPath):
os.system('cp -rs ' + fieldmapPath + '/* .') os.system('cp -rs ' + fieldmapPath + '/* .')
...@@ -79,7 +78,7 @@ class Simulation: ...@@ -79,7 +78,7 @@ class Simulation:
distributionPath = os.environ.get('DISTRIBUTIONS') distributionPath = os.environ.get('DISTRIBUTIONS')
if os.path.isdir(distributionPath): if os.path.isdir(distributionPath):
if os.system('lndir ' + distributionPath) != 0: if os.system('lndir ' + distributionPath) != 0:
print("lndir failed (possibly doesn't exist on this system), using cp -rs..."), #print("lndir failed (possibly doesn't exist on this system), using cp -rs..."),
if os.listdir(distributionPath): if os.listdir(distributionPath):
os.system('cp -rs ' + distributionPath + '/* .') os.system('cp -rs ' + distributionPath + '/* .')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment