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

TST, CI: add ARM64 Graviton 2 to CI #2956

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,31 @@ matrix:
INSTALL_HOLE="false"
CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"

- os: linux
language: python
arch: arm64-graviton2
python:
- "3.7"
dist: focal
virt: vm
group: edge
before_install:
- python -m pip install cython numpy
# special test SciPy wheel for ARM64:
- python -m pip install https://anaconda.org/multibuild-wheels-staging/scipy/1.6.0.dev0+a240c17/download/scipy-1.6.0.dev0+a240c17-cp37-cp37m-manylinux2014_aarch64.whl
- python -m pip install --no-build-isolation hypothesis matplotlib pytest pytest-cov pytest-xdist tqdm
install:
- cd package
- python setup.py install
- cd ../testsuite
- python setup.py install
- cd ..
script:
- cd testsuite
- python -m pytest ./MDAnalysisTests --disable-pytest-warnings -n 8 -rsx --cov=MDAnalysis
after_success:
- echo "Override this stage for ARM64"

allow_failures:
- env: NUMPY_VERSION=dev EVENT_TYPE="cron"

Expand Down
11 changes: 9 additions & 2 deletions package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,15 @@ def extensions(config):
use_cython = config.get('use_cython', default=not is_release)
use_openmp = config.get('use_openmp', default=True)

extra_compile_args = ['-std=c99', '-ffast-math', '-O3', '-funroll-loops',
'-fsigned-zeros'] # see #2722
if platform.machine() == 'aarch64':
# reduce optimization level for ARM64 machines
# because of issues with test failures sourcing to:
# MDAnalysis/analysis/encore/clustering/src/ap.c
extra_compile_args = ['-std=c99', '-ffast-math', '-O1', '-funroll-loops',
'-fsigned-zeros']
else:
extra_compile_args = ['-std=c99', '-ffast-math', '-O3', '-funroll-loops',
'-fsigned-zeros'] # see #2722
define_macros = []
if config.get('debug_cflags', default=False):
extra_compile_args.extend(['-Wall', '-pedantic'])
Expand Down
7 changes: 5 additions & 2 deletions testsuite/MDAnalysisTests/formats/test_libdcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import sys
import string
import struct
import platform

import hypothesis.strategies as strategies
from hypothesis import example, given
Expand Down Expand Up @@ -351,8 +352,10 @@ def write_dcd(in_name, out_name, remarks='testing', header=None):
f_out.write(xyz=frame.xyz, box=frame.unitcell)


@pytest.mark.xfail(os.name == 'nt' and sys.maxsize <= 2**32,
reason="occasional fail on 32-bit windows")
@pytest.mark.xfail((os.name == 'nt'
and sys.maxsize <= 2**32) or
platform.machine() == 'aarch64',
reason="occasional fail on 32-bit windows and ARM")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't actually fail on the gcc 115 gcc compile farm ARM64 machine, but the test is clearly already flaky on some other platforms--maybe depends on character encoding/support stuff?

@given(remarks=strategies.text(
alphabet=string.printable, min_size=0,
max_size=239)) # handle the printable ASCII strings
Expand Down