Skip to content

Commit 521844a

Browse files
committed
Small fix (vla error).
1 parent 9f30725 commit 521844a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Common/include/basic_types/ad_structure.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,8 @@ FORCEINLINE void SetTagErrorCallback(struct ErrorReport* report) {
752752
FORCEINLINE void SetTag(int tag) {}
753753
FORCEINLINE void ClearTagOnVariable(su2double& v) {}
754754
FORCEINLINE void SetTagErrorCallback(struct ErrorReport* report) {}
755-
#endif
755+
756+
#endif // CODI_TAG_TAPE
756757

757758
#endif // CODI_REVERSE_TYPE
758759

SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ void CDiscAdjMultizoneDriver::DebugRun() {
299299
void CDiscAdjMultizoneDriver::DebugRun_ScreenOutput(struct AD::ErrorReport& error_report) {
300300

301301
int total_errors = 0;
302-
int process_error[size];
302+
std::vector<int> process_error(size);
303303

304304
SU2_MPI::Allreduce(AD::GetErrorCount(&error_report), &total_errors, 1, MPI_INT, MPI_SUM, SU2_MPI::GetComm());
305-
SU2_MPI::Gather(AD::GetErrorCount(&error_report), 1, MPI_INT, &process_error, 1, MPI_INT, 0, SU2_MPI::GetComm());
305+
SU2_MPI::Gather(AD::GetErrorCount(&error_report), 1, MPI_INT, process_error.data(), 1, MPI_INT, 0, SU2_MPI::GetComm());
306306

307307
if (rank == MASTER_NODE) {
308308
std::cout << "\nTotal number of detected tape inconsistencies: " << total_errors << std::endl;

0 commit comments

Comments
 (0)