Implementation of MPI-IO

Within Cfoam-CABARET for writing restart and visualisation data files ResCells000000n and ResFaces000000n files, the subroutine WriteRes was updated to use MPI-IO such that data for the individual cells and faces may be written to a single file. To enable restarts from the new data file, the subroutine ReadRestartFile was also updated to use the same file structure and MPI-IO. This was fairly straightforward to implement by using MPI_FILE_READ and MPI_FILE_WRITE, together with existing information from elsewhere in the code for definitions of the data off-sets.

To implement MPI-IO within outFoamX further work was required, mainly due to the post-processing required for Tecplot360. In the initial outFoamX application, the separate files ResCells000000n and ResFaces000000n were firstly read in for each process, then internal post-processing was performed and finally the data was gathered to the master process for writing as single .plt files for input to Tecplot360.

To update outFoamX for MPI-IO the subroutines GatherOutputFromAllProcs, PostProcessor and ReadCubes were all modified. The newly developed code enables data to be read from single input files for ResCells000000n and ResFaces000000n and then output in parallel to single .plt files for Tecplot360.

Phil Ridley 2012-10-01