Commit 1a2d9e51 authored by Martin Bauer's avatar Martin Bauer
Browse files

Shear Wave Scenario Updates

parent 36762591
......@@ -210,8 +210,8 @@ def readConfig():
createFolder(configPath, True)
json.dump(config, open(configPath, 'w'), indent=4)
config['cache']['sharedLibrary'] = os.path.expanduser(config['cache']['sharedLibrary'])
config['cache']['objectCache'] = os.path.expanduser(config['cache']['objectCache'])
config['cache']['sharedLibrary'] = os.path.expanduser(config['cache']['sharedLibrary']).format(pid=os.getpid())
config['cache']['objectCache'] = os.path.expanduser(config['cache']['objectCache']).format(pid=os.getpid())
if config['cache']['clearCacheOnStart']:
shutil.rmtree(config['cache']['objectCache'], ignore_errors=True)
......
......@@ -139,7 +139,7 @@ def addOpenMP(astNode, schedule="static", numThreads=True):
assert type(astNode) is ast.KernelFunction
body = astNode.body
threadsClause = "" if numThreads else " num_threads(%s)" % (numThreads,)
threadsClause = "" if numThreads and isinstance(numThreads,bool) else " num_threads(%s)" % (numThreads,)
wrapperBlock = ast.PragmaBlock('#pragma omp parallel' + threadsClause, body.takeChildNodes())
body.append(wrapperBlock)
......
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