Commit 1f5eec4c authored by snuverink_j's avatar snuverink_j
Browse files

small comment updates; ln has no -r option

parent 81cf84ad
......@@ -36,14 +36,14 @@ def getBaseName(inputfilePath): # EDIT: more flexible (can have several *.data f
sys.exit()
def printUsage(): #EDIT: reorder for readibility, add --filename and shortcuts
def printUsage():
print("./runOPAL.py [--help] [--filename=str] [--test] [--quiet] [--info=num] [--test] [--keep] [--queue=qname] [--hypert=num] [--nobatch] [ATTR=SCANVALUE] {[ATTR=VALUE]}")
print("")
print("--help prints this message")
print("--filename | -f=<str> sets base falie name for both *.data and *.tmpl")
print("--filename | -f=<str> sets base file name for both *.data and *.tmpl")
print("--test | -t does everything but submitting the job")
print("--keep | -k 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("--noopt ignore optimization template (if any) and perform regular simulation")
print("--quiet suppress debug printout")
print("--info | -i=<num> steers the std-output of OPAL. The range is 0 < num < 6 (default), from minimal to maximum output")
......@@ -56,7 +56,7 @@ def printUsage(): #EDIT: reorder for readibility, add --filename and shortcuts
print("Recognized environment variables: DISTRIBUTIONS, FIELDMAPS, OPTIMIZER, OPAL_EXE_PATH, TEMPLATES, QUEUE, RAM, TIME (deprecated SGE_)")
# temporary see issue #8
print("")
print("Important: runOPAL is currently not compatible with the commands OPTIMIZE and SAMPLE")
print("Important: runOPAL is currently not compatible with the command SAMPLE")
def checkCompat(tmplFile, incompatible): #NOTE: SAMPLE command not compatible with runOPAL (issue #8)
......@@ -64,7 +64,7 @@ def checkCompat(tmplFile, incompatible): #NOTE: SAMPLE command not compatible wi
for line in templateFile:
if line.startswith('//'):
continue
if any(command in line for command in incompatible):#'OPTIMIZE' in line or 'SAMPLE' in line:
if any(command in line for command in incompatible):
print(', '.join(incompatible)+' command(s) currently not compatible with runOPAL')
sys.exit()
templateFile.close()
......
......@@ -24,9 +24,9 @@ def linkDirectory(path, name=''):
sys.exit()
# lndir and if fails try cp
if os.system('lndir '+path) != 0:
print("lndir failed (possibly doesn't exist on this system), using ln -rs... \n"), #EDIT: '\n' added
print("lndir failed (possibly doesn't exist on this system), using cp -rs... \n"),
if os.listdir(path):
os.system('ln -rs '+path+'/* .') #EDIT: changed from cp to ln
os.system('cp -rs '+path+'/* .')
def linkFile(path, name): #EDIT: new helper function for convenience
'''Make a file available in working directory with a symbolic link'''
......
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