Error in DriverAdaptive when AverageFields filter is used
An error arises when using an "AverageFields" filter together with the "Adaptive" driver.
With the debug executable "CompressibleFlowSolver-g" in serial, once all time steps and number of runs are completed, before writing the final fld file, the execution stops with the error: "The MPI_Barrier() function was called after MPI_FINALIZE was invoked".
In release mode in serial, the problem stops at the end of the first run (after writing the fld file) with the same error as above. In parallel, the error is "The MPI_Recv() function was called after MPI_FINALIZE was invoked".
Mysteriously, when I am running in serial, in debug mode, the "MPI_Finalize" and "MPI_Barrier" are called inside CommMpi. I attach the files to reproduce the error.