CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2 > SU2 Installation

SU2_CFD_AD not found although I used meson.py to build from source with autodiff

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2025, 00:52
Default SU2_CFD_AD not found although I used meson.py to build from source with autodiff
  #1
New Member
 
anonymous
Join Date: Jul 2025
Posts: 1
Rep Power: 0
SU2_user is on a distinguished road
I installed SU2 with the following commands on ubuntu 24.04:

sudo git clone https://github.com/su2code/su2.git
sudo apt update
sudo apt install mpich libmpich-dev
cd SU2
sudo ./meson.py build -Denable-openblas=true
sudo ./meson.py build -Dwith-mpi=true
sudo ./meson.py build -Denable-pywrapper=true
sudo ./meson.py build -Denable-directdiff=true
sudo ./meson.py build -Denable-autodiff=true
sudo ./ninja -C build install

I get the following message with each of the commands:

update CoolProp
/usr/bin/SU2/subprojects/CoolProp
/usr/bin/SU2
CoolProp updated
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.


When I tried following the quick start guide to run the discrete adjoint, I get the error saying SU2_CFD_AD: command not found. I did not find the SU2_CFD_AD executable or directory anywhere.

Here are my path variables:
export PYTHONPATH=/usr/bin/python3
export SU2_HOME=/usr/bin/SU2
export SU2_RUN=/usr/bin/SU2
export PATH=$SU2_RUN:$PATH
export PYTHONPATH=$SU2_RUN:$PYTHONPATH
export MPICC=/usr/bin/mpicc
export MPICXX=/usr/bin/mpicxx


Please let me know if I am missing something.
Thanks
SU2_user is offline   Reply With Quote

Old   July 10, 2025, 03:35
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 833
Rep Power: 23
bigfootedrockmidget is on a distinguished road
Code:
sudo ./meson.py build -Denable-openblas=true
sudo ./meson.py build -Dwith-mpi=true
sudo ./meson.py build -Denable-pywrapper=true
sudo ./meson.py build -Denable-directdiff=true
sudo ./meson.py build -Denable-autodiff=true
sudo ./ninja -C build install
Do not sudo everything, every time you use su or sudo, be aware of what you are doing. Local actions should never be done with su rights. only the ninja install to a global directory should be done with sudo. But I recommend keeping it installed in your own directory (in bin or SU2/bin) using the --prefix argument unless you are the administrator of a network where more people need access to SU2.


In any case, you need to combine the meson arguments into one meson command because else the previous command will be overwritten. Also, you overwrite the previous meson command with the argument --reconfigure. If you do not provide that, the new meson command will not create a new configuration. So you need to do this:


Code:
./meson.py build -Denable-autodiff=true -Denable-pywrapper=true -Denable-directdiff=true -Dwith-mpi=enabled -Denable-openblas=true --prefix=~/bin
and if you already have a meson configuration:


Code:
./meson.py build --reconfigure -Denable-autodiff=true -Denable-pywrapper=true -Denable-directdiff=true -Dwith-mpi=enabled -Denable-openblas=true --prefix=~/bin
bigfootedrockmidget is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
Gmsh installation on terminal help spitfire Main CFD Forum 4 July 27, 2017 16:11
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 15:59.