Skip to content

Commit 785edae

Browse files
committed
merge develop
2 parents 3318807 + 814f21a commit 785edae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1219
-141
lines changed

.github/workflows/regression.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
26+
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, ReverseTagNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
2727
include:
2828
- config_set: BaseMPI
2929
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Dinstall-mpp=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2'
@@ -37,6 +37,8 @@ jobs:
3737
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
3838
- config_set: ForwardNoMPI
3939
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
40+
- config_set: ReverseTagNoMPI
41+
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror -Dcodi-tape=Tag'
4042
- config_set: BaseOMP
4143
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
4244
- config_set: ReverseOMP
@@ -215,6 +217,55 @@ jobs:
215217
with:
216218
entrypoint: /bin/rm
217219
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
220+
discadj_tape_tests:
221+
if: inputs.runner != 'ARM64'
222+
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
223+
name: Tape Tests
224+
needs: build
225+
strategy:
226+
fail-fast: false
227+
matrix:
228+
testscript: ['serial_regression_AD.py']
229+
include:
230+
- testscript: 'serial_regression_AD.py'
231+
tag: TagNoMPI
232+
steps:
233+
- name: Pre Cleanup
234+
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
235+
with:
236+
entrypoint: /bin/rm
237+
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
238+
- name: Download All artifacts
239+
uses: actions/download-artifact@v4
240+
- name: Uncompress and Move Binaries
241+
run: |
242+
BIN_FOLDER="$PWD/install/bin"
243+
mkdir -p $BIN_FOLDER
244+
ls -lah $BIN_FOLDER
245+
for type in Base Reverse Forward; do
246+
TYPE_FOLDER="${type}${{matrix.tag}}"
247+
echo "Processing '$TYPE_FOLDER' ..."
248+
if [ -d $TYPE_FOLDER ]; then
249+
pushd $TYPE_FOLDER
250+
ls -lah
251+
tar -zxvf install_bin.tgz
252+
ls -lah install/bin/
253+
cp -r install/* $BIN_FOLDER/../
254+
popd;
255+
fi
256+
done
257+
chmod a+x $BIN_FOLDER/*
258+
ls -lahR $BIN_FOLDER
259+
- name: Run Tests in Container
260+
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
261+
with:
262+
# -t <Tutorials-branch> -c <Testcases-branch>
263+
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests"
264+
- name: Cleanup
265+
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
266+
with:
267+
entrypoint: /bin/rm
268+
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
218269
thread_sanitizer_tests:
219270
if: inputs.runner != 'ARM64'
220271
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}

Common/include/CConfig.hpp

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class CConfig {
132132
Sens_Remove_Sharp, /*!< \brief Flag for removing or not the sharp edges from the sensitivity computation. */
133133
Hold_GridFixed, /*!< \brief Flag hold fixed some part of the mesh during the deformation. */
134134
Axisymmetric, /*!< \brief Flag for axisymmetric calculations */
135+
Enable_Cuda, /*!< \brief Flag for switching GPU computing*/
135136
Integrated_HeatFlux; /*!< \brief Flag for heat flux BC whether it deals with integrated values.*/
136137
su2double Buffet_k; /*!< \brief Sharpness coefficient for buffet sensor.*/
137138
su2double Buffet_lambda; /*!< \brief Offset parameter for buffet sensor.*/
@@ -595,8 +596,10 @@ class CConfig {
595596
//bool ContactResistance = false; /*!< \brief Apply contact resistance for conjugate heat transfer. */
596597
unsigned short nID_DV; /*!< \brief ID for the region of FEM when computed using direct differentiation. */
597598

598-
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
599-
bool AD_Preaccumulation; /*!< \brief Enable or disable preaccumulation in the AD mode. */
599+
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
600+
bool AD_Preaccumulation; /*!< \brief Enable or disable preaccumulation in the AD mode. */
601+
CHECK_TAPE_TYPE AD_CheckTapeType; /*!< \brief Type of tape that is checked in a tape debug run. */
602+
CHECK_TAPE_VARIABLES AD_CheckTapeVariables; /*!< \brief Type of variables that are checked in a tape debug run. */
600603
STRUCT_COMPRESS Kind_Material_Compress; /*!< \brief Determines if the material is compressible or incompressible (structural analysis). */
601604
STRUCT_MODEL Kind_Material; /*!< \brief Determines the material model to be used (structural analysis). */
602605
STRUCT_DEFORMATION Kind_Struct_Solver; /*!< \brief Determines the geometric condition (small or large deformations) for structural analysis. */
@@ -820,6 +823,7 @@ class CConfig {
820823
SurfSens_FileName, /*!< \brief Output file for the sensitivity on the surface (discrete adjoint). */
821824
VolSens_FileName, /*!< \brief Output file for the sensitivity in the volume (discrete adjoint). */
822825
ObjFunc_Hess_FileName; /*!< \brief Hessian approximation obtained by the Sobolev smoothing solver. */
826+
bool Multizone_Adapt_FileName; /*!< \brief Append zone number to solution and restart file names. */
823827

824828
bool
825829
Wrt_Performance, /*!< \brief Write the performance summary at the end of a calculation. */
@@ -1053,7 +1057,8 @@ class CConfig {
10531057
long ParMETIS_pointWgt; /*!< \brief Load balancing weight given to points. */
10541058
long ParMETIS_edgeWgt; /*!< \brief Load balancing weight given to edges. */
10551059
unsigned short DirectDiff; /*!< \brief Direct Differentation mode. */
1056-
bool DiscreteAdjoint; /*!< \brief AD-based discrete adjoint mode. */
1060+
bool DiscreteAdjoint, /*!< \brief AD-based discrete adjoint mode. */
1061+
DiscreteAdjointDebug; /*!< \brief Discrete adjoint debug mode using tags. */
10571062
su2double Const_DES; /*!< \brief Detached Eddy Simulation Constant. */
10581063
WINDOW_FUNCTION Kind_WindowFct; /*!< \brief Type of window (weight) function for objective functional. */
10591064
unsigned short Kind_HybridRANSLES; /*!< \brief Kind of Hybrid RANS/LES. */
@@ -1895,6 +1900,12 @@ class CConfig {
18951900
*/
18961901
su2double GetPressure_FreeStreamND(void) const { return Pressure_FreeStreamND; }
18971902

1903+
/*!
1904+
* \brief Get a reference to the non-dimensionalized freestream pressure (used for AD tracking).
1905+
* \return Reference to non-dimensionalized freestream pressure.
1906+
*/
1907+
su2double& GetPressure_FreeStreamND(void) { return Pressure_FreeStreamND; }
1908+
18981909
/*!
18991910
* \brief Get the value of the thermodynamic pressure.
19001911
* \return Thermodynamic pressure.
@@ -1920,6 +1931,12 @@ class CConfig {
19201931
*/
19211932
su2double GetTemperature_FreeStreamND(void) const { return Temperature_FreeStreamND; }
19221933

1934+
/*!
1935+
* \brief Get a reference to the non-dimensionalized freestream temperature (used for AD tracking).
1936+
* \return Reference to non-dimensionalized freestream temperature.
1937+
*/
1938+
su2double& GetTemperature_FreeStreamND(void) { return Temperature_FreeStreamND; }
1939+
19231940
/*!
19241941
* \brief Get the value of the non-dimensionalized vibrational-electronic freestream temperature.
19251942
* \return Non-dimensionalized vibrational-electronic freestream temperature.
@@ -5377,6 +5394,12 @@ class CConfig {
53775394
*/
53785395
bool GetWrt_Volume_Overwrite(void) const { return Wrt_Volume_Overwrite; }
53795396

5397+
/*!
5398+
* \brief Get whether filenames are appended the zone number automatically (multiphysics solver).
5399+
* \return Flag for appending zone numbers to restart and solution filenames. If Flag=true, zone numer is appended.
5400+
*/
5401+
bool GetMultizone_AdaptFilename(void) const { return Multizone_Adapt_FileName; }
5402+
53805403
/*!
53815404
* \brief Provides the number of variables.
53825405
* \return Number of variables.
@@ -6291,6 +6314,12 @@ class CConfig {
62916314
*/
62926315
bool GetAxisymmetric(void) const { return Axisymmetric; }
62936316

6317+
/*!
6318+
* \brief Get information about GPU support.
6319+
* \return <code>TRUE</code> if cuda is enabled; otherwise <code>FALSE</code>.
6320+
*/
6321+
bool GetCUDA(void) const { return Enable_Cuda; }
6322+
62946323
/*!
62956324
* \brief Subtract one to the index of the finest grid (full multigrid strategy).
62966325
* \return Change the index of the finest grid.
@@ -8871,6 +8900,12 @@ class CConfig {
88718900
*/
88728901
bool GetDiscrete_Adjoint(void) const { return DiscreteAdjoint; }
88738902

8903+
/*!
8904+
* \brief Get the indicator whether a debug run for the discrete adjoint solver will be started.
8905+
* \return the discrete adjoint debug indicator.
8906+
*/
8907+
bool GetDiscrete_Adjoint_Debug(void) const { return DiscreteAdjointDebug; }
8908+
88748909
/*!
88758910
* \brief Get the number of subiterations while a ramp is applied.
88768911
* \return Number of FSI subiters.
@@ -9308,6 +9343,16 @@ class CConfig {
93089343
*/
93099344
su2double GetConst_DES(void) const { return Const_DES; }
93109345

9346+
/*!
9347+
* \brief Get the type of tape that will be checked in a tape debug run.
9348+
*/
9349+
CHECK_TAPE_TYPE GetAD_CheckTapeType(void) const { return AD_CheckTapeType; }
9350+
9351+
/*!
9352+
* \brief Get the type of variables that will be checked for in a tape debug run.
9353+
*/
9354+
CHECK_TAPE_VARIABLES GetAD_CheckTapeVariables(void) const { return AD_CheckTapeVariables; }
9355+
93119356
/*!
93129357
* \brief Get if AD preaccumulation should be performed.
93139358
*/
@@ -9697,6 +9742,11 @@ class CConfig {
96979742
*/
96989743
unsigned short GetnVolumeOutputFiles() const { return nVolumeOutputFiles; }
96999744

9745+
/*!
9746+
* \brief GetnVolumeOutputFrequencies
9747+
*/
9748+
unsigned short GetnVolumeOutputFrequencies() const { return nVolumeOutputFrequencies; }
9749+
97009750
/*!
97019751
* \brief GetVolumeOutputFrequency
97029752
* \param[in] iFile: index of file number for which the writing frequency needs to be returned.

0 commit comments

Comments
 (0)