Commit 0b8a21ab authored by Christian Godenschwager's avatar Christian Godenschwager

Merge branch '24-add-builds-for-gcc-7' into 'master'

Resolve "Add builds for GCC 7"

Closes #24

See merge request !37
parents 077061c0 e68e1dc8
Pipeline #6658 passed with stages
in 347 minutes and 39 seconds
...@@ -28,7 +28,7 @@ stages: ...@@ -28,7 +28,7 @@ stages:
- mkdir $CI_PROJECT_DIR/build - mkdir $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build - cd $CI_PROJECT_DIR/build
- if dpkg --compare-versions `ompi_info | head -2 | tail -1 | sed 's/[^0-9.]*\([0-9.]*\).*/\1/'` ge 1.10; then export MPIEXEC_PREFLAGS="--allow-run-as-root" ; fi - if dpkg --compare-versions `ompi_info | head -2 | tail -1 | sed 's/[^0-9.]*\([0-9.]*\).*/\1/'` ge 1.10; then export MPIEXEC_PREFLAGS="--allow-run-as-root" ; fi
- cmake .. -DWALBERLA_BUFFER_DEBUG=$WALBERLA_BUFFER_DEBUG -DWALBERLA_BUILD_TESTS=ON -DWALBERLA_BUILD_BENCHMARKS=ON -DWALBERLA_BUILD_TUTORIALS=ON -DWALBERLA_BUILD_WITH_MPI=$WALBERLA_BUILD_WITH_MPI -DWALBERLA_BUILD_WITH_CUDA=$WALBERLA_BUILD_WITH_CUDA -DWALBERLA_BUILD_WITH_PYTHON=$WALBERLA_BUILD_WITH_PYTHON -DWALBERLA_BUILD_WITH_OPENMP=$WALBERLA_BUILD_WITH_OPENMP -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DMPIEXEC_PREFLAGS=$MPIEXEC_PREFLAGS -DWALBERLA_DOUBLE_ACCURACY=$WALBERLA_DOUBLE_ACCURACY -DWARNING_ERROR=ON - cmake .. -DWALBERLA_BUFFER_DEBUG=$WALBERLA_BUFFER_DEBUG -DWALBERLA_BUILD_TESTS=ON -DWALBERLA_BUILD_BENCHMARKS=ON -DWALBERLA_BUILD_TUTORIALS=ON -DWALBERLA_BUILD_TOOLS=ON -DWALBERLA_BUILD_WITH_MPI=$WALBERLA_BUILD_WITH_MPI -DWALBERLA_BUILD_WITH_CUDA=$WALBERLA_BUILD_WITH_CUDA -DWALBERLA_BUILD_WITH_PYTHON=$WALBERLA_BUILD_WITH_PYTHON -DWALBERLA_BUILD_WITH_OPENMP=$WALBERLA_BUILD_WITH_OPENMP -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DMPIEXEC_PREFLAGS=$MPIEXEC_PREFLAGS -DWALBERLA_DOUBLE_ACCURACY=$WALBERLA_DOUBLE_ACCURACY -DWARNING_ERROR=ON
- cmake . -LAH - cmake . -LAH
- make -j $NUM_BUILD_CORES -l $NUM_CORES - make -j $NUM_BUILD_CORES -l $NUM_CORES
- ctest -LE $CTEST_EXCLUDE_LABELS -C $CMAKE_BUILD_TYPE --output-on-failure -j $NUM_CORES - ctest -LE $CTEST_EXCLUDE_LABELS -C $CMAKE_BUILD_TYPE --output-on-failure -j $NUM_CORES
...@@ -553,30 +553,86 @@ gcc_6_mpionly: ...@@ -553,30 +553,86 @@ gcc_6_mpionly:
gcc_6_hybrid: gcc_6_hybrid:
<<: *build_hybrid_definition <<: *build_hybrid_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6 image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags: tags:
- docker - docker
gcc_6_serial_dbg: gcc_6_serial_dbg:
<<: *build_serial_dbg_definition <<: *build_serial_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6 image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags: tags:
- docker - docker
gcc_6_mpionly_dbg: gcc_6_mpionly_dbg:
<<: *build_mpionly_dbg_definition <<: *build_mpionly_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6 image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags: tags:
- docker - docker
gcc_6_hybrid_dbg: gcc_6_hybrid_dbg:
<<: *build_hybrid_dbg_definition <<: *build_hybrid_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6 image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags: tags:
- docker - docker
gcc_6_hybrid_dbg_sp: gcc_6_hybrid_dbg_sp:
<<: *build_hybrid_dbg_sp_definition <<: *build_hybrid_dbg_sp_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6 image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags:
- docker
gcc_7_serial:
<<: *build_serial_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
only:
- triggers
tags:
- docker
gcc_7_mpionly:
<<: *build_mpionly_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
only:
- triggers
tags:
- docker
gcc_7_hybrid:
<<: *build_hybrid_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
tags:
- docker
gcc_7_serial_dbg:
<<: *build_serial_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
tags:
- docker
gcc_7_mpionly_dbg:
<<: *build_mpionly_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
tags:
- docker
gcc_7_hybrid_dbg:
<<: *build_hybrid_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
tags:
- docker
gcc_7_hybrid_dbg_sp:
<<: *build_hybrid_dbg_sp_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:7
tags: tags:
- docker - docker
......
...@@ -815,7 +815,7 @@ endif ( ) ...@@ -815,7 +815,7 @@ endif ( )
# OpenMPI 3.0 and higher checks the number of processes against the number of CPUs # OpenMPI 3.0 and higher checks the number of processes against the number of CPUs
execute_process(COMMAND ${MPIEXEC} --version RESULT_VARIABLE mpi_version_result OUTPUT_VARIABLE mpi_version_output) execute_process(COMMAND ${MPIEXEC} --version RESULT_VARIABLE mpi_version_result OUTPUT_VARIABLE mpi_version_output)
if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])") if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])")
set ( MPIEXEC_PREFLAGS "${MPIEXEC_PREFLAGS} -oversubscribe" ) list ( APPEND MPIEXEC_PREFLAGS "-oversubscribe" )
endif() endif()
############################################################################################################################ ############################################################################################################################
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <boost/utility/enable_if.hpp> #include <boost/utility/enable_if.hpp>
#include <algorithm> #include <algorithm>
#include <cstring>
namespace walberla { namespace walberla {
namespace mpi { namespace mpi {
...@@ -389,7 +389,6 @@ inline bool GenericRecvBuffer<T>::isEmpty() const ...@@ -389,7 +389,6 @@ inline bool GenericRecvBuffer<T>::isEmpty() const
*/ */
template< typename T > // Element type template< typename T > // Element type
template< typename V > // Type of the built-in data value template< typename V > // Type of the built-in data value
ATTRIBUTE_NO_SANITIZE_UNDEFINED
typename boost::enable_if< boost::mpl::or_< boost::is_arithmetic<V>, boost::is_enum<V> >, typename boost::enable_if< boost::mpl::or_< boost::is_arithmetic<V>, boost::is_enum<V> >,
GenericRecvBuffer<T> & >::type GenericRecvBuffer<T> & >::type
GenericRecvBuffer<T>::get( V& value ) GenericRecvBuffer<T>::get( V& value )
...@@ -408,9 +407,8 @@ GenericRecvBuffer<T>::get( V& value ) ...@@ -408,9 +407,8 @@ GenericRecvBuffer<T>::get( V& value )
WALBERLA_ASSERT_LESS_EQUAL( cur_ + (sizeof(V) / sizeof(T)), end_ ); WALBERLA_ASSERT_LESS_EQUAL( cur_ + (sizeof(V) / sizeof(T)), end_ );
// Extracting the data value // Extracting the data value
V* tmp = reinterpret_cast<V*>( cur_ ); std::memcpy( &value, cur_, sizeof(V) );
value = *tmp; cur_ += sizeof(V) / sizeof(T);
cur_ = reinterpret_cast<T*>( ++tmp );
// Invariants check // Invariants check
WALBERLA_ASSERT_LESS_EQUAL( cur_, end_); WALBERLA_ASSERT_LESS_EQUAL( cur_, end_);
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <algorithm> #include <algorithm>
#include <typeinfo> #include <typeinfo>
#include <cstring>
namespace walberla { namespace walberla {
namespace mpi { namespace mpi {
...@@ -443,7 +443,6 @@ inline bool GenericSendBuffer<T,G>::isEmpty() const ...@@ -443,7 +443,6 @@ inline bool GenericSendBuffer<T,G>::isEmpty() const
template< typename T // Element type template< typename T // Element type
, typename G > // Growth policy , typename G > // Growth policy
template< typename V > // Type of the built-in data value template< typename V > // Type of the built-in data value
ATTRIBUTE_NO_SANITIZE_UNDEFINED
typename boost::enable_if< boost::mpl::or_< boost::is_arithmetic<V>, boost::is_enum<V> >, typename boost::enable_if< boost::mpl::or_< boost::is_arithmetic<V>, boost::is_enum<V> >,
GenericSendBuffer<T,G>& >::type GenericSendBuffer<T,G>& >::type
GenericSendBuffer<T,G>::put( V value ) GenericSendBuffer<T,G>::put( V value )
...@@ -464,8 +463,7 @@ GenericSendBuffer<T,G>::put( V value ) ...@@ -464,8 +463,7 @@ GenericSendBuffer<T,G>::put( V value )
} }
// Adding the data value // Adding the data value
V* const tmp( reinterpret_cast<V*>( cur_ ) ); std::memcpy( cur_, &value, sizeof(V) );
*tmp = value;
cur_ += count; cur_ += count;
// Invariants check // Invariants check
......
...@@ -42,6 +42,14 @@ struct DistanceProperties ...@@ -42,6 +42,14 @@ struct DistanceProperties
typedef typename MeshType::Scalar Scalar; typedef typename MeshType::Scalar Scalar;
typedef math::Matrix3<Scalar> Matrix; typedef math::Matrix3<Scalar> Matrix;
// Dummy constructor to suppress GCC 7 warnings
DistanceProperties() : e0(real_t(0)), e1(real_t(0)), e2(real_t(0)),
e1_normal(real_t(0)), e2_normal(real_t(0)),
e1_normalized(real_t(0)), e2_normalized(real_t(0)), e0_normalized(real_t(0)),
e0l(real_t(0)), e1l(real_t(0)), e2l(real_t(0)),
translation(real_t(0))
{}
Vec2 e0, e1, e2; Vec2 e0, e1, e2;
Vec2 e1_normal, e2_normal; Vec2 e1_normal, e2_normal;
Vec2 e1_normalized, e2_normalized, e0_normalized; Vec2 e1_normalized, e2_normalized, e0_normalized;
......
...@@ -93,9 +93,10 @@ Matrix3<real_t> inertiaTensorNumeric( const ContainmentT & body, const AABB & aa ...@@ -93,9 +93,10 @@ Matrix3<real_t> inertiaTensorNumeric( const ContainmentT & body, const AABB & aa
{ {
if(body.contains( ContainmentT::toPoint( *it ) )) if(body.contains( ContainmentT::toPoint( *it ) ))
{ {
const real_t & x = (*it)[0]; const Vector3<real_t> p = *it;
const real_t & y = (*it)[1]; const real_t & x = p[0];
const real_t & z = (*it)[2]; const real_t & y = p[1];
const real_t & z = p[2];
intertiaTensor[0] += y*y + z*z; intertiaTensor[0] += y*y + z*z;
intertiaTensor[1] += -x*y; intertiaTensor[1] += -x*y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment