-
Hello, I am trying to solve the topology optimization tutorial, and have copied all .f files (except snopth.c) in snopt7/src to /home/dafoamuser/.local/lib/python3.6/site-packages/pyoptsparse/pySNOPT/source, and ran "python setup.py" with no error. However, it seems SNOPT is not linked to DAFoam, because I receive this mesage: Traceback (most recent call last): Could anyone please help me out. Thanks and regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Follow the exact instructions from here to compile SNOPT. You need to start and log in to a DAFoam docker container, download pyoptsparse-2.3.0 (you can put it anywhere), copy SNOPT source files to pyoptsparse-2.3.0/pyoptsparse/pySNOPT/source, and run |
Beta Was this translation helpful? Give feedback.
Follow the exact instructions from here to compile SNOPT. You need to start and log in to a DAFoam docker container, download pyoptsparse-2.3.0 (you can put it anywhere), copy SNOPT source files to pyoptsparse-2.3.0/pyoptsparse/pySNOPT/source, and run
pip install .
This will compile snopt.so and save it to $HOME/dafoam/packages/miniconda3/lib/python3.6/site-packages/pyoptsparse/pySNOPT in the container. You will have to do this every time you log in to the docker container. This is because everything will be deleted after you exit the docker container. So I suggest you compile the dafoam package from scratch for this case.