In writeSolution() and writeSolution3d defined in case_sol_readwrite.cpp, cg_iRIC_Flush() is called.
Calling this function, fid (the second argument) value may change (it depends), but the writeSolution() and writeSolution3d() defines argument fid as int, not int*, so it does not inform the change of fid to caller.
This causes that cg_close() called outside of writeSolution(), writeSolution3d() does not close CGNS file correctly if cg_iRIC_Flush() changes fid value.
In writeSolution() and writeSolution3d defined in case_sol_readwrite.cpp, cg_iRIC_Flush() is called.
Calling this function, fid (the second argument) value may change (it depends), but the writeSolution() and writeSolution3d() defines argument fid as int, not int*, so it does not inform the change of fid to caller.
This causes that cg_close() called outside of writeSolution(), writeSolution3d() does not close CGNS file correctly if cg_iRIC_Flush() changes fid value.