Skip to content

Commit a75e794

Browse files
authored
Fix compiler warnings on Frontier (#1319)
* fix warnings in CourantReAlg.C * fix warnings in VOFAdvectionEdgeAlg.C * fix warnings in TKESSTBLTM2015NodeKernel.C * partial fix for warnings in SDRSSTBLTM2015NodeKernel.C * fix warning in GPU build for Tet4CVFEM.h * remove unused gamma limiter code from one of the SDR node kernels * fix warnings in AeroContainer.C * move hack to prevent warning - wasn't working in some builds * fix warning in Tri32DCVFEM.C
1 parent 5df557f commit a75e794

File tree

8 files changed

+10
-42
lines changed

8 files changed

+10
-42
lines changed

include/master_element/Tet4CVFEM.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ class TetSCS : public MasterElement
332332
{0, 3, 2}, // face 2
333333
{0, 2, 1}}; // face 3
334334

335+
#if !defined(KOKKOS_ENABLE_GPU)
335336
int intgExpFaceShift_[4][3][3];
337+
#endif
336338

337339
template <typename DBLTYPE, typename SHMEM>
338340
KOKKOS_INLINE_FUNCTION void determinant_scs(

include/master_element/Tri32DCVFEM.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,9 @@ class Tri32DSCS : public MasterElement
311311
{1, 2}, // face 1
312312
{2, 0}}; // face 2
313313

314+
#if !defined(KOKKOS_ENABLE_GPU)
314315
double intgExpFaceShift_[3][2][2];
316+
#endif
315317

316318
template <typename DBLTYPE, typename SHMEM>
317319
KOKKOS_INLINE_FUNCTION void determinant_scs(

src/aero/AeroContainer.C

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ AeroContainer::update_displacements(
132132
}
133133
#else
134134
(void)currentTime;
135+
(void)updateCC;
136+
(void)predict;
135137
#endif
136138
}
137139

src/aero/actuator/ActuatorModel.C

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,11 @@ ActuatorModel::setup(double timeStep, stk::mesh::BulkData& stkBulk)
7070
if (!is_active())
7171
return;
7272

73-
// hack to surpress Wunused-parameter on non-openfast builds
74-
STK_ThrowErrorIf(timeStep <= 0.0);
75-
7673
switch (actMeta_->actuatorType_) {
7774
case (ActuatorType::ActLineFASTNGP): {
7875
#ifndef NALU_USES_OPENFAST
7976
STK_ThrowErrorMsg("Actuator methods require OpenFAST");
77+
(void)timeStep;
8078
#if !defined(KOKKOS_ENABLE_GPU)
8179
break;
8280
#endif

src/edge_kernels/VOFAdvectionEdgeAlg.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ VOFAdvectionEdgeAlg::execute()
8585
const double gradient_eps = 1.0e-9;
8686

8787
const int ndim = realm_.meta_data().spatial_dimension();
88-
const auto& meta = realm_.meta_data();
8988

9089
const DblType sharpening_scaling =
9190
realm_.solutionOptions_->vof_sharpening_scaling_factor_;

src/ngp_algorithms/CourantReAlg.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ CourantReAlg<AlgTraits>::execute()
107107
auto& scrViews = edata.simdScrView;
108108
const auto& v_coords = scrViews.get_scratch_view_2D(coordID);
109109
const auto& v_vel = scrViews.get_scratch_view_2D(velID);
110-
const auto& v_rho = scrViews.get_scratch_view_1D(rhoID);
111-
const auto& v_visc = scrViews.get_scratch_view_1D(viscID);
112110

113111
DoubleType elemCFL = -1.0;
114112

src/node_kernels/SDRSSTBLTM2015NodeKernel.C

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ SDRSSTBLTM2015NodeKernel::execute(
8181
{
8282
using DblType = NodeKernelTraits::DblType;
8383

84-
const DblType tke = tke_.get(node, 0);
8584
const DblType sdr = sdr_.get(node, 0);
8685
const DblType density = density_.get(node, 0);
8786
const DblType tvisc = tvisc_.get(node, 0);
@@ -95,7 +94,6 @@ SDRSSTBLTM2015NodeKernel::execute(
9594

9695
for (int i = 0; i < nDim_; ++i) {
9796
crossDiff += dkdx_.get(node, i) * dwdx_.get(node, i);
98-
const int offset = nDim_ * i;
9997
for (int j = 0; j < nDim_; ++j) {
10098
const double duidxj = dudx_.get(node, nDim_ * i + j);
10199
const double dujdxi = dudx_.get(node, nDim_ * j + i);
@@ -118,37 +116,6 @@ SDRSSTBLTM2015NodeKernel::execute(
118116
const DblType gamma = fOneBlend * gammaOne_ + omf1 * gammaTwo_;
119117
const DblType sigmaD = 2.0 * omf1 * sigmaWTwo_;
120118

121-
DblType gammaOne_apply;
122-
DblType gammaTwo_apply;
123-
// apply limiter to gamma
124-
if (lengthScaleLimiter_) {
125-
// calculate mixing length
126-
const DblType l_t =
127-
stk::math::sqrt(tke) / (stk::math::pow(betaStar_, .25) * sdr);
128-
129-
// calculate maximum mixing length
130-
// the proportionality constant (.00027) was found by fitting to
131-
// measurements of atmospheric conditions as described in ref. Kob13
132-
const DblType l_e = .00027 * referenceVelocity_ / corfac_;
133-
134-
// apply limiter to cEpsOne -> calculate gammaOne
135-
const DblType cEpsOne_one = gammaOne_ + 1.;
136-
const DblType cEpsTwo_one = betaOne_ / betaStar_ + 1.;
137-
const DblType cEpsOneStar_one =
138-
cEpsOne_one + (cEpsTwo_one - cEpsOne_one) * (l_t / l_e);
139-
gammaOne_apply = cEpsOneStar_one - 1.;
140-
141-
// apply limiter to cEpsTwo -> calculate gammaTwo
142-
const DblType cEpsOne_two = gammaTwo_ + 1.;
143-
const DblType cEpsTwo_two = betaTwo_ / betaStar_ + 1.;
144-
const DblType cEpsOneStar_two =
145-
cEpsOne_two + (cEpsTwo_two - cEpsOne_two) * (l_t / l_e);
146-
gammaTwo_apply = cEpsOneStar_two - 1.;
147-
} else {
148-
gammaOne_apply = gammaOne_;
149-
gammaTwo_apply = gammaTwo_;
150-
}
151-
152119
// Production term with appropriate clipping of tvisc
153120
const DblType Pw = gamma * density * Pk / stk::math::max(tvisc, 1.0e-16);
154121
const DblType Dw = beta * density * sdr * sdr;

src/node_kernels/TKESSTBLTM2015NodeKernel.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ TKESSTBLTM2015NodeKernel::TKESSTBLTM2015NodeKernel(
2424
: NGPNodeKernel<TKESSTBLTM2015NodeKernel>(),
2525
tkeID_(get_field_ordinal(meta, "turbulent_ke")),
2626
sdrID_(get_field_ordinal(meta, "specific_dissipation_rate")),
27+
gamintID_(get_field_ordinal(meta, "gamma_transition")),
2728
densityID_(get_field_ordinal(meta, "density")),
29+
viscID_(get_field_ordinal(meta, "viscosity")),
2830
tviscID_(get_field_ordinal(meta, "turbulent_viscosity")),
2931
dudxID_(get_field_ordinal(meta, "dudx")),
30-
dualNodalVolumeID_(get_field_ordinal(meta, "dual_nodal_volume")),
31-
gamintID_(get_field_ordinal(meta, "gamma_transition")),
32-
viscID_(get_field_ordinal(meta, "viscosity")),
3332
wallDistID_(get_field_ordinal(meta, "minimum_distance_to_wall")),
33+
dualNodalVolumeID_(get_field_ordinal(meta, "dual_nodal_volume")),
3434
nDim_(meta.spatial_dimension())
3535
{
3636
}

0 commit comments

Comments
 (0)