Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #974
Closed
Open
Issue created Aug 15, 2018 by Mattijs Janssens@MattijsMaintainer

fileHandler in combination with threading

When using a threaded fileHandler (e.g. collated) the code does not know to wait for a file being written before trying to read it. This happens e.g. in topoSet (reading a set that has just been written), decomposePar (reading the decomposed mesh to decompose the fields)

Solutions:

  • switch off threading altogether. This is what is currently done.
  • have IFstream know about currently written files. This would require all IFstream to go through the fileHandler, so use fileHandler().NewIFstream instead of IFstream everywhere.
  • since it is only a few applications that have this make sure to reset the fileHandler.

This last solution has been implemented by a new 'flush()' method on all fileHandlers which clears out any cached data (e.g. time directories) and waits for all file operations to finish.

Assignee
Assign to
Time tracking