Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
82b9edf
add basic simd type
pcarruscag Jun 10, 2020
058a5b8
begin prototype of simd numerics
pcarruscag Jun 14, 2020
2d2961a
Merge branch 'feature_quasi_newton_adjoint' into feature_simd_numerics
pcarruscag Jun 17, 2020
1bfea72
Merge branch 'iteration_class' into feature_simd_numerics
pcarruscag Jun 17, 2020
e41c6f6
optimize least squares gradients when periodic comms are not needed
pcarruscag Jun 17, 2020
07d325f
use CRTP for static polymorphism
pcarruscag Jun 17, 2020
8eeac65
fix search/replace mistakes
pcarruscag Jun 17, 2020
c24cd1c
fix LS gradients preacc
pcarruscag Jun 17, 2020
20a7edc
add iterators to C2DContainer, fix compiler errors
pcarruscag Jun 18, 2020
b72ac57
Merge branch 'feature_quasi_newton_adjoint' into feature_simd_numerics
pcarruscag Jun 18, 2020
d43c6ad
add SIMD set methods to CSysVector and CSysMatrix, fix 1000 compilati…
pcarruscag Jun 18, 2020
ff0ea0b
codefactor
pcarruscag Jun 18, 2020
7e47d1a
make new numerics compatible with non-SIMD types (for AD)
pcarruscag Jun 19, 2020
06956b6
fetching edge nodes needs gather due to coloring, add C3DContainerDec…
pcarruscag Jun 20, 2020
112bf04
improving and cleaning re-orientation checks
pcarruscag Jun 20, 2020
b2db9ba
optimize least squares gradients when periodic comms are not needed
pcarruscag Jun 17, 2020
a711554
fix LS gradients preacc
pcarruscag Jun 17, 2020
d905213
Merge branch 'cleanup_orientation_checks' into feature_simd_numerics
pcarruscag Jun 20, 2020
80b9453
Merge branch 'cleanup_orientation_checks' into feature_simd_numerics
pcarruscag Jun 21, 2020
c2b7049
use scale factor in vector and matrix updates as a mask to handle "re…
pcarruscag Jun 22, 2020
88a6c33
template mechanism for static decorator pattern
pcarruscag Jun 22, 2020
5fedf08
small LS cleanups and comments
pcarruscag Jun 22, 2020
6054e08
small LS cleanups and comments
pcarruscag Jun 22, 2020
4d88298
Merge branch 'cleanup_orientation_checks' into feature_simd_numerics
pcarruscag Jun 22, 2020
691df95
fix UB, 0*Nan is Nan
pcarruscag Jun 22, 2020
4f42705
need explicit SIMD directive for gcc to vectorize
pcarruscag Jun 24, 2020
31bf94a
fix a couple bugs, replace iterators by "bulk get" methods (gather is…
pcarruscag Jun 24, 2020
e01268b
hack to run simd numerics for simple Euler+Roe problems
pcarruscag Jun 24, 2020
22cd824
fix a bug, wrong vector used for reduction strategy
pcarruscag Jun 24, 2020
1c8c66d
viscous numerics implementation
pcarruscag Jun 26, 2020
97328c9
Merge branch 'feature_quasi_newton_adjoint' into feature_simd_numerics
pcarruscag Jun 26, 2020
0c52649
reduce duplication between 2D and 3D containers
pcarruscag Jun 26, 2020
6078a64
Merge branch 'feature_quasi_newton_adjoint' into feature_simd_numerics
pcarruscag Jun 26, 2020
ac0853f
Merge branch 'feature_quasi_newton_adjoint' into feature_simd_numerics
pcarruscag Jun 26, 2020
f9f743b
i/j update in CSysVector, fix a bug in viscous flux jacobian
pcarruscag Jun 27, 2020
a4b0228
AVX specialization for Array of 4 doubles
pcarruscag Jun 27, 2020
20cd051
small manual optim of some functions, remove get prefix from functions
pcarruscag Jun 27, 2020
2b9e5bb
make a directory for container types
pcarruscag Jun 27, 2020
debea7a
implement low dissip Roe and QCR in viscous fluxes
pcarruscag Jun 28, 2020
3cded55
split files, factory method
pcarruscag Jun 29, 2020
4c26d72
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jun 29, 2020
23c2a93
fix overload resolution issues in gcc 5
pcarruscag Jun 30, 2020
0dec543
Merge branch 'small_least_squares_improvement' into feature_simd_nume…
pcarruscag Jul 2, 2020
0a060b0
Merge branch 'cleanup_orientation_checks' into feature_simd_numerics
pcarruscag Jul 2, 2020
2d2ae09
optimize gradients and limiters for 2D 3D, reduce Rmatrix storage ove…
pcarruscag Jul 2, 2020
5820eb3
fix bug, clean a few lines
pcarruscag Jul 2, 2020
bdc61d3
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 2, 2020
446c042
fix ILU allocation logic for DEF/DOT
pcarruscag Jul 3, 2020
cc3ac7d
assume contiguous edges when loading iPoint jPoint
pcarruscag Jul 3, 2020
835f903
a little range for syntax sugar
pcarruscag Jul 3, 2020
c3d125a
small bug GetPoints -> GetEdges
pcarruscag Jul 4, 2020
acc8035
little cleanup
pcarruscag Jul 5, 2020
4783798
cleanup MKL JIT if def's
pcarruscag Jul 6, 2020
de0eb13
automatic preaccumulation when gathering variables
pcarruscag Jul 6, 2020
03f3a9d
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 6, 2020
12b80c6
option to use vectorization
pcarruscag Jul 6, 2020
9f71420
clean up of mixed precision ifdefs, replaced by sfinae
pcarruscag Jul 7, 2020
af01f5a
gradient unit tests
pcarruscag Jul 7, 2020
56a2706
missing file in previous commit
pcarruscag Jul 7, 2020
0d931b3
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 7, 2020
891fa3d
change some tests to use vectorization, tweak LS grads a bit more for…
pcarruscag Jul 7, 2020
a6d0b5f
one AD testcase
pcarruscag Jul 8, 2020
c7b65ec
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 9, 2020
68cb364
update tests
pcarruscag Jul 9, 2020
f23f4b6
avx512 specialization, general case using expression templates
pcarruscag Jul 10, 2020
f8a973a
use expression templates in CSysVector
pcarruscag Jul 10, 2020
540e58a
fix mem leak, format code
pcarruscag Jul 11, 2020
b1a10d8
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 11, 2020
9be871e
allow default construction of CSysVector in parallel
pcarruscag Jul 12, 2020
b0dfd9c
use the simd type also for AD
pcarruscag Jul 14, 2020
20d616d
fix directdiff build
pcarruscag Jul 14, 2020
248acea
fix icc compilation issue
pcarruscag Jul 17, 2020
9ae8974
cleanup enable_if syntax, SSE SIMD specialization, make vector expres…
pcarruscag Jul 19, 2020
c36c722
fix unit test build
pcarruscag Jul 19, 2020
7183a09
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 19, 2020
8cd90f8
change a name
pcarruscag Jul 20, 2020
26bafaf
Merge remote-tracking branch 'jblueh/codi_medi_update' into feature_s…
pcarruscag Jul 20, 2020
80f33c0
vectorized central schemes, cleanup static polymorphism mechanism
pcarruscag Jul 20, 2020
4e42b7c
optimize muscl logic to allow data reuse when computing viscous fluxe…
pcarruscag Jul 21, 2020
2f43aff
Merge branch 'fix_jst_ke' into feature_simd_numerics
pcarruscag Jul 21, 2020
a81a76d
Merge branch 'cleanup_flow_solver_duplication' into feature_simd_nume…
pcarruscag Jul 21, 2020
9932c05
implement logical SIMD operations
pcarruscag Jul 22, 2020
5f1af74
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 22, 2020
33e5445
unnecessary cast
pcarruscag Jul 22, 2020
230b047
move some methods to FVMBase
pcarruscag Jul 23, 2020
0491d4b
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 23, 2020
5554134
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Jul 24, 2020
5a5778b
fix issue with min/max expressions, unit tests for SIMD-type
pcarruscag Jul 24, 2020
f01c820
fix AD build
pcarruscag Jul 24, 2020
1623055
JST scheme with matrix dissipation
pcarruscag Jul 27, 2020
b288045
add config options
pcarruscag Jul 27, 2020
3743af9
fix bug with instantiation of Lax
pcarruscag Jul 27, 2020
0031e79
Merge branch 'feature_simd_numerics' into feature_jst_matrix
pcarruscag Jul 27, 2020
826e330
Merge branch 'develop' into feature_simd_numerics
pcarruscag Aug 3, 2020
d4602a7
fix leak introduced in #877
pcarruscag Aug 4, 2020
87b2d94
Merge branch 'feature_simd_numerics' into feature_jst_matrix
pcarruscag Aug 4, 2020
f57f4b5
add topology outputs
pcarruscag Aug 7, 2020
4ea0628
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Aug 7, 2020
6621d1d
fix clang issues
pcarruscag Aug 8, 2020
1f8bddb
Merge branch 'feature_simd_numerics' into feature_jst_matrix
pcarruscag Aug 8, 2020
4ced288
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Aug 11, 2020
2efb124
fix clang debug AD build issue
pcarruscag Aug 11, 2020
beb8688
re update testcases after merge with develop
pcarruscag Aug 11, 2020
10b56e9
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Sep 4, 2020
94cd99d
Merge branch 'feature_simd_numerics' into feature_jst_matrix
pcarruscag Sep 4, 2020
c98b530
Merge branch 'develop' into feature_simd_numerics
pcarruscag Sep 5, 2020
802d3ef
Merge branch 'develop' into feature_simd_numerics
pcarruscag Sep 7, 2020
1414f3f
Merge branch 'feature_simd_numerics' into feature_jst_matrix
pcarruscag Sep 8, 2020
99988b5
Merge remote-tracking branch 'upstream/develop' into feature_jst_matrix
pcarruscag Sep 27, 2020
d43a50b
address PR comments, fix iDim==3 issues
pcarruscag Sep 27, 2020
bd8d88f
Merge remote-tracking branch 'upstream/develop' into feature_simd_num…
pcarruscag Sep 27, 2020
6ea6116
update config_template
pcarruscag Sep 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include <map>
#include <assert.h>

#include "./option_structure.hpp"
#include "./toolboxes/C2DContainer.hpp"
#include "option_structure.hpp"
#include "containers/container_decorators.hpp"

#ifdef HAVE_CGNS
#include "cgnslib.h"
Expand Down Expand Up @@ -419,6 +419,7 @@ class CConfig {
su2double *RK_Alpha_Step; /*!< \brief Runge-Kutta beta coefficients. */

unsigned short nQuasiNewtonSamples; /*!< \brief Number of samples used in quasi-Newton solution methods. */
bool UseVectorization; /*!< \brief Whether to use vectorized numerics schemes. */

unsigned short nMGLevels; /*!< \brief Number of multigrid levels (coarse levels). */
unsigned short nCFL; /*!< \brief Number of CFL, one for each multigrid level. */
Expand Down Expand Up @@ -591,10 +592,10 @@ class CConfig {
*Kappa_AdjFlow, /*!< \brief Numerical dissipation coefficients for the adjoint flow equations. */
*Kappa_Heat; /*!< \brief Numerical dissipation coefficients for the (fvm) heat equation. */
su2double* FFD_Axis; /*!< \brief Numerical dissipation coefficients for the adjoint equations. */
su2double Kappa_1st_AdjFlow, /*!< \brief JST 1st order dissipation coefficient for adjoint flow equations (coarse multigrid levels). */
su2double Kappa_1st_AdjFlow, /*!< \brief Lax 1st order dissipation coefficient for adjoint flow equations (coarse multigrid levels). */
Kappa_2nd_AdjFlow, /*!< \brief JST 2nd order dissipation coefficient for adjoint flow equations. */
Kappa_4th_AdjFlow, /*!< \brief JST 4th order dissipation coefficient for adjoint flow equations. */
Kappa_1st_Flow, /*!< \brief JST 1st order dissipation coefficient for flow equations (coarse multigrid levels). */
Kappa_1st_Flow, /*!< \brief Lax 1st order dissipation coefficient for flow equations (coarse multigrid levels). */
Kappa_2nd_Flow, /*!< \brief JST 2nd order dissipation coefficient for flow equations. */
Kappa_4th_Flow, /*!< \brief JST 4th order dissipation coefficient for flow equations. */
Kappa_2nd_Heat, /*!< \brief 2nd order dissipation coefficient for heat equation. */
Expand Down Expand Up @@ -1164,7 +1165,7 @@ class CConfig {
ionization; /*!< \brief Flag for determining if free electron gas is in the mixture. */
string GasModel, /*!< \brief Gas Model. */
*Wall_Catalytic; /*!< \brief Pointer to catalytic walls. */

/*!
* \brief Set the default values of config options not set in the config file using another config object.
* \param config - Config object to use the default values from.
Expand Down Expand Up @@ -4114,6 +4115,11 @@ class CConfig {
*/
unsigned short GetnQuasiNewtonSamples(void) const { return nQuasiNewtonSamples; }

/*!
* \brief Get whether to use vectorized numerics (if available).
*/
bool GetUseVectorization(void) const { return UseVectorization; }

/*!
* \brief Get the relaxation coefficient of the linear solver for the implicit formulation.
* \return relaxation coefficient of the linear solver for the implicit formulation.
Expand Down Expand Up @@ -4509,7 +4515,7 @@ class CConfig {
* during the computation.
* \return Kind of center convective numerical scheme for the flow equations.
*/
unsigned short GetKind_Centered_Flow(void) const { return Kind_Centered_Flow; }
ENUM_CENTERED GetKind_Centered_Flow(void) const { return static_cast<ENUM_CENTERED>(Kind_Centered_Flow); }

/*!
* \brief Get the kind of center convective numerical scheme for the plasma equations.
Expand Down
2 changes: 1 addition & 1 deletion Common/include/CMultiGridQueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#pragma once

#include <vector>
#include "toolboxes/CFastFindAndEraseQueue.hpp"
#include "containers/CFastFindAndEraseQueue.hpp"
#include "geometry/CGeometry.hpp"

using namespace std;
Expand Down
18 changes: 14 additions & 4 deletions Common/include/basic_types/ad_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ namespace AD{
/*--- Base case for parameter pack expansion. ---*/
FORCEINLINE void SetPreaccIn() {}

template<class T, class... Ts,
typename std::enable_if<std::is_same<T,su2double>::value,bool>::type = 0>
template<class T, class... Ts, su2enable_if<std::is_same<T,su2double>::value> = 0>
FORCEINLINE void SetPreaccIn(const T& data, Ts&&... moreData) {
if (!PreaccActive) return;
if (data.isActive())
Expand Down Expand Up @@ -385,6 +384,18 @@ namespace AD{
}
}

template<class T>
FORCEINLINE void SetPreaccIn(const T& data, const int size_x, const int size_y, const int size_z) {
if (!PreaccActive) return;
for (int i = 0; i < size_x; i++) {
for (int j = 0; j < size_y; j++) {
for (int k = 0; k < size_z; k++) {
if (data[i][j][k].isActive()) PreaccHelper.addInput(data[i][j][k]);
}
}
}
}

FORCEINLINE void StartPreacc() {
if (globalTape.isActive() && PreaccEnabled) {
PreaccHelper.start();
Expand All @@ -395,8 +406,7 @@ namespace AD{
/*--- Base case for parameter pack expansion. ---*/
FORCEINLINE void SetPreaccOut() {}

template<class T, class... Ts,
typename std::enable_if<std::is_same<T,su2double>::value,bool>::type = 0>
template<class T, class... Ts, su2enable_if<std::is_same<T,su2double>::value> = 0>
FORCEINLINE void SetPreaccOut(T& data, Ts&&... moreData) {
if (!PreaccActive) return;
if (data.isActive())
Expand Down
15 changes: 13 additions & 2 deletions Common/include/basic_types/datatype_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@
#define FORCEINLINE inline
#endif

#if defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER)
#define NEVERINLINE inline __attribute__((noinline))
#else
#define NEVERINLINE inline
#endif

/*--- Convenience SFINAE typedef to conditionally
* enable/disable function template overloads. ---*/
template<bool condition>
using su2enable_if = typename std::enable_if<condition,bool>::type;

/*--- Depending on the datatype defined during the configuration,
* include the correct definition, and create the main typedef. ---*/

Expand Down Expand Up @@ -194,10 +205,10 @@ namespace SU2_TYPE {

/*--- Special handling of the sprintf routine for non-primitive types. ---*/
/*--- Pass-through for built-in types. ---*/
template<class T, typename std::enable_if<std::is_trivial<T>::value,bool>::type = 0>
template<class T, su2enable_if<std::is_trivial<T>::value> = 0>
FORCEINLINE const T& _printGetValue(const T& val) {return val;}
/*--- Overload for expressions of active types. ---*/
template<class T, typename std::enable_if<!std::is_trivial<T>::value,bool>::type = 0>
template<class T, su2enable_if<!std::is_trivial<T>::value> = 0>
FORCEINLINE passivedouble _printGetValue(const T& val) { return val.getValue(); }

/*!
Expand Down
Loading