TypeError in pysu2.CSinglezoneDriver while trying to run in Serial mode
Hi there,
I want to run the inv_NACA0012 test case from the QuickStart folder (link here) using pysu2 through a python script in serial mode. I have enabled the python wrapper correctly and it gets imported without any error. I have attached my code below: Code:
import sys SU2/bin/pysu2.py", line 527, in __init__ _pysu2.CSinglezoneDriver_swiginit(self, _pysu2.new_CSinglezoneDriver(confFile, val_nZone, MPICommunicator)) TypeError: in method 'new_CSinglezoneDriver', argument 3 of type 'SU2_Comm' Even if I enable MPI and use comm = MPI.COMM_WORLD instead of comm = 0,I get another error: The MPI_Comm_rank() function was called before MPI_INIT was invoked. *** This is disallowed by the MPI standard. *** Your MPI job will now abort. Right now I am only interested in running SU2 in the serial mode, could you help me in resolving the issue (the first error)? Thanks! -- I am using SU2 version 7.4.0 swig version: 4.0.2 gcc version 4.9.2 |
Hi there,
Can anyone give some guidance on how to sort out this issue? I tried out running the example codes in mpi4py documentation page (link here), and they work fine. But when I am specifically running this piece of code with SU2 involved in it, I get the error mentioned above. I went through various online discussion forums but could not get it sorted :/ Thanks in advance! |
I'm not too familiar with it, but have a look in the code at
SU2_CFD/src/python_wrapper_structure and you see what kind of functions are available. It looks like there is a Get_Drag() and Get_Lift() function and similar functions are present as well. |
There are a couple of examples for the pywrapper in TestCases/py_wrapper, you can first run them to make sure that everything is working properly on your local machine (if you haven't done so already)
|
Apologies for the very late reply, apparently I got busy with other projects and had to pause the one with SU2 for a while. Thanks a lot your prompt replies @bigfoot, seems the MPI version was creating the issue. I had a lot of trouble with setting up openMPI in the right way. Here are a few suggestions to get do it right for newbies like me who want to use the python wrapper of SU2
- Install openMPI and mpi4py as mention here: https://mdolab-mach-aero.readthedocs...yPackages.html (best source I ever found for mpi installation) - Install SU2 in parallel mode - Install the python wrapper appropriately (look at the last reply from the thread: https://www.cfd-online.com/Forums/su...ror-pysu2.html incase you are facing python path issues) Python Code for running the Quick Start is re-written with corrections below: Code:
|
All times are GMT -4. The time now is 02:34. |