Skip to content
Snippets Groups Projects
Commit 986b39da authored by Frederik Zahle's avatar Frederik Zahle
Browse files

Merge branch 'ClarifyScreenOutput' into 'master'

Added flush statements and clarified restart comments

See merge request !7
parents 90227df8 47805522
No related branches found
No related tags found
1 merge request!7Added flush statements and clarified restart comments
Pipeline #
...@@ -12,7 +12,6 @@ import pkg_resources ...@@ -12,7 +12,6 @@ import pkg_resources
from ellipsyswrapper.ellipsys_output import EllipSys1DOutput,EllipSys2DOutput, EllipSys3DOutput from ellipsyswrapper.ellipsys_output import EllipSys1DOutput,EllipSys2DOutput, EllipSys3DOutput
from ellipsyswrapper.ellipsys_input import read_ellipsys_input from ellipsyswrapper.ellipsys_input import read_ellipsys_input
class CaseRunner(object): class CaseRunner(object):
def __init__(self, kwargs): def __init__(self, kwargs):
...@@ -94,10 +93,11 @@ class CaseRunner(object): ...@@ -94,10 +93,11 @@ class CaseRunner(object):
if self.auxilaryfiles: if self.auxilaryfiles:
for filename in self.auxilaryfiles: for filename in self.auxilaryfiles:
os.system('ln -s ../../../'+self.directory+'/'+filename+' .') os.system('ln -s ../../../'+self.directory+'/'+filename+' .')
sys.stdout.flush()
self._run('output') self._run('output')
if self.test_restart: if self.test_restart:
print 'test restart' print '### case '+self.casename+': test restart from coarse grid level'
# remove output files # remove output files
files = ['grid.%iforce', files = ['grid.%iforce',
'grid.%ipoints', 'grid.%ipoints',
...@@ -131,9 +131,10 @@ class CaseRunner(object): ...@@ -131,9 +131,10 @@ class CaseRunner(object):
fid = open('input.dat', 'w') fid = open('input.dat', 'w')
fid.write(self.inputobj._print()) fid.write(self.inputobj._print())
fid.close() fid.close()
sys.stdout.flush()
self._run('output_rst') self._run('output_rst')
# restart again on finer grlev with the other half of iterations. # restart again on finer grlev with the other half of iterations.
print 'restarting at finest level from mstep =',mstep[0] print '### case '+self.casename+': test restart at finest level from mstep =',mstep[0]
if os.path.isfile('grid.rst'): if os.path.isfile('grid.rst'):
os.system('rm grid.rst') os.system('rm grid.rst')
os.system('ln -s grid.RST.01 grid.rst') os.system('ln -s grid.RST.01 grid.rst')
...@@ -143,6 +144,7 @@ class CaseRunner(object): ...@@ -143,6 +144,7 @@ class CaseRunner(object):
fid = open('input.dat', 'w') fid = open('input.dat', 'w')
fid.write(self.inputobj._print()) fid.write(self.inputobj._print())
fid.close() fid.close()
sys.stdout.flush()
self._run('output_rst') self._run('output_rst')
# Compare restart files # Compare restart files
os.system('ln -s grid.RST.01 grid.brst') os.system('ln -s grid.RST.01 grid.brst')
......
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