diff --git a/SU2_CFD/src/fluid/CFluidFlamelet.cpp b/SU2_CFD/src/fluid/CFluidFlamelet.cpp index b4991e96c21..3e7c67c2c72 100644 --- a/SU2_CFD/src/fluid/CFluidFlamelet.cpp +++ b/SU2_CFD/src/fluid/CFluidFlamelet.cpp @@ -54,7 +54,7 @@ CFluidFlamelet::CFluidFlamelet(CConfig* config, su2double value_pressure_operati for (auto iCV = 0u; iCV < n_control_vars; iCV++) table_scalar_names[iCV] = config->GetControllingVariableName(iCV); /*--- auxiliary species transport equations---*/ - for (size_t i_aux = 0; i_aux < n_user_scalars; i_aux++) { + for (auto i_aux = 0u; i_aux < n_user_scalars; i_aux++) { table_scalar_names[n_control_vars + i_aux] = config->GetUserScalarName(i_aux); } diff --git a/SU2_CFD/src/meson.build b/SU2_CFD/src/meson.build index 43e8aaed5de..3b40822a34f 100644 --- a/SU2_CFD/src/meson.build +++ b/SU2_CFD/src/meson.build @@ -189,6 +189,11 @@ su2_cfd_src += files(['iteration/CIteration.cpp', su2_cfd_src += files(['limiters/CLimiterDetails.cpp']) +profiling_args = [] +if get_option('enable-gprof') + profiling_args = ['-pg','-no-pie'] +endif + if get_option('enable-normal') su2_cfd_lib = static_library('SU2core', su2_cfd_src, @@ -201,7 +206,8 @@ if get_option('enable-normal') 'SU2_CFD.cpp', install : true, dependencies : [su2_cfd_dep, su2_deps, common_dep], - cpp_args: ['-fPIC'] + [default_warning_flags, su2_cpp_args]) + cpp_args: ['-fPIC'] + [default_warning_flags, su2_cpp_args] + profiling_args, + link_args: profiling_args) endif if get_option('enable-autodiff') @@ -216,7 +222,8 @@ if get_option('enable-autodiff') 'SU2_CFD.cpp', install : true, dependencies : [su2_cfd_dep_ad, su2_deps, codi_dep, commonAD_dep], - cpp_args: ['-fPIC'] + [default_warning_flags, su2_cpp_args, codi_rev_args]) + cpp_args: ['-fPIC'] + [default_warning_flags, su2_cpp_args, codi_rev_args] + profiling_args, + link_args: profiling_args) endif if get_option('enable-directdiff') @@ -231,6 +238,7 @@ if get_option('enable-directdiff') 'SU2_CFD.cpp', install : true, dependencies : [su2_cfd_dep_dd, su2_deps, codi_dep, commonDD_dep], - cpp_args: ['-fPIC'] + [default_warning_flags, su2_cpp_args, codi_for_args]) + cpp_args: ['-fPIC'] + [default_warning_flags, su2_cpp_args, codi_for_args] + profiling_args, + link_args: profiling_args) endif diff --git a/meson_options.txt b/meson_options.txt index 7b2902bba0b..08fbac80669 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -20,7 +20,8 @@ option('extra-deps', type : 'string', value : '', description: 'comma-separated option('enable-mpp', type : 'boolean', value : false, description: 'enable Mutation++ support') option('install-mpp', type : 'boolean', value : false, description: 'install Mutation++ in the directory defined with --prefix') option('enable-coolprop', type : 'boolean', value : false, description: 'enable CoolProp support') -option('enable-mlpcpp', type : 'boolean', value : false, description: 'enable MLPCpp support') +option('enable-mlpcpp', type : 'boolean', value : false, description: 'enable profiling through gprof') +option('enable-gprof', type : 'boolean', value : false, description: 'enable MLPCpp support') option('opdi-backend', type : 'combo', choices : ['auto', 'macro', 'ompt'], value : 'auto', description: 'OpDiLib backend choice') option('codi-tape', type : 'combo', choices : ['JacobianLinear', 'JacobianReuse', 'JacobianMultiUse', 'PrimalLinear', 'PrimalReuse', 'PrimalMultiUse'], value : 'JacobianLinear', description: 'CoDiPack tape choice') option('opdi-shared-read-opt', type : 'boolean', value : true, description : 'OpDiLib shared reading optimization')