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

MAINT: Update actions and try to fix Windows CI #168

Merged
merged 5 commits into from
Mar 29, 2024
Merged

MAINT: Update actions and try to fix Windows CI #168

merged 5 commits into from
Mar 29, 2024

Conversation

Patol75
Copy link
Member

@Patol75 Patol75 commented Feb 25, 2024

Just a placeholder to see if we can get Windows CI to pass.

Closes #167

@adigitoleo
Copy link
Member

Checking if the use of float32 in c493db3 helps at all

@adigitoleo
Copy link
Member

Didn't help. Log from 13/03/2024 in case github nukes it later:

Click to view
tests\test_config.py .                                                   [  1%]
tests\test_core.py F.F.FF..                                              [ 11%]
tests\test_corner_flow_2d.py s                                           [ 12%]
tests\test_diagnostics.py .................                              [ 35%]
tests\test_doctests.py .                                                 [ 36%]
tests\test_geometry.py ..........                                        [ 49%]
tests\test_scsv.py ..F.F..                                               [ 58%]
tests\test_simple_shear_2d.py FFFFsssssssssss                            [ 77%]
tests\test_simple_shear_3d.py ssss                                       [ 83%]
tests\test_tensors.py ...                                                [ 87%]
tests\test_vortex_2d.py s...Fsssss                                       [100%]

================================== FAILURES ===================================
___________________ TestDislocationCreepOPX.test_shear_dudz ___________________
tests\test_core.py:55: in test_shear_dudz
    np.testing.assert_allclose(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError: 
E   Not equal to tolerance rtol=1e-07, atol=0
E   
E   Mismatched elements: 2 / 9 (22.2%)
E   Max absolute difference: 1.6178129990478193e-20
E   Max relative difference: 7.[138](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:139)831046237483e-06
E    x: array([[-2.2661993809292014e-15, 0.e+00, -2.e+00],
E          [0.e+00, 0.e+00, 0.e+00],
E          [2.e+00, 0.e+00, -2.2661993809292014e-15]])
E    y: array([[-2.266215559059192e-15, 0.e+00, -2.e+00],
E          [0.e+00, 0.e+00, 0.e+00],
E          [2.e+00, 0.e+00, -2.266215559059192e-15]])
__________ TestDislocationCreepOlivineA.test_shear_dvdx_slip_010_100 __________
tests\test_core.py:185: in test_shear_dvdx_slip_010_100
    np.testing.assert_allclose(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError: 
E   Not equal to tolerance rtol=1e-07, atol=0
E   
E   Mismatched elements: 2 / 9 (22.2%)
E   Max absolute difference: 1.6178129990379585e-20
E   Max relative difference: 3.30261[141](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:142)44999664e-05
E    x: array([[-4.898425415289509e-16, 2.e+00, 0.e+00],
E          [-2.e+00, -4.898425415289509e-16, 0.e+00],
E          [0.e+00, 0.e+00, 0.e+00]])
E    y: array([[-4.898587196589413e-16, 2.e+00, 0.e+00],
E          [-2.e+00, -4.898587196589413e-16, 0.e+00],
E          [0.e+00, 0.e+00, 0.e+00]])
__________ TestDislocationCreepOlivineA.test_shear_dwdx_slip_001_100 __________
tests\test_core.py:415: in test_shear_dwdx_slip_001_100
    np.testing.assert_allclose(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError: 
E   Not equal to tolerance rtol=1e-07, atol=0
E   
E   Mismatched elements: 2 / 9 (22.2%)
E   Max absolute difference: 1.6178129990478193e-20
E   Max relative difference: 7.138831046237483e-06
E    x: array([[2.2661993809292014e-15, 0.e+00, 2.e+00],
E          [0.e+00, 0.e+00, 0.e+00],
E          [-2.e+00, 0.e+00, 2.2661993809292014e-15]])
E    y: array([[2.266215559059192e-15, 0.e+00, 2.e+00],
E          [0.e+00, 0.e+00, 0.e+00],
E          [-2.e+00, 0.e+00, 2.266215559059192e-15]])
__________ TestDislocationCreepOlivineA.test_shear_dvdz_slip_010_001 __________
tests\test_core.py:530: in test_shear_dvdz_slip_010_001
    np.testing.assert_allclose(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError: 
E   Not equal to tolerance rtol=1e-07, atol=0
E   
E   Mismatched elements: 2 / 9 (22.2%)
E   Max absolute difference: 1.6178129990478193e-20
E   Max relative difference: 7.138831046237483e-06
E    x: array([[0.e+00, 0.e+00, 0.e+00],
E          [0.e+00, 2.2661993809292014e-15, -2.e+00],
E          [0.e+00, 2.e+00, 2.2661993809292014e-15]])
E    y: array([[0.e+00, 0.e+00, 0.e+00],
E          [0.e+00, 2.266215559059192e-15, -2.e+00],
E          [0.e+00, 2.e+00, 2.266215559059192e-15]])
_____________________________ test_save_specfile ______________________________
tests\test_scsv.py:161: in test_save_specfile
    _io.save_scsv(temp.name, schema, data)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\io.py:207: in save_scsv
    with open(path, mode="w") as stream:
E   PermissionError: [Errno 13] Permission denied: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\tmpanh8hh1i'
____________________________ test_save_scsv_errors ____________________________
tests\test_scsv.py:210: in test_save_scsv_errors
    _io.save_scsv(temp.name, schema, [foo])
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\io.py:207: in save_scsv
    with open(path, mode="w") as stream:
E   PermissionError: [Errno 13] Permission denied: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\tmpcb76xjx9'
__________________ TestOlivineA.test_zero_recrystallisation ___________________
tests\test_simple_shear_2d.py:180: in test_zero_recrystallisation
    mineral, _ = self.run(
tests\test_simple_shear_2d.py:76: in run
    deformation_gradient = mineral.update_orientations(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\minerals.py:430: in update_orientations
    solver = LSODA(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ivp\lsoda.py:[145](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:146): in __init__
    solver.set_initial_value(y0, t0)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:369: in set_initial_value
    self._integrator.reset(len(self._y), self.jac is not None)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:1318: in reset
    rwork = zeros((lrw,), float)
E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 9.13 GiB for an array with shape (1225945184,) and data type float64
___________________ TestOlivineA.test_grainsize_median[50] ____________________
tests\test_simple_shear_2d.py:202: in test_grainsize_median
    mineral, _ = self.run(
tests\test_simple_shear_2d.py:76: in run
    deformation_gradient = mineral.update_orientations(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\minerals.py:430: in update_orientations
    solver = LSODA(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ivp\lsoda.py:145: in __init__
    solver.set_initial_value(y0, t0)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:369: in set_initial_value
    self._integrator.reset(len(self._y), self.jac is not None)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:1318: in reset
    rwork = zeros((lrw,), float)
E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 9.13 GiB for an array with shape (1225945184,) and data type float64
___________________ TestOlivineA.test_grainsize_median[100] ___________________
tests\test_simple_shear_2d.py:202: in test_grainsize_median
    mineral, _ = self.run(
tests\test_simple_shear_2d.py:76: in run
    deformation_gradient = mineral.update_orientations(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\minerals.py:430: in update_orientations
    solver = LSODA(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ivp\lsoda.py:145: in __init__
    solver.set_initial_value(y0, t0)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:369: in set_initial_value
    self._integrator.reset(len(self._y), self.jac is not None)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:1318: in reset
    rwork = zeros((lrw,), float)
E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 9.13 GiB for an array with shape (1225945184,) and data type float64
___________________ TestOlivineA.test_grainsize_median[[150](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:151)] ___________________
tests\test_simple_shear_2d.py:202: in test_grainsize_median
    mineral, _ = self.run(
tests\test_simple_shear_2d.py:76: in run
    deformation_gradient = mineral.update_orientations(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\minerals.py:430: in update_orientations
    solver = LSODA(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ivp\lsoda.py:145: in __init__
    solver.set_initial_value(y0, t0)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:369: in set_initial_value
    self._integrator.reset(len(self._y), self.jac is not None)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:1318: in reset
    rwork = zeros((lrw,), float)
E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 9.13 GiB for an array with shape (1225945[184](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:185),) and data type float64
_______________________ TestCellOlivineA.test_xz[5000] ________________________
tests\test_vortex_2d.py:138: in test_xz
    timestamps, positions, strains, mineral, deformation_gradient = self.run(
tests\test_vortex_2d.py:115: in run
    deformation_gradient = mineral.update_orientations(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\pydrex\minerals.py:430: in update_orientations
    solver = LSODA(
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ivp\lsoda.py:145: in __init__
    solver.set_initial_value(y0, t0)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:369: in set_initial_value
    self._integrator.reset(len(self._y), self.jac is not None)
C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\site-packages\scipy\integrate\_ode.py:1318: in reset
    rwork = zeros((lrw,), float)
E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 6.71 GiB for an array with shape (90066[211](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:212)2,) and data type float64
============ 11 failed, 44 passed, 22 skipped in [287](https://github.com/seismic-anisotropy/PyDRex/actions/runs/8259589112/job/22593737423#step:4:288).42s (0:04:47) ============
Error: Process completed with exit code 1.

@Patol75 Patol75 marked this pull request as ready for review March 29, 2024 01:05
@Patol75 Patol75 requested a review from adigitoleo March 29, 2024 01:05
@adigitoleo
Copy link
Member

Thanks, eventually we can look into tweaking the tolerances for some of those, but for now LGTM. Nice that the tempfile stuff works now.

@Patol75 Patol75 merged commit c38091f into main Mar 29, 2024
4 checks passed
@Patol75 Patol75 deleted the update_ci branch April 24, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix failing windows tests
2 participants