Skip to content

Commit e9bcd67

Browse files
author
Julien Fausty
committed
GCC13: fixes for warnings and errors
1 parent 69912ff commit e9bcd67

3 files changed

Lines changed: 53 additions & 19 deletions

File tree

src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ ArrayOfArrays< localIndex > computeElem2dToNodes( vtkIdType num2dElements,
583583
std::set< localIndex > tmp;
584584
for( auto j = 0; j < faceToNodes[faceIndex].size(); ++j )
585585
{
586-
localIndex const & nodeIndex = faceToNodes[faceIndex][j];
586+
localIndex const nodeIndex = faceToNodes[faceIndex][j];
587587
tmp.insert( nodeIndex );
588588
}
589589
for( localIndex const & nodeIndex: tmp )

src/coreComponents/unitTests/constitutiveTests/testMultiFluid.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void testNumericalDerivatives( MultiFluidBase & fluid,
177177
auto const & phaseDensCopy = GET_FLUID_DATA( fluidCopy, fields::multifluid::phaseDensity );
178178
auto const & phaseViscCopy = GET_FLUID_DATA( fluidCopy, fields::multifluid::phaseViscosity );
179179
auto const & phaseCompFracCopy = GET_FLUID_DATA( fluidCopy, fields::multifluid::phaseCompFraction );
180-
auto const & totalDensCopy = GET_FLUID_DATA( fluidCopy, fields::multifluid::totalDensity );
180+
auto totalDensCopy = [&]() { return GET_FLUID_DATA( fluidCopy, fields::multifluid::totalDensity ); };
181181

182182
#undef GET_FLUID_DATA
183183

@@ -211,7 +211,7 @@ void testNumericalDerivatives( MultiFluidBase & fluid,
211211
dP, relTol, absTol, "phaseDens", "Pres", phases );
212212
checkDerivative( phaseViscCopy.toSliceConst(), phaseVisc.value.toSliceConst(), dPhaseVisc[Deriv::dP].toSliceConst(),
213213
dP, relTol, absTol, "phaseVisc", "Pres", phases );
214-
checkDerivative( totalDensCopy, totalDens.value, dTotalDens[Deriv::dP],
214+
checkDerivative( totalDensCopy(), totalDens.value, dTotalDens[Deriv::dP],
215215
dP, relTol, absTol, "totalDens", "Pres" );
216216
checkDerivative( phaseCompFracCopy.toSliceConst(), phaseCompFrac.value.toSliceConst(), dPhaseCompFrac[Deriv::dP].toSliceConst(),
217217
dP, relTol, absTol, "phaseCompFrac", "Pres", phases, components );
@@ -228,7 +228,7 @@ void testNumericalDerivatives( MultiFluidBase & fluid,
228228
dT, relTol, absTol, "phaseDens", "Temp", phases );
229229
checkDerivative( phaseViscCopy.toSliceConst(), phaseVisc.value.toSliceConst(), dPhaseVisc[Deriv::dT].toSliceConst(),
230230
dT, relTol, absTol, "phaseVisc", "Temp", phases );
231-
checkDerivative( totalDensCopy, totalDens.value, dTotalDens[Deriv::dT],
231+
checkDerivative( totalDensCopy(), totalDens.value, dTotalDens[Deriv::dT],
232232
dT, relTol, absTol, "totalDens", "Temp" );
233233
checkDerivative( phaseCompFracCopy.toSliceConst(), phaseCompFrac.value.toSliceConst(), dPhaseCompFrac[Deriv::dT].toSliceConst(),
234234
dT, relTol, absTol, "phaseCompFrac", "Temp", phases, components );
@@ -277,7 +277,7 @@ void testNumericalDerivatives( MultiFluidBase & fluid,
277277
dC, relTol, absTol, "phaseDens", var, phases );
278278
checkDerivative( phaseViscCopy.toSliceConst(), phaseVisc.value.toSliceConst(), dPhaseVisc[Deriv::dC+jc].toSliceConst(),
279279
dC, relTol, absTol, "phaseVisc", var, phases );
280-
checkDerivative( totalDensCopy, totalDens.value, dTotalDens[Deriv::dC+jc],
280+
checkDerivative( totalDensCopy(), totalDens.value, dTotalDens[Deriv::dC+jc],
281281
dC, relTol, absTol, "totalDens", var );
282282
checkDerivative( phaseCompFracCopy.toSliceConst(), phaseCompFrac.value.toSliceConst(), dPhaseCompFrac[Deriv::dC+jc].toSliceConst(),
283283
dC, relTol, absTol, "phaseCompFrac", var, phases, components );

src/docs/doxygen/GeosxConfig.hpp

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Contains a CMake-generated list of macros that define a particular build configuration.
66
*/
77

8-
#ifndef GEOSX_COMMON_CONFIG_HPP
9-
#define GEOSX_COMMON_CONFIG_HPP
8+
#ifndef GEOS_COMMON_CONFIG_HPP
9+
#define GEOS_COMMON_CONFIG_HPP
1010

1111
/// Enables floating point exceptions
1212
#define GEOSX_USE_FPE
@@ -17,6 +17,9 @@
1717
/// Enables use of Caliper (CMake option ENABLE_CALIPER)
1818
#define GEOSX_USE_CALIPER
1919

20+
/// Enables use of Caliper (CMake option ENABLE_ADIAK)
21+
/* #undef GEOSX_USE_ADIAK */
22+
2023
/// Enables use of CHAI (CMake option ENABLE_CHAI)
2124
#define GEOSX_USE_CHAI
2225

@@ -27,13 +30,16 @@
2730
#define GEOSX_USE_MPI
2831

2932
/// Enables use of OpenMP (CMake option ENABLE_OPENMP)
30-
#define GEOSX_USE_OPENMP
33+
/* #undef GEOSX_USE_OPENMP */
3134

3235
/// Enables use of CUDA (CMake option ENABLE_CUDA)
33-
#define GEOSX_USE_CUDA
36+
/* #undef GEOS_USE_CUDA */
3437

3538
/// Enables use of CUDA NVToolsExt (CMake option ENABLE_CUDA_NVTOOLSEXT)
36-
#define GEOSX_USE_CUDA_NVTOOLSEXT
39+
/* #undef GEOS_USE_CUDA_NVTOOLSEXT */
40+
41+
/// Enables use of HIP (CMake option ENABLE_HIP)
42+
/* #undef GEOS_USE_HIP */
3743

3844
/// Enables use of PVTPackage (CMake option ENABLE_PVTPackage)
3945
#define GEOSX_USE_PVTPackage
@@ -59,8 +65,26 @@
5965
/// Enables use of Hypre library (CMake option ENABLE_HYPRE)
6066
#define GEOSX_USE_HYPRE
6167

62-
/// Macro defined when using cuda in HYPRE (CMake option ENABLE_HYPRE_CUDA)
63-
#define GEOSX_USE_HYPRE_CUDA
68+
#if defined( GEOSX_USE_HYPRE )
69+
/// Parsed hypre version information
70+
#define HYPRE_VERSION_MAJOR 2
71+
/// Parsed hypre version information
72+
#define HYPRE_VERSION_MINOR 28
73+
/// Parsed hypre version information
74+
#define HYPRE_VERSION_PATCH 0
75+
#endif
76+
77+
/// Denotes HYPRE using CPU
78+
#define GEOS_USE_HYPRE_CPU 0
79+
/// Denotes HYPRE using CUDA
80+
#define GEOS_USE_HYPRE_CUDA 1
81+
/// Denotes HYPRE using HIP
82+
#define GEOS_USE_HYPRE_HIP 2
83+
/// Macro determining what parellel interface hypre is using
84+
#define GEOS_USE_HYPRE_DEVICE GEOS_USE_HYPRE_CPU
85+
86+
/// Enables use of SuperLU_dist library through HYPRE (CMake option ENABLE_SUPERLU_DIST)
87+
#define GEOSX_USE_SUPERLU_DIST
6488

6589
/// Enables use of PETSc library (CMake option ENABLE_PETSC)
6690
#define GEOSX_USE_PETSC
@@ -98,17 +122,20 @@
98122
/// An integer flag representing the type that globalIndex will be aliased to.
99123
#define GEOSX_GLOBALINDEX_TYPE_FLAG 2
100124

125+
/// The default block size for GEOSX on this platform
126+
#define GEOSX_BLOCK_SIZE 32
127+
101128
/// Version information for HDF5
102129
#define HDF5_VERSION 1.12.1
103130

104131
/// Version information for Conduit
105132
#define Conduit_VERSION 0.8.6
106133

107134
/// Version information for RAJA
108-
#define RAJA_VERSION 2022.3.0
135+
#define RAJA_VERSION 2022.10.5
109136

110137
/// Version information for umpire
111-
#define umpire_VERSION 2022.3.0
138+
#define umpire_VERSION 2022.10.0
112139

113140
/// Version information for chai
114141
/* #undef chai_VERSION */
@@ -125,7 +152,7 @@
125152
/// Version information for ParMetis
126153
#define PARAMETIS_VERSION 4.0.3
127154

128-
/// Version information for scotch
155+
/// Version information for scotch
129156
#define scotch_VERSION 6.0.9
130157

131158
/// Version information for superlu_dist
@@ -135,17 +162,24 @@
135162
#define suitesparse_VERSION 5.7.9
136163

137164
/// Version information for VTK
138-
#define VTK_VERSION 9.2.20230310
165+
#define VTK_VERSION 9.2.20230719
139166

140167
/// Version information for fmt
141-
#define fmt_VERSION 8.0.1
168+
#define fmt_VERSION 9.1.0
142169

143170
/// Version information for python
144-
/* #undef Python3_VERSION */
171+
#define Python3_VERSION 3.11.3
145172

146173
/// Version information for CUDAToolkit
147174
/* #undef CUDAToolkit_VERSION */
148175

176+
#if defined(GEOS_USE_CUDA) || defined(GEOS_USE_HIP)
177+
// This needs to be placed into this header in order to appropriately replace
178+
// the old usage of GEOS_USE_CUDA, since we detect whether it is defined
179+
// rather than a value, not having it in the *same* header can cauase nebulous
180+
// compilation problems including the USD of arrays changing depending the scope
181+
#define GEOS_USE_DEVICE
182+
#endif
149183

150-
#endif /* GEOSX_CONFIG_HPP */
184+
#endif /* GEOS_CONFIG_HPP */
151185

0 commit comments

Comments
 (0)