From 620d326c86c1af5a64ab10d6a086032a2b4e25f7 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sat, 21 Aug 2021 13:35:33 -0600 Subject: [PATCH 1/5] CI: add newer msvc to Azure CI * try to capture the test error described in gh-3248 by using the newest possible Windows base image/compiler toolset to run a matrix entry * I have not tried overriding with `imageName` in a matrix entry like this before, but it seems it is documented: https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started-multiplatform?view=azure-devops --- azure-pipelines.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33165cc2900..d90253c48c3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,6 @@ pr: jobs: - job: Windows condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) # skip for PR merges - pool: - vmImage: 'VS2017-Win2016' variables: MPLBACKEND: agg strategy: @@ -26,18 +24,32 @@ jobs: Python37-32bit-full: PYTHON_VERSION: '3.7' PYTHON_ARCH: 'x86' + imageName: 'vs2017-win2016' + Python36-64bit-full: + PYTHON_VERSION: '3.6' + PYTHON_ARCH: 'x64' + imageName: 'vs2017-win2016' Python37-64bit-full: PYTHON_VERSION: '3.7' PYTHON_ARCH: 'x64' + imageName: 'vs2017-win2016' Python38-64bit-full: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' + imageName: 'vs2017-win2016' Python39-64bit-full: PYTHON_VERSION: '3.9' PYTHON_ARCH: 'x64' Python310-64bit-full: PYTHON_VERSION: '3.10' PYTHON_ARCH: 'x64' + imageName: 'vs2017-win2016' + Python38-64bit-full-msvc2019: + PYTHON_VERSION: '3.8' + PYTHON_ARCH: 'x64' + imageName: 'windows-2019' + pool: + vmImage: $(imageName) steps: - task: UsePythonVersion@0 inputs: From e2fdd4f1d7a168e84ad1f424b8a5692b3d53e61e Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Thu, 26 Aug 2021 20:08:24 -0600 Subject: [PATCH 2/5] MAINT: PR 3399 revisions * try lowering the compiler optimization level on Windows to deal with precision loss with msvc 2019 --- package/setup.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/package/setup.py b/package/setup.py index 3634a972c81..4550df7ea77 100755 --- a/package/setup.py +++ b/package/setup.py @@ -273,8 +273,17 @@ def extensions(config): use_cython = config.get('use_cython', default=cython_found) use_openmp = config.get('use_openmp', default=True) - extra_compile_args = ['-std=c99', '-ffast-math', '-O3', '-funroll-loops', - '-fsigned-zeros'] # see #2722 + if os.name == 'nt': + # lower optimization level on Windows + # because of gh-3248 (really only applies + # to msvc 2019+ it seems) + extra_compile_args = ['-std=c99', '-ffast-math', '-O2', + '-funroll-loops', + '-fsigned-zeros'] # see #2722 + 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']) From 355e7b1f74977e01405a056fe83685a012a20965 Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Fri, 27 Aug 2021 13:16:18 +0100 Subject: [PATCH 3/5] Update setup.py --- package/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/setup.py b/package/setup.py index 4550df7ea77..4260aaef9a6 100755 --- a/package/setup.py +++ b/package/setup.py @@ -277,7 +277,7 @@ def extensions(config): # lower optimization level on Windows # because of gh-3248 (really only applies # to msvc 2019+ it seems) - extra_compile_args = ['-std=c99', '-ffast-math', '-O2', + extra_compile_args = ['-std=c99', '-ffast-math', '-O1', '-funroll-loops', '-fsigned-zeros'] # see #2722 else: From 6c00b9181e9f0ab65ed44a630e4888c854c17ef2 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Fri, 21 Jan 2022 11:54:11 -0700 Subject: [PATCH 4/5] Revert "Update setup.py" This reverts commit 6e2b1d10578b38b76ee100253aec4ab39f0832fa. --- package/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/setup.py b/package/setup.py index 4260aaef9a6..4550df7ea77 100755 --- a/package/setup.py +++ b/package/setup.py @@ -277,7 +277,7 @@ def extensions(config): # lower optimization level on Windows # because of gh-3248 (really only applies # to msvc 2019+ it seems) - extra_compile_args = ['-std=c99', '-ffast-math', '-O1', + extra_compile_args = ['-std=c99', '-ffast-math', '-O2', '-funroll-loops', '-fsigned-zeros'] # see #2722 else: From 78f17861d245c64ca8b72aa2ee02519f9a99868e Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Fri, 21 Jan 2022 11:58:00 -0700 Subject: [PATCH 5/5] MAINT: PR 3399 revisions * bump to new Azure windows image more broadly * `xfail` `test_augment` on Windows per gh-3248 --- azure-pipelines.yml | 16 ++-------------- package/setup.py | 13 ++----------- testsuite/MDAnalysisTests/lib/test_augment.py | 3 +++ 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d90253c48c3..009ad1c68a9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,6 +17,8 @@ pr: jobs: - job: Windows condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) # skip for PR merges + pool: + vmImage: 'windows-2019' variables: MPLBACKEND: agg strategy: @@ -24,32 +26,18 @@ jobs: Python37-32bit-full: PYTHON_VERSION: '3.7' PYTHON_ARCH: 'x86' - imageName: 'vs2017-win2016' - Python36-64bit-full: - PYTHON_VERSION: '3.6' - PYTHON_ARCH: 'x64' - imageName: 'vs2017-win2016' Python37-64bit-full: PYTHON_VERSION: '3.7' PYTHON_ARCH: 'x64' - imageName: 'vs2017-win2016' Python38-64bit-full: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' - imageName: 'vs2017-win2016' Python39-64bit-full: PYTHON_VERSION: '3.9' PYTHON_ARCH: 'x64' Python310-64bit-full: PYTHON_VERSION: '3.10' PYTHON_ARCH: 'x64' - imageName: 'vs2017-win2016' - Python38-64bit-full-msvc2019: - PYTHON_VERSION: '3.8' - PYTHON_ARCH: 'x64' - imageName: 'windows-2019' - pool: - vmImage: $(imageName) steps: - task: UsePythonVersion@0 inputs: diff --git a/package/setup.py b/package/setup.py index 4550df7ea77..3634a972c81 100755 --- a/package/setup.py +++ b/package/setup.py @@ -273,17 +273,8 @@ def extensions(config): use_cython = config.get('use_cython', default=cython_found) use_openmp = config.get('use_openmp', default=True) - if os.name == 'nt': - # lower optimization level on Windows - # because of gh-3248 (really only applies - # to msvc 2019+ it seems) - extra_compile_args = ['-std=c99', '-ffast-math', '-O2', - '-funroll-loops', - '-fsigned-zeros'] # see #2722 - else: - extra_compile_args = ['-std=c99', '-ffast-math', '-O3', - '-funroll-loops', - '-fsigned-zeros'] # see #2722 + 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']) diff --git a/testsuite/MDAnalysisTests/lib/test_augment.py b/testsuite/MDAnalysisTests/lib/test_augment.py index 82be4713dc8..4e56e567df2 100644 --- a/testsuite/MDAnalysisTests/lib/test_augment.py +++ b/testsuite/MDAnalysisTests/lib/test_augment.py @@ -20,6 +20,7 @@ # MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. # J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787 +import os import pytest import numpy as np from numpy.testing import assert_almost_equal, assert_equal @@ -67,6 +68,8 @@ ) +@pytest.mark.xfail(os.name == "nt", + reason="see gh-3248") @pytest.mark.parametrize('b', ( np.array([10, 10, 10, 90, 90, 90], dtype=np.float32), np.array([10, 10, 10, 45, 60, 90], dtype=np.float32)