Skip to content
Snippets Groups Projects
Commit 0b8a21ab authored by Christian Godenschwager's avatar Christian Godenschwager
Browse files

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

Resolve "Add builds for GCC 7"

Closes #24

See merge request walberla/walberla!37
parents 077061c0 e68e1dc8
Branches
Tags
No related merge requests found
......@@ -28,7 +28,7 @@ stages:
- mkdir $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
- 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
- make -j $NUM_BUILD_CORES -l $NUM_CORES
- ctest -LE $CTEST_EXCLUDE_LABELS -C $CMAKE_BUILD_TYPE --output-on-failure -j $NUM_CORES
......@@ -553,30 +553,86 @@ gcc_6_mpionly:
gcc_6_hybrid:
<<: *build_hybrid_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags:
- docker
gcc_6_serial_dbg:
<<: *build_serial_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags:
- docker
gcc_6_mpionly_dbg:
<<: *build_mpionly_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags:
- docker
gcc_6_hybrid_dbg:
<<: *build_hybrid_dbg_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:6
only:
- triggers
tags:
- docker
gcc_6_hybrid_dbg_sp:
<<: *build_hybrid_dbg_sp_definition
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:
- docker
......
......@@ -815,7 +815,7 @@ endif ( )
# 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)
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()
############################################################################################################################
......
......@@ -38,7 +38,7 @@
#include <boost/utility/enable_if.hpp>
#include <algorithm>
#include <cstring>
namespace walberla {
namespace mpi {
......@@ -389,7 +389,6 @@ inline bool GenericRecvBuffer<T>::isEmpty() const
*/
template< typename T > // Element type
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> >,
GenericRecvBuffer<T> & >::type
GenericRecvBuffer<T>::get( V& value )
......@@ -408,9 +407,8 @@ GenericRecvBuffer<T>::get( V& value )
WALBERLA_ASSERT_LESS_EQUAL( cur_ + (sizeof(V) / sizeof(T)), end_ );
// Extracting the data value
V* tmp = reinterpret_cast<V*>( cur_ );
value = *tmp;
cur_ = reinterpret_cast<T*>( ++tmp );
std::memcpy( &value, cur_, sizeof(V) );
cur_ += sizeof(V) / sizeof(T);
// Invariants check
WALBERLA_ASSERT_LESS_EQUAL( cur_, end_);
......
......@@ -42,7 +42,7 @@
#include <algorithm>
#include <typeinfo>
#include <cstring>
namespace walberla {
namespace mpi {
......@@ -443,7 +443,6 @@ inline bool GenericSendBuffer<T,G>::isEmpty() const
template< typename T // Element type
, typename G > // Growth policy
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> >,
GenericSendBuffer<T,G>& >::type
GenericSendBuffer<T,G>::put( V value )
......@@ -464,8 +463,7 @@ GenericSendBuffer<T,G>::put( V value )
}
// Adding the data value
V* const tmp( reinterpret_cast<V*>( cur_ ) );
*tmp = value;
std::memcpy( cur_, &value, sizeof(V) );
cur_ += count;
// Invariants check
......
......@@ -42,6 +42,14 @@ struct DistanceProperties
typedef typename MeshType::Scalar Scalar;
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 e1_normal, e2_normal;
Vec2 e1_normalized, e2_normalized, e0_normalized;
......@@ -978,4 +986,4 @@ void TriangleDistance<MeshType>::filterTrianglesForAABB( const BoundingBox & aab
}
} // namespace mesh
} // namespace walberla
\ No newline at end of file
} // namespace walberla
......@@ -93,9 +93,10 @@ Matrix3<real_t> inertiaTensorNumeric( const ContainmentT & body, const AABB & aa
{
if(body.contains( ContainmentT::toPoint( *it ) ))
{
const real_t & x = (*it)[0];
const real_t & y = (*it)[1];
const real_t & z = (*it)[2];
const Vector3<real_t> p = *it;
const real_t & x = p[0];
const real_t & y = p[1];
const real_t & z = p[2];
intertiaTensor[0] += y*y + z*z;
intertiaTensor[1] += -x*y;
......@@ -193,4 +194,4 @@ int main( int argc, char * argv[] )
int main( int argc, char * argv[] )
{
return walberla::mesh::main( argc, argv );
}
\ No newline at end of file
}
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