CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Shape Design (https://www.cfd-online.com/Forums/su2-shape-design/)
-   -   Discrete adjoint cannot be run in parallel if variable load actuator disc model used (https://www.cfd-online.com/Forums/su2-shape-design/243387-discrete-adjoint-cannot-run-parallel-if-variable-load-actuator-disc-model-used.html)

FabianBueeler June 15, 2022 05:45

Discrete adjoint cannot be run in parallel if variable load actuator disc model used
 
Dear community,

I am trying to create a 3D shape optimisation of a wing with a propeller. I use the discrete adjoint and the variable load actuator disc model from Ettore Saetta for the propeller.

To create the shape optimisation, I first created a direct flow simulation of the wing with the propeller. Then I created a shape optimization of the wing without propeller. This worked well, both the direct flow and the adjoint solvers converged, and the optimizer found a reasonable result. For these simulations I used a parallel compilation of SU2 7.3.1 on linux and between 8 and 32 cores.

Next I added the actuator disc to the shape optimization and ran into a problem. The direct flow simulation worked, but the discrete adjoint simulation did not. The error is:

Error in function AMPI_Request_free (../externals/medi/include/medi/ampi/async.hpp:249)
The message is: Freeing a handle that is not finish with wait, waitall, etc..

I also wanted to upload an image of the error, but CFD online seems to have problems with that. Have a look at log_output.txt in the link below to see the error in the log file.

The error occurred before the discrete adjoint solver started. I had a look at the file async.hpp mentioned in the error message. It seemed to me as if it belongs to MeDiPack and has something to do with running the MPI. So I ran the same simulation with a serial compilation of SU2 7.3.1. And the optimization with the actuator disc worked. The discrete adjoint worked, created reasonable results, and the optimization converged and created reasonable results too.

Moreover, the error does not appear if either the actuator disc model is not used or if the continuous adjoint is used. So my interpretation is, that the problem does not lie in the discrete adjoint or in the actuator disc model itself, but somewhere in the MPI.

I have no knowledge on the MPI, the discrete adjoint or the variable load actuator disc model on code basis. Furthermore, it is important for my project to do shape optimization with the actuator disc model in parallel, since serial optimizations take far too long. So I would be very happy about any inputs or help from anybody of you. Does anybody have an idea, what the problem might be or how it could be solved?

You can find all necessary files to recreate the error here:

https://www.polybox.ethz.ch/index.php/s/hsbIv3FR97t1AQb

log_output.txt contains the output of the erroneous simu.
log_output_serial.txt contains the output of the serial simu (without error). flow.su2 is the mesh with the FFD box, flow_old.su2 is the mesh without FFD box.

Thanks a lot for your help

Fabian

L C June 23, 2023 15:56

Hi Fabian, I tried to open your link but it seems to be broken. I've experimented with parallel SU2 and sometimes it is finicky indeed. Not something straightforward to get working right.


All times are GMT -4. The time now is 00:44.