To follow up on this, I'm not sure how to otherwise print this out from the debugging console, since the programme crashing doesnt give a trace back to the original line, however, at least I can give some details where the segfault occurs through stepping into it with the debugger:
the programme starts running the following script:
if self.strainParameters.rates:
return concrete.multirun()
else:
return concrete.run()
stepping into the concrete.run() function there is a solver.step() function.
stepping into the solver.step() function, takes you to the TimeSeriesWriter() class __call__ function.
solver.step() (which calls the __call__ function) completes successfully for 2-100 iterations (iterature number before failure is not always predictable)
then flag = 1 is activated on one of the iterations:
if flag:
filename = '{}/{}.{}'.format(self.options.paths.outputDir, name,
self.options.outputFiles.fileExtension)
if os.path.exists(filename):
os.remove(filename)
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
os.stat(path)
except (OSError, ValueError):
return False
return True
this function returns true because the path is a real path, and since the file exists os.remove(filename) is activated to remove the file. The next function that is activated is to open the file with OutputFile class, (line 62 in the TimeSeriesWriter() class __call__ function), but I think since the filename was just deleted, the programme cannot find the file to open.
with OutputFile(filename) as data: