iRIC_Check_Cancel() now returns 0 if ".cancel" file does not exists, and returns 1 if exists.
The solver calls iRIC_Check_Cancel(), and if 1 is returned, it calls STOP.
But sometimes, it causes that CGNS file is not closed properly, corrupted, and it becomes impossible to open the CGNS file.
To avoid such situations, we can ask all solver developers to add line to call cg_close_f before calling STOP. But it will take time to get all solvers updated.
So I propose that we change iRIC_Check_Cancel() behavior:
When ".cancel" file does not exists, it returns 0, as it does now.
When ".cancel" file exists. It closes all CGNS files, and exit().
With this modification, when user clicks on "Stop" button on iRIC GUI, we can safely stop solver after closing CGNS files.
The advantage is that we can just replace iRIClib DLL, and do not have to ask solver developers to do anything.
iRIC_Check_Cancel() now returns 0 if ".cancel" file does not exists, and returns 1 if exists.
The solver calls iRIC_Check_Cancel(), and if 1 is returned, it calls STOP.
But sometimes, it causes that CGNS file is not closed properly, corrupted, and it becomes impossible to open the CGNS file.
To avoid such situations, we can ask all solver developers to add line to call
cg_close_f
before calling STOP. But it will take time to get all solvers updated.So I propose that we change iRIC_Check_Cancel() behavior:
With this modification, when user clicks on "Stop" button on iRIC GUI, we can safely stop solver after closing CGNS files.
The advantage is that we can just replace iRIClib DLL, and do not have to ask solver developers to do anything.