Skip to content
Snippets Groups Projects
Commit 1a2d9e51 authored by Martin Bauer's avatar Martin Bauer
Browse files

Shear Wave Scenario Updates

parent 36762591
No related branches found
No related tags found
No related merge requests found
...@@ -210,8 +210,8 @@ def readConfig(): ...@@ -210,8 +210,8 @@ def readConfig():
createFolder(configPath, True) createFolder(configPath, True)
json.dump(config, open(configPath, 'w'), indent=4) json.dump(config, open(configPath, 'w'), indent=4)
config['cache']['sharedLibrary'] = os.path.expanduser(config['cache']['sharedLibrary']) config['cache']['sharedLibrary'] = os.path.expanduser(config['cache']['sharedLibrary']).format(pid=os.getpid())
config['cache']['objectCache'] = os.path.expanduser(config['cache']['objectCache']) config['cache']['objectCache'] = os.path.expanduser(config['cache']['objectCache']).format(pid=os.getpid())
if config['cache']['clearCacheOnStart']: if config['cache']['clearCacheOnStart']:
shutil.rmtree(config['cache']['objectCache'], ignore_errors=True) shutil.rmtree(config['cache']['objectCache'], ignore_errors=True)
......
...@@ -139,7 +139,7 @@ def addOpenMP(astNode, schedule="static", numThreads=True): ...@@ -139,7 +139,7 @@ def addOpenMP(astNode, schedule="static", numThreads=True):
assert type(astNode) is ast.KernelFunction assert type(astNode) is ast.KernelFunction
body = astNode.body 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()) wrapperBlock = ast.PragmaBlock('#pragma omp parallel' + threadsClause, body.takeChildNodes())
body.append(wrapperBlock) body.append(wrapperBlock)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment