Skip to content

Commit

Permalink
Merge branch 'master' into LinearSolvers/spectra-eigenvalue
Browse files Browse the repository at this point in the history
  • Loading branch information
armingeiser committed Apr 14, 2021
2 parents 136d781 + 6c31497 commit f37a5dd
Show file tree
Hide file tree
Showing 741 changed files with 44,628 additions and 11,921 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/centos_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ cmake -H"${KRATOS_SOURCE}" -B"${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" \
${KRATOS_CMAKE_OPTIONS_FLAGS} \
-DUSE_MPI=OFF \
-DPYBIND11_PYTHON_VERSION="3.5" \
-DCMAKE_CXX_FLAGS="${KRATOS_CMAKE_CXX_FLAGS} -std=c++11 -O0 -fopenmp -Wall" \
-DUSE_COTIRE=ON \
-DCMAKE_CXX_FLAGS="${KRATOS_CMAKE_CXX_FLAGS} -std=c++11 -O0 -Wall" \
-DCMAKE_UNITY_BUILD=ON \

# Buid
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target all_unity -- -j1 && \
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install/fast -- -j1
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install -- -j2
204 changes: 165 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,10 @@ jobs:
compiler: [gcc, clang]
env:
KRATOS_BUILD_TYPE: ${{ matrix.build-type }}
MKLVARS_ARCHITECTURE: intel64
MKLVARS_INTERFACE: lp64

container:
image: kratosmultiphysics/kratos-image-ci-ubuntu-20-04:latest
options: --user 1001
env:
CCACHE_SLOPPINESS: pch_defines,time_macros
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: true
CCACHE_NODISABLE: true
CCACHE_MAXSIZE: 500M
FC: gfortran-7

steps:
- uses: rokroskar/[email protected]
Expand All @@ -39,24 +30,17 @@ jobs:

- uses: actions/checkout@v2

- name: Cache Build
id: cache-build
uses: actions/cache@v1
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.build-type }}-${{ matrix.compiler }}-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.build-type }}-${{ matrix.compiler }}-ccache-

- name: Build
shell: bash
run: |
if [ ${{ matrix.compiler }} = gcc ]; then
export CC=/usr/lib/ccache/gcc
export CXX=/usr/lib/ccache/g++
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export KRATOS_CMAKE_OPTIONS_FLAGS="-DUSE_EIGEN_MKL=ON -DUSE_EIGEN_FEAST=ON -DTRILINOS_EXCLUDE_AMESOS2_SOLVER=OFF -DMMG_ROOT=/external_libraries/mmg/mmg_5_5_1/ -DPMMG_ROOT=/external_libraries/ParMmg_5ffc6ad -DINCLUDE_PMMG=ON"
export KRATOS_CMAKE_CXX_FLAGS="-std=c++11 -Werror -Wno-deprecated-declarations -Wignored-qualifiers"
elif [ ${{ matrix.compiler }} = clang ]; then
export CC=clang-9
export CXX=clang++-9
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export KRATOS_CMAKE_CXX_FLAGS="-Werror -Wno-deprecated-declarations"
if [ ${{ matrix.build-type }} = FullDebug ]; then
export KRATOS_CMAKE_CXX_FLAGS="${KRATOS_CMAKE_CXX_FLAGS} -std=c++17"
Expand All @@ -68,59 +52,65 @@ jobs:
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/configure.sh configure.sh
bash configure.sh
ccache -s
- name: Running small tests
shell: bash
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
python3 kratos/python_scripts/run_tests.py -l small -c python3
- name: Running MPICore C++ tests (2 Cores)
shell: bash
timeout-minutes : 10
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
mpiexec -np 2 python3 kratos/python_scripts/run_cpp_mpi_tests.py --using-mpi
- name: Running MPICore C++ tests (3 Cores)
shell: bash
timeout-minutes : 10
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
mpiexec --oversubscribe -np 3 python3 kratos/python_scripts/run_cpp_mpi_tests.py --using-mpi
- name: Running MPICore C++ tests (4 Cores)
shell: bash
timeout-minutes : 10
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
mpiexec --oversubscribe -np 4 python3 kratos/python_scripts/run_cpp_mpi_tests.py --using-mpi
- name: Running Python MPI tests (2 Cores)
shell: bash
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l small -n 2
- name: Running Python MPI tests (3 Cores)
shell: bash
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l small -n 3 -f--oversubscribe
- name: Running Python MPI tests (4 Cores)
shell: bash
run: |
. /opt/intel/mkl/bin/mklvars.sh
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l small -n 4 -f--oversubscribe
Expand All @@ -135,18 +125,19 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Cache Build
id: cache-build
uses: actions/cache@v1
with:
path: build
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-

- name: Download boost
run: |
$url = "https://sourceforge.net/projects/boost/files/boost/1.74.0/boost_1_74_0.tar.gz/download"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
- name: Installing dependencies
shell: cmd
run: |
pip install numpy
pip install h5py
- name: Build
shell: cmd
Expand All @@ -170,8 +161,6 @@ jobs:
container:
image: kratosmultiphysics/kratos-image-ci-centos7-python35:latest
options: --user 1001
env:
FC: gfortran-7

steps:
- uses: rokroskar/[email protected]
Expand All @@ -190,3 +179,140 @@ jobs:
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
python3.5 kratos/python_scripts/run_tests.py -l small -c python3.5
ubuntu-without-unity:
runs-on: ubuntu-latest
env:
KRATOS_BUILD_TYPE: Custom

container:
image: kratosmultiphysics/kratos-image-ci-ubuntu-20-04:latest
env:
CCACHE_SLOPPINESS: pch_defines,time_macros
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: true
CCACHE_NODISABLE: true
CCACHE_MAXSIZE: 500M

steps:
- uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- uses: actions/checkout@v2

- name: Cache Build
id: cache-build
uses: actions/cache@v1
with:
path: ~/.ccache
key: ${{ runner.os }}-no-unity-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-no-unity-ccache-

- name: Build
shell: bash
run: |
export CC=/usr/lib/ccache/clang
export CXX=/usr/lib/ccache/clang++
export KRATOS_SOURCE="${KRATOS_SOURCE:-${PWD}}"
export KRATOS_BUILD="${KRATOS_SOURCE}/build"
export PYTHON_EXECUTABLE="/usr/bin/python3.8"
export KRATOS_INSTALL_PYTHON_USING_LINKS=ON
# Configure
cmake -H"${KRATOS_SOURCE}" -B"${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" \
-DUSE_MPI=ON \
-DPYBIND11_PYTHON_VERSION="3.8" \
-DINSTALL_RUNKRATOS=OFF
# Buid
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install -- -j2
ccache -s
ubuntu-intel:
runs-on: ubuntu-latest
env:
KRATOS_BUILD_TYPE: Custom

container:
image: kratosmultiphysics/kratos-image-ci-ubuntu-20-04:latest
options: --user 1001

steps:
- uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- uses: actions/checkout@v2

- name: Build
shell: bash
run: |
export CC=icc
export CXX=icpc
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/intel_configure.sh configure.sh
bash configure.sh
- name: Running small tests
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
python3 kratos/python_scripts/run_tests.py -l small -c python3
- name: Running MPICore C++ tests (2 Cores)
shell: bash
timeout-minutes : 10
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
mpiexec -np 2 python3 kratos/python_scripts/run_cpp_mpi_tests.py --using-mpi
- name: Running MPICore C++ tests (3 Cores)
shell: bash
timeout-minutes : 10
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
mpiexec --oversubscribe -np 3 python3 kratos/python_scripts/run_cpp_mpi_tests.py --using-mpi
- name: Running MPICore C++ tests (4 Cores)
shell: bash
timeout-minutes : 10
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
mpiexec --oversubscribe -np 4 python3 kratos/python_scripts/run_cpp_mpi_tests.py --using-mpi
- name: Running Python MPI tests (2 Cores)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l small -n 2
- name: Running Python MPI tests (3 Cores)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l small -n 3 -f--oversubscribe
- name: Running Python MPI tests (4 Cores)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l small -n 4 -f--oversubscribe
24 changes: 12 additions & 12 deletions .github/workflows/configure.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ShapeOptimizationA
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ConstitutiveLawsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\RANSApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\CompressiblePotentialFlowApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\RomApplication;

del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\cmake_install.cmake"
del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\CMakeCache.txt"
del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\CMakeFiles"

cmake ^
-G"Visual Studio 16 2019" ^
-H"%KRATOS_SOURCE%" ^
-B"%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" ^
-DBOOST_ROOT="%BOOST_ROOT_1_72_0%" ^
-DINSTALL_RUNKRATOS=OFF ^
-DCMAKE_CXX_FLAGS="/Od /we4661 /we4804 /WX" ^
-DFORCE_LOCAL_ZLIB_COMPILATION=ON ^
-DUSE_COTIRE=ON || goto :error

cmake --build "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" --target all_unity -- /property:configuration=%KRATOS_BUILD_TYPE% /p:Platform=x64 || goto :error
cmake --build "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" --target zlibstatic -- /property:configuration=%KRATOS_BUILD_TYPE% /p:Platform=x64 || goto :error
cmake ^
-G"Visual Studio 16 2019" ^
-H"%KRATOS_SOURCE%" ^
-B"%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" ^
-DBOOST_ROOT="%TEMP%\boost" ^
-DINSTALL_RUNKRATOS=OFF ^
-DCMAKE_CXX_FLAGS="/Od /we4661 /we4804 /WX /wd4996" ^
-DFORCE_LOCAL_ZLIB_COMPILATION=ON ^
-DCMAKE_UNITY_BUILD=ON || goto :error

cmake --build "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" --target all_build -- /property:configuration=%KRATOS_BUILD_TYPE% /p:Platform=x64 || goto :error
cmake --build "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" --target install -- /property:configuration=%KRATOS_BUILD_TYPE% /p:Platform=x64 || goto :error

goto :EOF
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ add_app ${KRATOS_APP_DIR}/MultilevelMonteCarloApplication;
add_app ${KRATOS_APP_DIR}/StatisticsApplication;
add_app ${KRATOS_APP_DIR}/SwimmingDEMApplication;
add_app ${KRATOS_APP_DIR}/ConstitutiveLawsApplication;
add_app ${KRATOS_APP_DIR}/RomApplication;

# Clean
clear
Expand All @@ -64,9 +65,8 @@ ${KRATOS_CMAKE_OPTIONS_FLAGS} \
-DTRILINOS_INCLUDE_DIR="/usr/include/trilinos" \
-DTRILINOS_LIBRARY_DIR="/usr/lib/x86_64-linux-gnu" \
-DTRILINOS_LIBRARY_PREFIX="trilinos_" \
-DUSE_COTIRE=ON \
-DCMAKE_UNITY_BUILD=ON \
-DINCLUDE_MMG=ON \

# Buid
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target all_unity -- -j1 && \
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install/fast -- -j1
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install -- -j2
Loading

0 comments on commit f37a5dd

Please sign in to comment.