Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI builds for non-amd64 architectures #2401

Merged
merged 12 commits into from
Jan 23, 2019
Merged
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,37 @@ rocm-maxset:
tags:
- amdgpu

### Builds on different architectures

.arch_template: &arch_definition
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/$CI_JOB_NAME
script:
- export with_cuda=false
- export OMPI_MCA_btl_vader_single_copy_mechanism=none
- export myconfig=maxset
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
except:
- /^PR-.*/

ubuntu:arm64:
<<: *arch_definition

ubuntu:armhf:
<<: *arch_definition

ubuntu:i386:
<<: *arch_definition

ubuntu:ppc64le:
<<: *arch_definition

ubuntu:s390x:
<<: *arch_definition

### Builds with OS X

osx:
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,11 @@ else()
set(BOOST_MINIMUM_VERSION "1.53.0")
endif()

# old Boost.MPI versions contain a use-after-free bug that seems to only cause crashes on 32-bit architectures
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(BOOST_MINIMUM_VERSION "1.67.0")
endif()

find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED ${BOOST_COMPONENTS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
list(APPEND LIBRARIES ${Boost_LIBRARIES})
Expand Down Expand Up @@ -432,6 +437,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND CMAKE_CXX_COMPILER_VERSION VERSIO
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_CXX11_VARIADIC_TEMPLATES")
endif()

# prevent 80-bit arithmetic on old Intel processors
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffloat-store")
endif()

set(CMAKE_MACOSX_RPATH TRUE)

if( WITH_ASAN AND WITH_MSAN )
Expand Down
2 changes: 1 addition & 1 deletion src/core/unit_tests/field_coupling_fields_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ BOOST_AUTO_TEST_CASE(interpolated_scalar_field) {
grid_spacing, origin, Vector3d{});

BOOST_CHECK((interpolated_value - field_value).norm() <
std::numeric_limits<double>::epsilon());
2 * std::numeric_limits<double>::epsilon());
}
}

Expand Down
10 changes: 5 additions & 5 deletions testsuite/python/dpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_disable(self):
v_stored[i*N:(i+1)*N,:] = s.part[:].v
v_minmax = 5
bins = 5
error_tol = 0.01
error_tol = 0.012
self.check_velocity_distribution(
v_stored, v_minmax, bins, error_tol, kT)

Expand Down Expand Up @@ -193,12 +193,12 @@ def test_const_weight_function(self):
s.integrator.run(0)

# Only trans, so x component should be zero
self.assertTrue(s.part[0].f[0] == 0.)
self.assertLess(abs(s.part[0].f[0]), 1e-16)
# f = gamma * v_ij
self.assertTrue(abs(s.part[0].f[1] - gamma * v[1]) < 1e-11)
self.assertTrue(abs(s.part[0].f[2] - gamma * v[2]) < 1e-11)
# Momentum conservation
self.assertTrue(s.part[1].f[0] == 0.)
self.assertLess(abs(s.part[1].f[0]), 1e-16)
self.assertTrue(abs(s.part[1].f[1] + gamma * v[1]) < 1e-11)
self.assertTrue(abs(s.part[1].f[2] + gamma * v[2]) < 1e-11)

Expand Down Expand Up @@ -244,14 +244,14 @@ def omega(dist, r_cut):
s.integrator.run(0)

# Only trans, so x component should be zero
self.assertTrue(s.part[0].f[0] == 0.)
self.assertLess(abs(s.part[0].f[0]), 1e-16)
# f = gamma * v_ij
self.assertTrue(
abs(s.part[0].f[1] - omega(1.3, 1.4)**2*gamma*v[1]) < 1e-11)
self.assertTrue(
abs(s.part[0].f[2] - omega(1.3, 1.4)**2*gamma*v[2]) < 1e-11)
# Momentum conservation
self.assertTrue(s.part[1].f[0] == 0.)
self.assertLess(abs(s.part[1].f[0]), 1e-16)
self.assertTrue(
abs(s.part[1].f[1] + omega(1.3, 1.4)**2*gamma*v[1]) < 1e-11)
self.assertTrue(
Expand Down
2 changes: 1 addition & 1 deletion testsuite/python/engine_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def run_and_check(self, S, lbm, vtk_name):
else:
lbm.print_vtk_velocity("engine_test_tmp.vtk")
different, difference = tests_common.calculate_vtk_max_pointwise_difference(
vtk_name, "engine_test_tmp.vtk", tol=2.0e-7)
vtk_name, "engine_test_tmp.vtk", tol=1.5e-6)
os.remove("engine_test_tmp.vtk")
print(
"Maximum deviation to the reference point is: {}".format(difference))
Expand Down
2 changes: 1 addition & 1 deletion testsuite/python/lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_mass_momentum_thermostat(self):
# temp_prec_fluid = scipy.stats.norm.interval(0.95,
# loc=self.params["temp"], scale=np.std(all_temp_fluid,ddof=1))[1]
# -self.params["temp"]
temp_prec_particle = 0.05 * self.params["temp"]
temp_prec_particle = 0.06 * self.params["temp"]
temp_prec_fluid = 0.05 * self.params["temp"]

self.assertAlmostEqual(
Expand Down
2 changes: 1 addition & 1 deletion testsuite/python/subt_lj.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test(self):
print(s.analysis.energy())

self.assertAlmostEqual(f, 0, places=10)
self.assertAlmostEqual(s.analysis.energy()['total'], 0, places=10)
self.assertAlmostEqual(s.analysis.energy()['total'], 0, places=9)

if __name__ == "__main__":
ut.main()