Skip to content

Commit

Permalink
Merge branch 'master' into exlicit_variable_constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
philbucher committed Feb 11, 2020
2 parents 691fd39 + ae35657 commit 7bfccfd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 19 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ jobs:
fail-fast: false
matrix:
build-type: [Custom, FullDebug]
compiler: [gcc, clang]
env:
KRATOS_BUILD_TYPE: ${{ matrix.build-type }}
MKLVARS_ARCHITECTURE: intel64
MKLVARS_INTERFACE: lp64

container:
image: oberbichler/kratos-dev:latest
Expand All @@ -27,8 +30,6 @@ jobs:
CCACHE_NODISABLE: true
CCACHE_MAXSIZE: 500M
FC: gfortran-7
CC: /usr/lib/ccache/gcc
CXX: /usr/lib/ccache/g++

steps:
- uses: actions/checkout@v2
Expand All @@ -38,13 +39,23 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-ccache-
key: ${{ runner.os }}-${{ matrix.build-type }}-${{ matrix.compiler }}-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.build-type }}-${{ matrix.compiler }}-ccache-

- name: Build
run: |
export MKLVARS_ARCHITECTURE=intel64
export MKLVARS_INTERFACE=lp64
if [ ${{ matrix.compiler }} = gcc ]; then
export CC=/usr/lib/ccache/gcc
export CXX=/usr/lib/ccache/g++
export KRATOS_CMAKE_OPTIONS_FLAGS="-DUSE_EIGEN_MKL=ON"
export KRATOS_CMAKE_CXX_FLAGS="-Wignored-qualifiers -Werror=ignored-qualifiers -Werror=suggest-override -Werror=unused-variable -Werror=misleading-indentation -Werror=return-type -Werror=sign-compare -Werror=unused-but-set-variable -Werror=unused-local-typedefs -Werror=reorder -Werror=maybe-uninitialized -Wno-deprecated-declarations"
elif [ ${{ matrix.compiler }} = clang ]; then
export CC=clang-9
export CXX=clang++-9
else
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi
. /opt/intel/mkl/bin/mklvars.sh
cp .github/workflows/configure.sh configure.sh
bash configure.sh
Expand All @@ -53,8 +64,6 @@ jobs:
- name: Running small tests
if: github.event_name == 'pull_request'
run: |
export MKLVARS_ARCHITECTURE=intel64
export MKLVARS_INTERFACE=lp64
. /opt/intel/mkl/bin/mklvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
Expand All @@ -63,8 +72,6 @@ jobs:
- name: Running nightly tests
if: github.event_name == 'schedule' # this is the nightly build
run: |
export MKLVARS_ARCHITECTURE=intel64
export MKLVARS_INTERFACE=lp64
. /opt/intel/mkl/bin/mklvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${{ matrix.build-type }}/libs
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ echo "Kratos build type is ${KRATOS_BUILD_TYPE}"

# Configure
cmake -H"${KRATOS_SOURCE}" -B"${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" \
${KRATOS_CMAKE_OPTIONS_FLAGS} \
-DUSE_MPI=ON \
-DPYBIND11_PYTHON_VERSION="3.6" \
-DCMAKE_CXX_FLAGS="-O0 -fopenmp -Wall \
-Wignored-qualifiers -Werror=ignored-qualifiers -Werror=suggest-override -Werror=unused-variable \
-Werror=misleading-indentation -Werror=return-type \
-Werror=sign-compare -Werror=unused-but-set-variable \
-Werror=unused-local-typedefs -Werror=reorder -Werror=maybe-uninitialized -Wno-deprecated-declarations" \
-DCMAKE_CXX_FLAGS="${KRATOS_CMAKE_CXX_FLAGS} -std=c++11 -O0 -fopenmp -Wall" \
-DTRILINOS_INCLUDE_DIR="/usr/include/trilinos" \
-DTRILINOS_LIBRARY_DIR="/usr/lib/x86_64-linux-gnu" \
-DTRILINOS_LIBRARY_PREFIX="trilinos_" \
Expand All @@ -69,8 +66,7 @@ cmake -H"${KRATOS_SOURCE}" -B"${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" \
-DMMG_LIBRARY="/usr/local/lib/libmmg.so" \
-DMMG2D_LIBRARY="/usr/local/lib/libmmg2d.so" \
-DMMG3D_LIBRARY="/usr/local/lib/libmmg3d.so" \
-DMMGS_LIBRARY="/usr/local/lib/libmmgs.so" \
-DUSE_EIGEN_MKL=ON
-DMMGS_LIBRARY="/usr/local/lib/libmmgs.so"

# Buid
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target all_unity -- -j1
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
project (KratosMultiphysics)
cmake_minimum_required (VERSION 2.8.6)
set (CMAKE_CXX_STANDARD 11)

# Setting some policies
# No recursive dereferencing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,8 @@ namespace Kratos {
ProcessInfo& r_fem_process_info = r_fem_model_part.GetProcessInfo();
ConditionsArrayType& pConditions = r_fem_model_part.GetCommunicator().LocalMesh().Conditions();

RebuildListOfSphericParticles<SphericParticle>(r_model_part.GetCommunicator().LocalMesh().Elements(), mListOfSphericParticles);

SetNormalRadiiOnAllParticles(*mpDem_model_part);

#pragma omp parallel
Expand Down
2 changes: 2 additions & 0 deletions applications/EigenSolversApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ if( USE_EIGEN_MKL MATCHES ON )
find_library(MKL_RT_LIB mkl_rt)
message( "mkl_rt.lib found at: ${MKL_RT_LIB}")
target_link_libraries( KratosEigenSolversCore PUBLIC ${MKL_RT_LIB} )
elseif( ${CMAKE_CXX_COMPILER_ID} MATCHES Clang )
message( FATAL_ERROR "Clang does not yet support MKL" )
else( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" )
target_link_libraries( KratosEigenSolversCore PUBLIC mkl_rt )
endif( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" )
Expand Down
2 changes: 0 additions & 2 deletions kratos/python/add_utilities_to_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@

// #include "utilities/signed_distance_calculator_bin_based.h"
#include "utilities/timer.h"

#include "utilities/binbased_fast_point_locator.h"
#include "utilities/binbased_fast_point_locator_conditions.h"
#include "utilities/binbased_nodes_in_element_locator.h"
#include "utilities/embedded_skin_utility.h"
#include "utilities/geometry_tester.h"
#include "utilities/cutting_utility.h"

#include "utilities/python_function_callback_utility.h"
#include "utilities/interval_utility.h"
#include "utilities/table_stream_utility.h"
Expand Down
3 changes: 3 additions & 0 deletions kratos/utilities/read_materials_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class KRATOS_API(KRATOS_CORE) ReadMaterialsUtility
*/
ReadMaterialsUtility(const std::string& rParametersName, Model& rModel);

/// Destructor.
virtual ~ReadMaterialsUtility() {}

///@}
///@name Operators
///@{
Expand Down

0 comments on commit 7bfccfd

Please sign in to comment.