Skip to content

Commit 33adee2

Browse files
authored
Merge pull request #975 from su2code/hybrid_parallel_bcs
Hybrid parallel boundary conditions for turbulence and compressible flow solvers
2 parents 6d8f36f + ef9eac3 commit 33adee2

44 files changed

Lines changed: 1712 additions & 2278 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/regression.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI]
19+
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP]
2020
include:
2121
- config_set: BaseMPI
2222
flags: '-Denable-pywrapper=true -Denable-tests=true --werror'
@@ -30,6 +30,8 @@ jobs:
3030
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --werror'
3131
- config_set: ForwardNoMPI
3232
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --werror'
33+
- config_set: BaseOMP
34+
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --werror'
3335
runs-on: ubuntu-latest
3436
steps:
3537
- name: Cache Object Files
@@ -54,7 +56,7 @@ jobs:
5456
strategy:
5557
fail-fast: false
5658
matrix:
57-
testscript: ['tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py']
59+
testscript: ['tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py']
5860
include:
5961
- testscript: 'tutorials.py'
6062
tag: MPI
@@ -66,31 +68,22 @@ jobs:
6668
tag: NoMPI
6769
- testscript: 'serial_regression_AD.py'
6870
tag: NoMPI
71+
- testscript: 'hybrid_regression.py'
72+
tag: OMP
6973
steps:
70-
- name: Download Base
71-
uses: actions/download-artifact@v1
72-
with:
73-
name: ${{format('Base{0}', matrix.tag)}}
74-
- name: Download Reverse
75-
uses: actions/download-artifact@v1
76-
with:
77-
name: ${{format('Reverse{0}', matrix.tag)}}
78-
- name: Download Forward
79-
uses: actions/download-artifact@v1
80-
with:
81-
name: ${{format('Forward{0}', matrix.tag)}}
74+
- name: Download All artifact
75+
uses: actions/download-artifact@v2
8276
- name: Move Binaries
8377
run: |
8478
mkdir -p install/bin
85-
cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/
86-
cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/
87-
cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/
88-
chmod a+x install/bin/*
79+
if [ -d "${{format('Base{0}', matrix.tag)}}" ]; then cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/; fi
80+
if [ -d "${{format('Reverse{0}', matrix.tag)}}" ]; then cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/; fi
81+
if [ -d "${{format('Forward{0}', matrix.tag)}}" ]; then cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/; fi
82+
chmod a+x install/bin/*
8983
- name: Run Tests in Container
9084
uses: docker://su2code/test-su2:20200303
9185
with:
9286
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
93-
9487
unit_tests:
9588
runs-on: ubuntu-latest
9689
name: Unit Tests
@@ -125,7 +118,7 @@ jobs:
125118
cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/
126119
cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/
127120
cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/
128-
chmod a+x install/bin/*
121+
chmod a+x install/bin/*
129122
- name: Run Unit Tests
130123
uses: docker://su2code/test-su2:20191031
131124
with:

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ env:
3737
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true"
3838
TEST_SCRIPT=parallel_regression.py
3939

40+
# Hybrid-parallel build and test
41+
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false"
42+
TEST_SCRIPT=hybrid_regression.py
43+
4044
# Serial build and test for AD
4145
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true -Dwith-mpi=disabled -Denable-autodiff=true -Denable-directdiff=true"
4246
TEST_SCRIPT=serial_regression_AD.py
4347

44-
# Parallel build and test for AD:
48+
# Parallel build and test for AD
4549
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true -Denable-autodiff=true"
4650
TEST_SCRIPT=parallel_regression_AD.py
4751

@@ -51,7 +55,7 @@ before_install:
5155
- sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
5256
# Install the necessary packages using apt-get with sudo
5357
- sudo apt-get update -qq
54-
- sudo apt-get install -qq build-essential python3-numpy python3-scipy libopenmpi-dev openmpi-bin swig python3-mpi4py
58+
- sudo apt-get install -qq build-essential python3-numpy python3-scipy libopenmpi-dev openmpi-bin swig python3-mpi4py
5559
# to avoid interference with MPI
5660
- test -n $CC && unset CC
5761
- test -n $CXX && unset CXX

Common/include/CConfig.hpp

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include <assert.h>
4545

4646
#include "./option_structure.hpp"
47-
#include "./datatype_structure.hpp"
4847

4948
#ifdef HAVE_CGNS
5049
#include "cgnslib.h"
@@ -1282,7 +1281,7 @@ class CConfig {
12821281
* \brief Constructor of the class which takes an istream buffer containing the config options.
12831282
*/
12841283
CConfig(istream &case_buffer, unsigned short val_software, bool verb_high);
1285-
1284+
12861285
/*!
12871286
* \brief Constructor of the class which reads the input file and uses default options from another config.
12881287
*/
@@ -1302,7 +1301,7 @@ class CConfig {
13021301
* \brief Destructor of the class.
13031302
*/
13041303
~CConfig(void);
1305-
1304+
13061305
/*!
13071306
* \brief Initialize common fields of the config structure.
13081307
*/
@@ -8009,8 +8008,8 @@ class CConfig {
80098008
/*!
80108009
* \brief Set the config file parsing.
80118010
*/
8012-
void SetConfig_Parsing(istream &config_buffer);
8013-
8011+
void SetConfig_Parsing(istream &config_buffer);
8012+
80148013
/*!
80158014
* \brief Set the config file parsing.
80168015
*/
@@ -8340,26 +8339,6 @@ class CConfig {
83408339
*/
83418340
unsigned long GetNonphysical_Reconstr(void) const { return Nonphys_Reconstr; }
83428341

8343-
/*!
8344-
* \brief Given arrays x[1..n] and y[1..n] containing a tabulated function, i.e., yi = f(xi), with
8345-
x1 < x2 < . . . < xN , and given values yp1 and ypn for the first derivative of the interpolating
8346-
function at points 1 and n, respectively, this routine returns an array y2[1..n] that contains
8347-
the second derivatives of the interpolating function at the tabulated points xi. If yp1 and/or
8348-
ypn are equal to 1 × 1030 or larger, the routine is signaled to set the corresponding boundary
8349-
condition for a natural spline, with zero second derivative on that boundary.
8350-
Numerical Recipes: The Art of Scientific Computing, Third Edition in C++.
8351-
*/
8352-
void SetSpline(vector<su2double> &x, vector<su2double> &y, unsigned long n, su2double yp1, su2double ypn, vector<su2double> &y2);
8353-
8354-
/*!
8355-
* \brief Given the arrays xa[1..n] and ya[1..n], which tabulate a function (with the xai’s in order),
8356-
and given the array y2a[1..n], which is the output from spline above, and given a value of
8357-
x, this routine returns a cubic-spline interpolated value y.
8358-
Numerical Recipes: The Art of Scientific Computing, Third Edition in C++.
8359-
* \return The interpolated value of for x.
8360-
*/
8361-
su2double GetSpline(vector<su2double> &xa, vector<su2double> &ya, vector<su2double> &y2a, unsigned long n, su2double x);
8362-
83638342
/*!
83648343
* \brief Start the timer for profiling subroutines.
83658344
* \param[in] val_start_time - the value of the start time.
File renamed without changes.
File renamed without changes.

Common/include/blas_structure.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* SU2 Project Website: https://su2code.github.io
1010
*
11-
* The SU2 Project is maintained by the SU2 Foundation
11+
* The SU2 Project is maintained by the SU2 Foundation
1212
* (http://su2foundation.org)
1313
*
1414
* Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md)
@@ -29,7 +29,6 @@
2929

3030
#pragma once
3131

32-
#include "datatype_structure.hpp"
3332
#include "CConfig.hpp"
3433

3534
/* LIBXSMM include files, if supported. */
@@ -39,7 +38,7 @@
3938

4039
/*!
4140
* \class CBlasStructure
42-
* \brief Class, which serves as an interface to the BLAS functionalities needed.
41+
* \brief Class, which serves as an interface to the BLAS functionalities needed.
4342
* \author: E. van der Weide
4443
* \version 7.0.4 "Blackbird"
4544
*/

Common/include/fem/geometry_structure_fem_part.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#pragma once
2929

30-
#include "../datatype_structure.hpp"
30+
#include "../basic_types/datatype_structure.hpp"
3131

3232
#include <vector>
3333
#include <algorithm>

Common/include/interface_interpolation/CInterpolator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
#pragma once
2828

29-
#include "../../include/datatype_structure.hpp"
29+
#include "../../include/basic_types/datatype_structure.hpp"
3030
#include "../../include/toolboxes/C2DContainer.hpp"
3131
#include <vector>
3232

Common/include/linear_algebra/CSysMatrix.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class CSysMatrix {
353353
void Initialize(unsigned long npoint, unsigned long npointdomain,
354354
unsigned short nvar, unsigned short neqn,
355355
bool EdgeConnect, CGeometry *geometry,
356-
CConfig *config, bool needTranspPtr = false);
356+
const CConfig *config, bool needTranspPtr = false);
357357

358358
/*!
359359
* \brief Sets to zero all the entries of the sparse matrix.

Common/include/mpi_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <map>
3434
#endif
3535

36-
#include "./datatype_structure.hpp"
36+
#include "basic_types/datatype_structure.hpp"
3737
#include <stdlib.h>
3838
#ifndef _MSC_VER
3939
#include <unistd.h>

0 commit comments

Comments
 (0)