From 160b086b6ca5bba5a031072076d522ce2e4b0261 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 10 Jan 2020 13:16:19 +0000 Subject: [PATCH 01/84] tests: Add test gpu. --- tests/test_dle.py | 95 +++++++++++++++++++++++++---------------------- tests/test_gpu.py | 81 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+), 45 deletions(-) create mode 100644 tests/test_gpu.py diff --git a/tests/test_dle.py b/tests/test_dle.py index 0933e91875..d570b55afd 100644 --- a/tests/test_dle.py +++ b/tests/test_dle.py @@ -510,49 +510,54 @@ def test_multiple_subnests(self): 'num_threads(nthreads_nested)') -class TestOffloading(object): - - @switchconfig(platform='nvidiaX') - def test_basic(self): - grid = Grid(shape=(3, 3, 3)) - - u = TimeFunction(name='u', grid=grid) - - op = Operator(Eq(u.forward, u + 1), dle=('advanced', {'openmp': True})) - - trees = retrieve_iteration_tree(op) - assert len(trees) == 1 - - assert trees[0][1].pragmas[0].value ==\ - 'omp target teams distribute parallel for collapse(3)' - assert op.body[1].header[1].value ==\ - ('omp target enter data map(to: u[0:u_vec->size[0]]' - '[0:u_vec->size[1]][0:u_vec->size[2]][0:u_vec->size[3]])') - assert op.body[1].footer[0].value ==\ - ('omp target exit data map(from: u[0:u_vec->size[0]]' - '[0:u_vec->size[1]][0:u_vec->size[2]][0:u_vec->size[3]])') - - @switchconfig(platform='nvidiaX') - def test_multiple_eqns(self): - grid = Grid(shape=(3, 3, 3)) +@switchconfig(autopadding=True, platform='knl7210') # Platform is to fix pad value +@patch("devito.dse.rewriters.AdvancedRewriter.MIN_COST_ALIAS", 1) +def test_minimize_reminders_due_to_autopadding(): + """ + Check that the bounds of the Iteration computing the DSE-captured aliasing + expressions are relaxed (i.e., slightly larger) so that backend-compiler-generated + remainder loops are avoided. + """ + grid = Grid(shape=(3, 3, 3)) + x, y, z = grid.dimensions # noqa + t = grid.stepping_dim - u = TimeFunction(name='u', grid=grid) - v = TimeFunction(name='v', grid=grid) - - op = Operator([Eq(u.forward, u + v + 1), Eq(v.forward, u + v + 4)], - dle=('advanced', {'openmp': True})) - - trees = retrieve_iteration_tree(op) - assert len(trees) == 1 - - assert trees[0][1].pragmas[0].value ==\ - 'omp target teams distribute parallel for collapse(3)' - for i, f in enumerate([u, v]): - assert op.body[2].header[2 + i].value ==\ - ('omp target enter data map(to: %(n)s[0:%(n)s_vec->size[0]]' - '[0:%(n)s_vec->size[1]][0:%(n)s_vec->size[2]][0:%(n)s_vec->size[3]])' % - {'n': f.name}) - assert op.body[2].footer[i].value ==\ - ('omp target exit data map(from: %(n)s[0:%(n)s_vec->size[0]]' - '[0:%(n)s_vec->size[1]][0:%(n)s_vec->size[2]][0:%(n)s_vec->size[3]])' % - {'n': f.name}) + f = Function(name='f', grid=grid) + f.data_with_halo[:] = 1. + u = TimeFunction(name='u', grid=grid, space_order=3) + u.data_with_halo[:] = 0. + + # Leads to 3D aliases + eqn = Eq(u.forward, ((u[t, x, y, z] + u[t, x+1, y+1, z+1])*3*f + + (u[t, x+2, y+2, z+2] + u[t, x+3, y+3, z+3])*3*f + 1)) + op0 = Operator(eqn, dse='noop', dle=('advanced', {'openmp': False})) + op1 = Operator(eqn, dse='aggressive', dle=('advanced', {'openmp': False})) + + x0_blk_size = op1.parameters[-2] + y0_blk_size = op1.parameters[-1] + z_size = op1.parameters[4] + + # Check Array shape + arrays = [i for i in FindSymbols().visit(op1._func_table['bf0'].root) if i.is_Array] + assert len(arrays) == 1 + a = arrays[0] + assert len(a.dimensions) == 3 + assert a.halo == ((1, 1), (1, 1), (1, 1)) + assert a.padding == ((0, 0), (0, 0), (0, 30)) + assert Add(*a.symbolic_shape[0].args) == x0_blk_size + 2 + assert Add(*a.symbolic_shape[1].args) == y0_blk_size + 2 + assert Add(*a.symbolic_shape[2].args) == z_size + 32 + + # Check loop bounds + trees = retrieve_iteration_tree(op1._func_table['bf0'].root) + assert len(trees) == 2 + expected_rounded = trees[0].inner + assert expected_rounded.symbolic_max ==\ + z.symbolic_max + (z.symbolic_max - z.symbolic_min + 3) % 16 + 1 + + # Check numerical output + op0(time_M=1) + exp = np.copy(u.data[:]) + u.data_with_halo[:] = 0. + op1(time_M=1) + assert np.all(u.data == exp) diff --git a/tests/test_gpu.py b/tests/test_gpu.py new file mode 100644 index 0000000000..2c7e12eb72 --- /dev/null +++ b/tests/test_gpu.py @@ -0,0 +1,81 @@ +from functools import reduce +from operator import mul + +from sympy import Add +import numpy as np +import pytest +from unittest.mock import patch + +from conftest import skipif +from devito import (Grid, Function, TimeFunction, SparseTimeFunction, SubDimension, + Eq, Operator, switchconfig) +from devito.exceptions import InvalidArgument +from devito.ir.iet import (Call, Iteration, Conditional, FindNodes, FindSymbols, + retrieve_iteration_tree) +from devito.targets import BlockDimension, NThreads, NThreadsNonaffine +from devito.targets.common.openmp import ParallelRegion +from devito.tools import as_tuple +from devito.types import Scalar + +pytestmark = skipif(['yask', 'ops']) + + +class TestOffloading(object): + + @switchconfig(platform='nvidiaX') + def test_basic(self): + grid = Grid(shape=(3, 3, 3)) + + u = TimeFunction(name='u', grid=grid) + + op = Operator(Eq(u.forward, u + 1), dle=('advanced', {'openmp': True})) + + trees = retrieve_iteration_tree(op) + assert len(trees) == 1 + + assert trees[0][1].pragmas[0].value ==\ + 'omp target teams distribute parallel for collapse(3)' + assert op.body[1].header[1].value ==\ + ('omp target enter data map(to: u[0:u_vec->size[0]]' + '[0:u_vec->size[1]][0:u_vec->size[2]][0:u_vec->size[3]])') + assert op.body[1].footer[0].value ==\ + ('omp target exit data map(from: u[0:u_vec->size[0]]' + '[0:u_vec->size[1]][0:u_vec->size[2]][0:u_vec->size[3]])') + + @switchconfig(platform='nvidiaX') + def test_multiple_eqns(self): + grid = Grid(shape=(3, 3, 3)) + + u = TimeFunction(name='u', grid=grid) + v = TimeFunction(name='v', grid=grid) + + op = Operator([Eq(u.forward, u + v + 1), Eq(v.forward, u + v + 4)], + dle=('advanced', {'openmp': True})) + + trees = retrieve_iteration_tree(op) + assert len(trees) == 1 + + assert trees[0][1].pragmas[0].value ==\ + 'omp target teams distribute parallel for collapse(3)' + for i, f in enumerate([u, v]): + assert op.body[2].header[2 + i].value ==\ + ('omp target enter data map(to: %(n)s[0:%(n)s_vec->size[0]]' + '[0:%(n)s_vec->size[1]][0:%(n)s_vec->size[2]][0:%(n)s_vec->size[3]])' % + {'n': f.name}) + assert op.body[2].footer[i].value ==\ + ('omp target exit data map(from: %(n)s[0:%(n)s_vec->size[0]]' + '[0:%(n)s_vec->size[1]][0:%(n)s_vec->size[2]][0:%(n)s_vec->size[3]])' % + {'n': f.name}) + + @switchconfig(platform='nvidiaX') + def test_op_apply(self): + grid = Grid(shape=(3, 3, 3)) + + u = TimeFunction(name='u', grid=grid) + + op = Operator(Eq(u.forward, u + 1), dle=('advanced', {'openmp': True})) + + time_steps = 4 + op.apply(time_M=time_steps) + + assert np.all(u.data[:] == time_steps) From cb14bda0a34b4faad70c90bdea352a2989c84595 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 10 Jan 2020 13:25:23 +0000 Subject: [PATCH 02/84] Fix indentation error. --- tests/test_gpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index 2c7e12eb72..f041629b5d 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -67,8 +67,8 @@ def test_multiple_eqns(self): '[0:%(n)s_vec->size[1]][0:%(n)s_vec->size[2]][0:%(n)s_vec->size[3]])' % {'n': f.name}) - @switchconfig(platform='nvidiaX') - def test_op_apply(self): + @switchconfig(platform='nvidiaX') + def test_op_apply(self): grid = Grid(shape=(3, 3, 3)) u = TimeFunction(name='u', grid=grid) From 458199fa70278bbc5159871f609c3acaac6bdbb8 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 10 Jan 2020 13:43:51 +0000 Subject: [PATCH 03/84] Fix assert. --- tests/test_gpu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index f041629b5d..0a861b9334 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -71,11 +71,12 @@ def test_multiple_eqns(self): def test_op_apply(self): grid = Grid(shape=(3, 3, 3)) - u = TimeFunction(name='u', grid=grid) + u = TimeFunction(name='u', grid=grid, dtype=np.int32) op = Operator(Eq(u.forward, u + 1), dle=('advanced', {'openmp': True})) - time_steps = 4 + time_steps = 1000 op.apply(time_M=time_steps) - assert np.all(u.data[:] == time_steps) + assert np.all(np.array(u.data[0, :, :, :]) == time_steps) + From f41b4d5e0d4a5d99cfe01c8f7e628df641ee2122 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 10 Jan 2020 13:48:43 +0000 Subject: [PATCH 04/84] Tidying. --- tests/test_gpu.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index 0a861b9334..e44e0b30f2 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -1,21 +1,8 @@ -from functools import reduce -from operator import mul - -from sympy import Add import numpy as np -import pytest -from unittest.mock import patch from conftest import skipif -from devito import (Grid, Function, TimeFunction, SparseTimeFunction, SubDimension, - Eq, Operator, switchconfig) -from devito.exceptions import InvalidArgument -from devito.ir.iet import (Call, Iteration, Conditional, FindNodes, FindSymbols, - retrieve_iteration_tree) -from devito.targets import BlockDimension, NThreads, NThreadsNonaffine -from devito.targets.common.openmp import ParallelRegion -from devito.tools import as_tuple -from devito.types import Scalar +from devito import Grid, TimeFunction, Eq, Operator, switchconfig +from devito.ir.iet import retrieve_iteration_tree pytestmark = skipif(['yask', 'ops']) @@ -79,4 +66,3 @@ def test_op_apply(self): op.apply(time_M=time_steps) assert np.all(np.array(u.data[0, :, :, :]) == time_steps) - From dca04554b07239346aaf9d1460af7ddc73118448 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 10 Jan 2020 14:06:27 +0000 Subject: [PATCH 05/84] Fix typo. --- devito/archinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devito/archinfo.py b/devito/archinfo.py index f6ed15445f..85547dd6c3 100644 --- a/devito/archinfo.py +++ b/devito/archinfo.py @@ -275,7 +275,7 @@ def __init__(self, name, cores_logical=1, cores_physical=1, isa='cpp'): POWER9 = Power('power9') # Devices -NVIDIAX = Device('nvidiax') +NVIDIAX = Device('nvidiaX') platform_registry = { From e67e06a3de5da9a9d1ee8d098305d3b7d5ae7283 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 10 Jan 2020 14:59:11 +0000 Subject: [PATCH 06/84] tests: Add iso-acoustic gpu test. --- tests/test_gpu.py | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index e44e0b30f2..158dae748b 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -66,3 +66,51 @@ def test_op_apply(self): op.apply(time_M=time_steps) assert np.all(np.array(u.data[0, :, :, :]) == time_steps) + + @switchconfig(platform='nvidiaX') + def test_iso_ac(self): + from examples.seismic import Model, TimeAxis, RickerSource, Receiver + from devito import TimeFunction, solve, norm + + shape = (101, 101) + spacing = (10., 10.) + origin = (0., 0.) + + v = np.empty(shape, dtype=np.float32) + v[:, :51] = 1.5 + v[:, 51:] = 2.5 + + model = Model(vp=v, origin=origin, shape=shape, spacing=spacing, + space_order=2, nbl=10) + + t0 = 0. + tn = 1000. + dt = model.critical_dt + + time_range = TimeAxis(start=t0, stop=tn, step=dt) + + f0 = 0.010 + src = RickerSource(name='src', grid=model.grid, f0=f0, + npoint=1, time_range=time_range) + + src.coordinates.data[0, :] = np.array(model.domain_size) * .5 + src.coordinates.data[0, -1] = 20. + + rec = Receiver(name='rec', grid=model.grid, npoint=101, time_range=time_range) + rec.coordinates.data[:, 0] = np.linspace(0, model.domain_size[0], num=101) + rec.coordinates.data[:, 1] = 20. + + u = TimeFunction(name="u", grid=model.grid, time_order=2, space_order=2) + + pde = model.m * u.dt2 - u.laplace + model.damp * u.dt + stencil = Eq(u.forward, solve(pde, u.forward)) + + src_term = src.inject(field=u.forward, expr=src * dt**2 / model.m) + + rec_term = rec.interpolate(expr=u.forward) + + op = Operator([stencil] + src_term + rec_term, subs=model.spacing_map, + dle=('advanced', {'openmp': True})) + op(time=time_range.num-1, dt=model.critical_dt) + + assert np.isclose(norm(rec), 447.28362, atol=1e-3, rtol=0) From d3660c47ddc5bf6cdd59af5c008e62bd0052d7da Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 10 Jan 2020 15:24:44 +0000 Subject: [PATCH 07/84] tests: Modify iso acoustic gpu test. --- tests/test_gpu.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index 158dae748b..389c9496e3 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -69,10 +69,11 @@ def test_op_apply(self): @switchconfig(platform='nvidiaX') def test_iso_ac(self): - from examples.seismic import Model, TimeAxis, RickerSource, Receiver - from devito import TimeFunction, solve, norm + from examples.seismic import TimeAxis, RickerSource, Receiver + from devito import Function, solve, norm shape = (101, 101) + extent = (1000, 1000) spacing = (10., 10.) origin = (0., 0.) @@ -80,37 +81,37 @@ def test_iso_ac(self): v[:, :51] = 1.5 v[:, 51:] = 2.5 - model = Model(vp=v, origin=origin, shape=shape, spacing=spacing, - space_order=2, nbl=10) + grid = Grid(shape=shape, extent=extent, origin=origin) t0 = 0. tn = 1000. - dt = model.critical_dt - + dt = 1.6 time_range = TimeAxis(start=t0, stop=tn, step=dt) f0 = 0.010 - src = RickerSource(name='src', grid=model.grid, f0=f0, + src = RickerSource(name='src', grid=grid, f0=f0, npoint=1, time_range=time_range) - src.coordinates.data[0, :] = np.array(model.domain_size) * .5 + domain_size = np.array(extent) + + src.coordinates.data[0, :] = domain_size*.5 src.coordinates.data[0, -1] = 20. - rec = Receiver(name='rec', grid=model.grid, npoint=101, time_range=time_range) - rec.coordinates.data[:, 0] = np.linspace(0, model.domain_size[0], num=101) + rec = Receiver(name='rec', grid=grid, npoint=101, time_range=time_range) + rec.coordinates.data[:, 0] = np.linspace(0, domain_size[0], num=101) rec.coordinates.data[:, 1] = 20. - u = TimeFunction(name="u", grid=model.grid, time_order=2, space_order=2) + u = TimeFunction(name="u", grid=grid, time_order=2, space_order=2) + m = Function(name='m', grid=grid) + m.data[:] = 1./(v*v) - pde = model.m * u.dt2 - u.laplace + model.damp * u.dt + pde = m * u.dt2 - u.laplace stencil = Eq(u.forward, solve(pde, u.forward)) - src_term = src.inject(field=u.forward, expr=src * dt**2 / model.m) - + src_term = src.inject(field=u.forward, expr=src * dt**2 / m) rec_term = rec.interpolate(expr=u.forward) - op = Operator([stencil] + src_term + rec_term, subs=model.spacing_map, - dle=('advanced', {'openmp': True})) - op(time=time_range.num-1, dt=model.critical_dt) + op = Operator([stencil] + src_term + rec_term, dle=('advanced', {'openmp': True})) + op(time=time_range.num-1, dt=dt) - assert np.isclose(norm(rec), 447.28362, atol=1e-3, rtol=0) + assert np.isclose(norm(rec), 490.5477, atol=1e-3, rtol=0) From 1d5aba095a810c1cbf8d0e9f86d4437c90e12162 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 10 Jan 2020 15:54:40 +0000 Subject: [PATCH 08/84] tests: gpu test modification. --- tests/test_gpu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index 389c9496e3..471367a3af 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -1,4 +1,5 @@ import numpy as np +import pytest from conftest import skipif from devito import Grid, TimeFunction, Eq, Operator, switchconfig @@ -67,6 +68,7 @@ def test_op_apply(self): assert np.all(np.array(u.data[0, :, :, :]) == time_steps) + @pytest.mark.xfail @switchconfig(platform='nvidiaX') def test_iso_ac(self): from examples.seismic import TimeAxis, RickerSource, Receiver From 9934a1228e35a94473d96b09eaf94733b18413e9 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 20 Jan 2020 12:25:22 +0000 Subject: [PATCH 09/84] workflows: Add gpu workflow --- .github/workflows/pytest-gpu.yml | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/pytest-gpu.yml diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml new file mode 100644 index 0000000000..20634b15bb --- /dev/null +++ b/.github/workflows/pytest-gpu.yml @@ -0,0 +1,58 @@ +name: 'Azure VM deployment' +description: 'Deploy a VM to Azure' +inputs: + azure-credentials: + description: 'Azure credentials' + required: true + default: 'GithubActionsRG' + # azure-client-id: + # description: 'Azure credentials' + # required: true + # default: 'GithubActionsRG' + # azure-client-secret: + # description: 'Azure credentials' + # required: true + # default: 'GithubActionsRG' + # azure-tenant-id: + # description: 'Azure credentials' + # required: true + # default: 'GithubActionsRG' + azure-resource-group: + description: 'Azure resource group' + required: true + default: 'GithubActionsRG' + azure-vm-name: + description: 'Azure VM name' + required: true + default: 'GithubActionsVM' + azure-vm-size: + description: 'Azure VM size' + required: true + default: 'Standard_DS2_v2' +outputs: + stdout: + description: 'Stdout' + stderr: + description: 'Stderr' +runs: + using: 'docker' + image: 'Dockerfile' + env: + HOME: /home/runner/ + args: + - ${{ inputs.azure-credentials }} + # - ${{ inputs.azure-client-id }} + # - ${{ inputs.azure-client-secret }} + # - ${{ inputs.azure-tenant-id }} + - ${{ inputs.azure-resource-group }} + - ${{ inputs.azure-vm-name }} + - ${{ inputs.azure-vm-size }} + + +# default mounts +# -v "/var/run/docker.sock":"/var/run/docker.sock" +# -v "/home/runner/work/_temp/_github_home":"/github/home" +# -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" +# -v "/home/runner/work/devito/devito":"/github/workspace" +# desired +# /home/runner/.azure From 6d3245b5f32d7ebdaf5f0f43357a79970b2f5775 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 21 Jan 2020 11:51:56 +0000 Subject: [PATCH 10/84] actions: Add gpu action. --- .github/workflows/pytest-gpu.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 20634b15bb..f43fbf8cce 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -48,6 +48,27 @@ runs: - ${{ inputs.azure-vm-name }} - ${{ inputs.azure-vm-size }} +jobs: + build_and_deploy: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - name: Clone submodules + run: | + git submodule update --init --recursive + - name: Build + shell: pwsh + run: | + .\build.ps1 + - name: Package and upload + run: | + nuget.bat ${{ secrets.NUGET_API_KEY }} + + - name: Build + shell: pwsh + run: | + .\build.ps1 + # default mounts # -v "/var/run/docker.sock":"/var/run/docker.sock" From e9a7a739573f02d67d2ae47edfc1e6c96e0cecd9 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 5 Feb 2020 15:02:36 +0000 Subject: [PATCH 11/84] actions: Update gpu action. --- .github/workflows/pytest-gpu.yml | 110 ++++++++++--------------------- PSA/deployVM.ps1 | 93 ++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 74 deletions(-) create mode 100644 PSA/deployVM.ps1 diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index f43fbf8cce..1eb2da14b4 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -1,79 +1,41 @@ -name: 'Azure VM deployment' -description: 'Deploy a VM to Azure' -inputs: - azure-credentials: - description: 'Azure credentials' - required: true - default: 'GithubActionsRG' - # azure-client-id: - # description: 'Azure credentials' - # required: true - # default: 'GithubActionsRG' - # azure-client-secret: - # description: 'Azure credentials' - # required: true - # default: 'GithubActionsRG' - # azure-tenant-id: - # description: 'Azure credentials' - # required: true - # default: 'GithubActionsRG' - azure-resource-group: - description: 'Azure resource group' - required: true - default: 'GithubActionsRG' - azure-vm-name: - description: 'Azure VM name' - required: true - default: 'GithubActionsVM' - azure-vm-size: - description: 'Azure VM size' - required: true - default: 'Standard_DS2_v2' -outputs: - stdout: - description: 'Stdout' - stderr: - description: 'Stderr' -runs: - using: 'docker' - image: 'Dockerfile' - env: - HOME: /home/runner/ - args: - - ${{ inputs.azure-credentials }} - # - ${{ inputs.azure-client-id }} - # - ${{ inputs.azure-client-secret }} - # - ${{ inputs.azure-tenant-id }} - - ${{ inputs.azure-resource-group }} - - ${{ inputs.azure-vm-name }} - - ${{ inputs.azure-vm-size }} +# Adapted from https://github.com/weeyin83/vm-actions +name: Deploy VM on Azure + +env: + OUTPUT_PATH: ${{ github.workspace }} + +on: [push] jobs: - build_and_deploy: - runs-on: windows-latest + + # Deploy VM in Azure + DeployVM: + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v1 - - name: Clone submodules - run: | - git submodule update --init --recursive - - name: Build - shell: pwsh - run: | - .\build.ps1 - - name: Package and upload - run: | - nuget.bat ${{ secrets.NUGET_API_KEY }} + # checkout code from repo + - name: checkout repo + uses: actions/checkout@v1 - - name: Build - shell: pwsh + - name: look for ps1 file run: | - .\build.ps1 - - -# default mounts -# -v "/var/run/docker.sock":"/var/run/docker.sock" -# -v "/home/runner/work/_temp/_github_home":"/github/home" -# -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -# -v "/home/runner/work/devito/devito":"/github/workspace" -# desired -# /home/runner/.azure + ls '${{ env.OUTPUT_PATH }}\PSA' + - name: provision virtual machine in azure + env: + RESOURCE_GROUP: RhodriGpu + RESOURCE_GROUP_REGION: uksouth + SERVER_NAME: githubactions + IMAGE_NAME: gpuImage + ADMIN_LOGIN: rhodri + run: > + powershell -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" + -servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }} + -servicePrincipalSecret ${{ secrets.SERVICE_PRINCIPAL_SECRET }} + -servicePrincipalTenantId ${{ secrets.SERVICE_PRINCIPAL_TENANTID }} + -azureSubscriptionName ${{ secrets.AZURE_SUBSCRIPTION_ID }} + -resourceGroupName %RESOURCE_GROUP% + -resourceGroupNameRegion %RESOURCE_GROUP_REGION% + -serverName %SERVER_NAME% + -myVMimage %IMAGE_NAME% + -adminLogin %ADMIN_LOGIN% + -adminPassword ${{ secrets.ADMIN_PASSWORD }} diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 new file mode 100644 index 0000000000..9d5f2a2e16 --- /dev/null +++ b/PSA/deployVM.ps1 @@ -0,0 +1,93 @@ +# Adapted from https://github.com/weeyin83/vm-actions +# Provision a VM within Azure +# +[CmdletBinding()] +param( + [Parameter(Mandatory = $True)] + [string] + $servicePrincipal, + + [Parameter(Mandatory = $True)] + [string] + $servicePrincipalSecret, + + [Parameter(Mandatory = $True)] + [string] + $servicePrincipalTenantId, + + [Parameter(Mandatory = $True)] + [string] + $azureSubscriptionName, + + [Parameter(Mandatory = $True)] + [string] + $resourceGroupName, + + [Parameter(Mandatory = $True)] + [string] + $resourceGroupNameRegion, + + [Parameter(Mandatory = $True)] + [string] + $serverName, + + [Parameter(Mandatory = $True)] + [string] + $adminLogin, + + [Parameter(Mandatory = $True)] + [String] + $adminPassword +) + + +#region Login +# This logs into Azure with a Service Principal Account +# +Write-Output "Logging in to Azure with a service principal..." +az login ` + --service-principal ` + --username $servicePrincipal ` + --password $servicePrincipalSecret ` + --tenant $servicePrincipalTenantId +Write-Output "Done" +Write-Output "" +#endregion + +#region Subscription +#This sets the subscription the resources will be created in + +Write-Output "Setting default azure subscription..." +az account set ` + --subscription $azureSubscriptionName +Write-Output "Done" +Write-Output "" +#endregion + +#region Create Resource Group +# This creates the resource group used to house the VM +Write-Output "Creating resource group $resourceGroupName in region $resourceGroupNameRegion..." +az group create ` + --name $resourceGroupName ` + --location $resourceGroupNameRegion + Write-Output "Done creating resource group" + Write-Output "" + #endregion + +#region Create VM +# Create a VM in the resource group +Write-Output "Creating VM..." +try { + az vm create ` + --resource-group $resourceGroupName ` + --name $serverName ` + --image $myVMimage ` + --admin-username $adminLogin ` + --admin-password $adminPassword + } +catch { + Write-Output "VM already exists" + } +Write-Output "Done creating VM" +Write-Output "" +#endregion From 9ca6aa1092f7a2c7f642473299dd436b5634b754 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 5 Feb 2020 19:01:42 +0000 Subject: [PATCH 12/84] actions: Typo. --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 1eb2da14b4..891287ae85 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -19,7 +19,7 @@ jobs: - name: look for ps1 file run: | - ls '${{ env.OUTPUT_PATH }}\PSA' + ls '${{ env.OUTPUT_PATH }}/PSA' - name: provision virtual machine in azure env: RESOURCE_GROUP: RhodriGpu From f420a2c7ac155a2abddfb669a12c5a766b758fc5 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 5 Feb 2020 19:10:38 +0000 Subject: [PATCH 13/84] actions: powershell -> pwsh. --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 891287ae85..7ba4b87a95 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -28,7 +28,7 @@ jobs: IMAGE_NAME: gpuImage ADMIN_LOGIN: rhodri run: > - powershell -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" + pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" -servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }} -servicePrincipalSecret ${{ secrets.SERVICE_PRINCIPAL_SECRET }} -servicePrincipalTenantId ${{ secrets.SERVICE_PRINCIPAL_TENANTID }} From f70e2d75de82d5b428bd4d4af6cc2d1fb5e8bf28 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 11:57:49 +0000 Subject: [PATCH 14/84] Trigger build. --- PSA/deployVM.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 index 9d5f2a2e16..ac5881ef85 100644 --- a/PSA/deployVM.ps1 +++ b/PSA/deployVM.ps1 @@ -1,5 +1,5 @@ # Adapted from https://github.com/weeyin83/vm-actions -# Provision a VM within Azure +# Provision a VM within Azure (test) # [CmdletBinding()] param( From 79a01980bec62bc27efd70484ec083abf7716b72 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 12:16:38 +0000 Subject: [PATCH 15/84] Flake8. --- tests/test_dle.py | 55 +---------------------------------------------- tests/test_gpu.py | 1 - 2 files changed, 1 insertion(+), 55 deletions(-) diff --git a/tests/test_dle.py b/tests/test_dle.py index d570b55afd..24d8f5bebe 100644 --- a/tests/test_dle.py +++ b/tests/test_dle.py @@ -7,7 +7,7 @@ from conftest import skipif from devito import (Grid, Function, TimeFunction, SparseTimeFunction, SubDimension, - Eq, Operator, switchconfig) + Eq, Operator) from devito.exceptions import InvalidArgument from devito.ir.iet import Call, Iteration, Conditional, FindNodes, retrieve_iteration_tree from devito.passes import BlockDimension, NThreads, NThreadsNonaffine @@ -508,56 +508,3 @@ def test_multiple_subnests(self): assert trees[1][2].pragmas[0].value == ('omp parallel for collapse(1) ' 'schedule(dynamic,1) ' 'num_threads(nthreads_nested)') - - -@switchconfig(autopadding=True, platform='knl7210') # Platform is to fix pad value -@patch("devito.dse.rewriters.AdvancedRewriter.MIN_COST_ALIAS", 1) -def test_minimize_reminders_due_to_autopadding(): - """ - Check that the bounds of the Iteration computing the DSE-captured aliasing - expressions are relaxed (i.e., slightly larger) so that backend-compiler-generated - remainder loops are avoided. - """ - grid = Grid(shape=(3, 3, 3)) - x, y, z = grid.dimensions # noqa - t = grid.stepping_dim - - f = Function(name='f', grid=grid) - f.data_with_halo[:] = 1. - u = TimeFunction(name='u', grid=grid, space_order=3) - u.data_with_halo[:] = 0. - - # Leads to 3D aliases - eqn = Eq(u.forward, ((u[t, x, y, z] + u[t, x+1, y+1, z+1])*3*f + - (u[t, x+2, y+2, z+2] + u[t, x+3, y+3, z+3])*3*f + 1)) - op0 = Operator(eqn, dse='noop', dle=('advanced', {'openmp': False})) - op1 = Operator(eqn, dse='aggressive', dle=('advanced', {'openmp': False})) - - x0_blk_size = op1.parameters[-2] - y0_blk_size = op1.parameters[-1] - z_size = op1.parameters[4] - - # Check Array shape - arrays = [i for i in FindSymbols().visit(op1._func_table['bf0'].root) if i.is_Array] - assert len(arrays) == 1 - a = arrays[0] - assert len(a.dimensions) == 3 - assert a.halo == ((1, 1), (1, 1), (1, 1)) - assert a.padding == ((0, 0), (0, 0), (0, 30)) - assert Add(*a.symbolic_shape[0].args) == x0_blk_size + 2 - assert Add(*a.symbolic_shape[1].args) == y0_blk_size + 2 - assert Add(*a.symbolic_shape[2].args) == z_size + 32 - - # Check loop bounds - trees = retrieve_iteration_tree(op1._func_table['bf0'].root) - assert len(trees) == 2 - expected_rounded = trees[0].inner - assert expected_rounded.symbolic_max ==\ - z.symbolic_max + (z.symbolic_max - z.symbolic_min + 3) % 16 + 1 - - # Check numerical output - op0(time_M=1) - exp = np.copy(u.data[:]) - u.data_with_halo[:] = 0. - op1(time_M=1) - assert np.all(u.data == exp) diff --git a/tests/test_gpu.py b/tests/test_gpu.py index 471367a3af..ca736525e3 100644 --- a/tests/test_gpu.py +++ b/tests/test_gpu.py @@ -76,7 +76,6 @@ def test_iso_ac(self): shape = (101, 101) extent = (1000, 1000) - spacing = (10., 10.) origin = (0., 0.) v = np.empty(shape, dtype=np.float32) From 29463a967f693a8560bc95e0d2eec0991bc4c563 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 13:31:40 +0000 Subject: [PATCH 16/84] actions: Test config. --- .github/workflows/pytest-gpu.yml | 2 +- PSA/deployVM.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 7ba4b87a95..50eec6405a 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -36,6 +36,6 @@ jobs: -resourceGroupName %RESOURCE_GROUP% -resourceGroupNameRegion %RESOURCE_GROUP_REGION% -serverName %SERVER_NAME% - -myVMimage %IMAGE_NAME% + -image %IMAGE_NAME% -adminLogin %ADMIN_LOGIN% -adminPassword ${{ secrets.ADMIN_PASSWORD }} diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 index ac5881ef85..d4236a6cbf 100644 --- a/PSA/deployVM.ps1 +++ b/PSA/deployVM.ps1 @@ -81,7 +81,7 @@ try { az vm create ` --resource-group $resourceGroupName ` --name $serverName ` - --image $myVMimage ` + --image $image ` --admin-username $adminLogin ` --admin-password $adminPassword } From 335bbf414cb83a0d71da8a677a3b7da26cf26380 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 13:37:01 +0000 Subject: [PATCH 17/84] Test. --- .github/workflows/pytest-gpu.yml | 4 ++-- PSA/deployVM.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 50eec6405a..2ce2b97fda 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -25,7 +25,7 @@ jobs: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth SERVER_NAME: githubactions - IMAGE_NAME: gpuImage + # IMAGE_NAME: gpuImage ADMIN_LOGIN: rhodri run: > pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" @@ -36,6 +36,6 @@ jobs: -resourceGroupName %RESOURCE_GROUP% -resourceGroupNameRegion %RESOURCE_GROUP_REGION% -serverName %SERVER_NAME% - -image %IMAGE_NAME% + # -image %IMAGE_NAME% -adminLogin %ADMIN_LOGIN% -adminPassword ${{ secrets.ADMIN_PASSWORD }} diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 index d4236a6cbf..35bb913076 100644 --- a/PSA/deployVM.ps1 +++ b/PSA/deployVM.ps1 @@ -81,7 +81,7 @@ try { az vm create ` --resource-group $resourceGroupName ` --name $serverName ` - --image $image ` + --image gpuImage ` --admin-username $adminLogin ` --admin-password $adminPassword } From 56f6613b9dc6dd0ccb4fc5c66078f2700f4ea524 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 13:49:02 +0000 Subject: [PATCH 18/84] Trigger workflow. --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 2ce2b97fda..9774f0c505 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -25,7 +25,7 @@ jobs: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth SERVER_NAME: githubactions - # IMAGE_NAME: gpuImage + # IMAGE_NAME: gpuImage # add trigger ADMIN_LOGIN: rhodri run: > pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" From 6c56b543041841c9641dcd344f739fabf5e670b5 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 13:54:17 +0000 Subject: [PATCH 19/84] Test. --- PSA/deployVM.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 index 35bb913076..864e31c226 100644 --- a/PSA/deployVM.ps1 +++ b/PSA/deployVM.ps1 @@ -81,7 +81,7 @@ try { az vm create ` --resource-group $resourceGroupName ` --name $serverName ` - --image gpuImage ` + --image win2019datacenter ` --admin-username $adminLogin ` --admin-password $adminPassword } From aec59f0694cee292fd8144dcf9684f6525df9cd8 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 14:02:00 +0000 Subject: [PATCH 20/84] . --- PSA/deployVM.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 index 864e31c226..44264bd171 100644 --- a/PSA/deployVM.ps1 +++ b/PSA/deployVM.ps1 @@ -81,7 +81,7 @@ try { az vm create ` --resource-group $resourceGroupName ` --name $serverName ` - --image win2019datacenter ` + --image UbuntuLTS ` --admin-username $adminLogin ` --admin-password $adminPassword } From d5f9b4f13b488440f0622e23050a4f3b2abf842a Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 14:15:11 +0000 Subject: [PATCH 21/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 9774f0c505..6bfae38335 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -25,7 +25,7 @@ jobs: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth SERVER_NAME: githubactions - # IMAGE_NAME: gpuImage # add trigger + # IMAGE_NAME: gpuImage # ADMIN_LOGIN: rhodri run: > pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" From 1d5b73c4568cbf378f2e99f3ec35038e2ab2033c Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 14:51:51 +0000 Subject: [PATCH 22/84] 1451 --- .github/workflows/pytest-gpu.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 6bfae38335..cfe48f4837 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -25,7 +25,6 @@ jobs: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth SERVER_NAME: githubactions - # IMAGE_NAME: gpuImage # ADMIN_LOGIN: rhodri run: > pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" @@ -36,6 +35,5 @@ jobs: -resourceGroupName %RESOURCE_GROUP% -resourceGroupNameRegion %RESOURCE_GROUP_REGION% -serverName %SERVER_NAME% - # -image %IMAGE_NAME% -adminLogin %ADMIN_LOGIN% -adminPassword ${{ secrets.ADMIN_PASSWORD }} From f579f28994efcc14c8b32d78a53d6d2749c677bf Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 15:12:40 +0000 Subject: [PATCH 23/84] . --- .github/workflows/pytest-gpu.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index cfe48f4837..eaaa5d7774 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -27,13 +27,13 @@ jobs: SERVER_NAME: githubactions ADMIN_LOGIN: rhodri run: > - pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" + pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" -servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }} - -servicePrincipalSecret ${{ secrets.SERVICE_PRINCIPAL_SECRET }} - -servicePrincipalTenantId ${{ secrets.SERVICE_PRINCIPAL_TENANTID }} + -servicePrincipalSecret ${{ secrets.SERVICE_PRINCIPAL_SECRET }} + -servicePrincipalTenantId ${{ secrets.SERVICE_PRINCIPAL_TENANTID }} -azureSubscriptionName ${{ secrets.AZURE_SUBSCRIPTION_ID }} - -resourceGroupName %RESOURCE_GROUP% - -resourceGroupNameRegion %RESOURCE_GROUP_REGION% - -serverName %SERVER_NAME% - -adminLogin %ADMIN_LOGIN% + -resourceGroupName $RESOURCE_GROUP + -resourceGroupNameRegion $RESOURCE_GROUP_REGION + -serverName $SERVER_NAME + -adminLogin $ADMIN_LOGIN -adminPassword ${{ secrets.ADMIN_PASSWORD }} From 4c52e3935abe800195542cb78865a7597eb57c27 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 16:11:22 +0000 Subject: [PATCH 24/84] 1611 --- .github/workflows/pytest-gpu.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index eaaa5d7774..bd53a459dd 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -37,3 +37,7 @@ jobs: -serverName $SERVER_NAME -adminLogin $ADMIN_LOGIN -adminPassword ${{ secrets.ADMIN_PASSWORD }} + ssh rhodri@$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) + expect "password" + send "${{ secrets.ADMIN_PASSWORD }}\r" + interact From df175bbb1b5a767f789b641b65a574831b5466c2 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 16:24:52 +0000 Subject: [PATCH 25/84] 1624 --- .github/workflows/pytest-gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index bd53a459dd..f5b28080fa 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -37,6 +37,7 @@ jobs: -serverName $SERVER_NAME -adminLogin $ADMIN_LOGIN -adminPassword ${{ secrets.ADMIN_PASSWORD }} + - name: log into vm ssh rhodri@$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) expect "password" send "${{ secrets.ADMIN_PASSWORD }}\r" From 4f0402069cc78797ea3bb77e38fe94e0868f67b1 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 16:34:38 +0000 Subject: [PATCH 26/84] 1634 --- .github/workflows/pytest-gpu.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index f5b28080fa..4bfead649a 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -38,7 +38,6 @@ jobs: -adminLogin $ADMIN_LOGIN -adminPassword ${{ secrets.ADMIN_PASSWORD }} - name: log into vm + run: | ssh rhodri@$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) - expect "password" - send "${{ secrets.ADMIN_PASSWORD }}\r" - interact + From 20d9d4a26df7133366a32c5c09c0ef10c2e3de2a Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 17:24:44 +0000 Subject: [PATCH 27/84] 1724 --- .github/workflows/pytest-gpu.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 4bfead649a..c73fc451ae 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -12,6 +12,9 @@ jobs: DeployVM: runs-on: ubuntu-latest + env: + HOST: " " + steps: # checkout code from repo - name: checkout repo @@ -25,8 +28,7 @@ jobs: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth SERVER_NAME: githubactions - ADMIN_LOGIN: rhodri - run: > + run: | pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" -servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }} -servicePrincipalSecret ${{ secrets.SERVICE_PRINCIPAL_SECRET }} @@ -35,9 +37,16 @@ jobs: -resourceGroupName $RESOURCE_GROUP -resourceGroupNameRegion $RESOURCE_GROUP_REGION -serverName $SERVER_NAME - -adminLogin $ADMIN_LOGIN + -adminLogin ${{ secrets.ADMIN_LOGIN }} -adminPassword ${{ secrets.ADMIN_PASSWORD }} - - name: log into vm - run: | - ssh rhodri@$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) + echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@master + with: + host: $HOST + username: ${{ secrets.USERNAME }} + password: ${{ secrets.ADMIN_PASSWORD }} + script: | + whoami + ls -al From b8f30f8c12933a31e321c242ccccde66b2544ca2 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 17:34:38 +0000 Subject: [PATCH 28/84] 1734 --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index c73fc451ae..27634e967a 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -27,7 +27,7 @@ jobs: env: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth - SERVER_NAME: githubactions + SERVER_NAME: testgpu run: | pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" -servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }} From b30009189f2121ed302b528a660dbf7b26c41224 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 17:40:43 +0000 Subject: [PATCH 29/84] 1740 --- .github/workflows/pytest-gpu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 27634e967a..b9c7796779 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -28,7 +28,7 @@ jobs: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth SERVER_NAME: testgpu - run: | + run: > pwsh -command "& '${{ env.OUTPUT_PATH }}\PSA\deployVM.ps1'" -servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }} -servicePrincipalSecret ${{ secrets.SERVICE_PRINCIPAL_SECRET }} @@ -39,8 +39,8 @@ jobs: -serverName $SERVER_NAME -adminLogin ${{ secrets.ADMIN_LOGIN }} -adminPassword ${{ secrets.ADMIN_PASSWORD }} - echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) - + - name: set host + run: echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) - name: executing remote ssh commands using password uses: appleboy/ssh-action@master with: From a687cda6c53cc2a7da49467c518beb1dd7a49e08 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 17:52:48 +0000 Subject: [PATCH 30/84] 1752 --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index b9c7796779..5dc6ddeccf 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -40,7 +40,7 @@ jobs: -adminLogin ${{ secrets.ADMIN_LOGIN }} -adminPassword ${{ secrets.ADMIN_PASSWORD }} - name: set host - run: echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n githubactions --query publicIps -o tsv) + run: echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) - name: executing remote ssh commands using password uses: appleboy/ssh-action@master with: From 80204a00302ecb0633ff01330e45f1b34da173bf Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 18:03:21 +0000 Subject: [PATCH 31/84] 1803 --- .github/workflows/pytest-gpu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 5dc6ddeccf..ca65fdf958 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -40,7 +40,9 @@ jobs: -adminLogin ${{ secrets.ADMIN_LOGIN }} -adminPassword ${{ secrets.ADMIN_PASSWORD }} - name: set host - run: echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) + run: | + echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) + echo $HOST - name: executing remote ssh commands using password uses: appleboy/ssh-action@master with: From 1cdc06419efa1e951823b5be2cc7203bcdbd0f09 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 18:10:16 +0000 Subject: [PATCH 32/84] 1810 --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index ca65fdf958..7bae8a8f59 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest env: - HOST: " " + HOST: "51.132.14.19" steps: # checkout code from repo From a31fb381cd2fe2efb7e1fe2b8dcff0e498ab02e5 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 18:16:03 +0000 Subject: [PATCH 33/84] 1816 --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 7bae8a8f59..cc4d9bb388 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -47,7 +47,7 @@ jobs: uses: appleboy/ssh-action@master with: host: $HOST - username: ${{ secrets.USERNAME }} + username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script: | whoami From b39450f70ba4ea9888bf0d6a5ce077360af60f8a Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Fri, 7 Feb 2020 18:37:41 +0000 Subject: [PATCH 34/84] 1837 --- .github/workflows/pytest-gpu.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index cc4d9bb388..4a0e7f0071 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -12,9 +12,6 @@ jobs: DeployVM: runs-on: ubuntu-latest - env: - HOST: "51.132.14.19" - steps: # checkout code from repo - name: checkout repo @@ -40,13 +37,12 @@ jobs: -adminLogin ${{ secrets.ADMIN_LOGIN }} -adminPassword ${{ secrets.ADMIN_PASSWORD }} - name: set host - run: | - echo ::set-env name=HOST::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) - echo $HOST + run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) + id: host - name: executing remote ssh commands using password uses: appleboy/ssh-action@master with: - host: $HOST + host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script: | From fd46d7b7da3e2cd3e2888faec6857fc8c017a5df Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 11:40:20 +0000 Subject: [PATCH 35/84] workflows: Set correct image for GPU testing. --- .github/workflows/pytest-gpu.yml | 6 ++++-- PSA/deployVM.ps1 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 4a0e7f0071..945a23b4d5 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -46,5 +46,7 @@ jobs: username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script: | - whoami - ls -al + conda activate devito + cd programs/devito + git pull + DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py diff --git a/PSA/deployVM.ps1 b/PSA/deployVM.ps1 index 44264bd171..42a57c218c 100644 --- a/PSA/deployVM.ps1 +++ b/PSA/deployVM.ps1 @@ -81,7 +81,7 @@ try { az vm create ` --resource-group $resourceGroupName ` --name $serverName ` - --image UbuntuLTS ` + --image RhodriGpuVM-image-20200210110731 ` --admin-username $adminLogin ` --admin-password $adminPassword } From 3bfbed98d44a6833963f069fcdd330a51b754aeb Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 12:50:48 +0000 Subject: [PATCH 36/84] Test. Remove. --- .github/workflows/pytest-gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 945a23b4d5..83318a909c 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -47,6 +47,7 @@ jobs: password: ${{ secrets.ADMIN_PASSWORD }} script: | conda activate devito + export PATH=~/programs/install/bin:$PATH + export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd programs/devito - git pull DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py From 44c53e20a6d863810738bcd9b477cb5e287aa2ea Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 16:50:05 +0000 Subject: [PATCH 37/84] force build. --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 83318a909c..a37ee2ec4d 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -39,7 +39,7 @@ jobs: - name: set host run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) id: host - - name: executing remote ssh commands using password + - name: executing remote ssh commands uses: appleboy/ssh-action@master with: host: ${{ steps.host.outputs.action_host }} From 80da0a689780e03d6537a7a521b41699a23c6fb8 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 16:59:38 +0000 Subject: [PATCH 38/84] test. --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index a37ee2ec4d..7212b87365 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -39,7 +39,7 @@ jobs: - name: set host run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) id: host - - name: executing remote ssh commands + - name: executing remote ssh commands: test gpu uses: appleboy/ssh-action@master with: host: ${{ steps.host.outputs.action_host }} From 81ffdfc342f06687b19ef28233e8d6fb378f924d Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:01:37 +0000 Subject: [PATCH 39/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 7212b87365..a37ee2ec4d 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -39,7 +39,7 @@ jobs: - name: set host run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) id: host - - name: executing remote ssh commands: test gpu + - name: executing remote ssh commands uses: appleboy/ssh-action@master with: host: ${{ steps.host.outputs.action_host }} From 80ec50bc221d3f3e91fc104e91f6c96efe77a46c Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:16:11 +0000 Subject: [PATCH 40/84] force build. --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index a37ee2ec4d..b0a915ba60 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -39,7 +39,7 @@ jobs: - name: set host run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) id: host - - name: executing remote ssh commands + - name: executing remote ssh commands test uses: appleboy/ssh-action@master with: host: ${{ steps.host.outputs.action_host }} From 1549613e51d0c5d8d369c3603772e4cc03c65692 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:22:26 +0000 Subject: [PATCH 41/84] . --- .github/workflows/pytest-gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index b0a915ba60..1b44bd3736 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -45,6 +45,7 @@ jobs: host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} + script_stop: true script: | conda activate devito export PATH=~/programs/install/bin:$PATH From ce196b95286173172078b82a00cec4d4f7018802 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:32:34 +0000 Subject: [PATCH 42/84] . --- .github/workflows/pytest-gpu.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 1b44bd3736..8f6220d27d 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -47,8 +47,5 @@ jobs: password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true script: | - conda activate devito export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd programs/devito - DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py From e3a180923cc2b42d79161f82b7094e0e6d5364f7 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:37:15 +0000 Subject: [PATCH 43/84] . --- .github/workflows/pytest-gpu.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 8f6220d27d..3930bdcb37 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -49,3 +49,6 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH + source activate devito + cd programs/devito + DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py From ee8d7a86686d1391aaec6085daf01b398eb8d723 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:43:18 +0000 Subject: [PATCH 44/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 3930bdcb37..061649aefa 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -51,4 +51,4 @@ jobs: export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH source activate devito cd programs/devito - DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py + DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito ~/programs/devito/tests/test_gpu.py From c75e74c1c96b739449d03d86bd826e339ea6ce9e Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:43:40 +0000 Subject: [PATCH 45/84] . --- .github/workflows/pytest-gpu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 061649aefa..f152705f25 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -50,5 +50,4 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH source activate devito - cd programs/devito DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito ~/programs/devito/tests/test_gpu.py From 2c205fab822feb70f395232d5e7e5ea58267f44b Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:49:52 +0000 Subject: [PATCH 46/84] . --- .github/workflows/pytest-gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index f152705f25..c6c969588c 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -50,4 +50,5 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH source activate devito - DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito ~/programs/devito/tests/test_gpu.py + pwd + ls -ll From f7d32d4cc1998c9dc69e929590255918993bed10 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 17:55:01 +0000 Subject: [PATCH 47/84] . --- .github/workflows/pytest-gpu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index c6c969588c..e23f782492 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -50,5 +50,4 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH source activate devito - pwd - ls -ll + cd ~ From 53f7dece6c4caf835ab95695cce0153261084f61 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 18:01:18 +0000 Subject: [PATCH 48/84] . --- .github/workflows/pytest-gpu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index e23f782492..61b1ba4124 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -50,4 +50,3 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH source activate devito - cd ~ From 40f37d5c79e7ea0dcdbb960429491cde9b93d997 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Mon, 10 Feb 2020 18:18:16 +0000 Subject: [PATCH 49/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 61b1ba4124..a2bebc4e79 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -49,4 +49,4 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - source activate devito + pwd From 68e9b2e72fbae8119e682daff737b018242cd56e Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 14:22:09 +0000 Subject: [PATCH 50/84] . --- .github/workflows/pytest-gpu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index a2bebc4e79..4ca7d79ba3 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -41,6 +41,8 @@ jobs: id: host - name: executing remote ssh commands test uses: appleboy/ssh-action@master + env: + userdir: ${{ secrets.ADMIN_LOGIN }} with: host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} @@ -49,4 +51,4 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - pwd + cd /home/${userdir} From 5b415415b6d7ff10a5ac33f6b56d4be5760aea2e Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 14:26:08 +0000 Subject: [PATCH 51/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 4ca7d79ba3..1364ec5607 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -51,4 +51,4 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd /home/${userdir} + cd /home/${userdir}/programs/devito From 71c17847d5f29462bdb173921481e8b1b2ae7fca Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 14:32:22 +0000 Subject: [PATCH 52/84] . --- .github/workflows/pytest-gpu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 1364ec5607..877e4b0c0a 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -43,12 +43,14 @@ jobs: uses: appleboy/ssh-action@master env: userdir: ${{ secrets.ADMIN_LOGIN }} + target: "/programs/devito" with: host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true + envs: target script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd /home/${userdir}/programs/devito + cd /home/${userdir}${target} From 98b701af3a8f2dfeb3ff3f8e4cce7361f831235f Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 14:52:06 +0000 Subject: [PATCH 53/84] . --- .github/workflows/pytest-gpu.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 877e4b0c0a..13fc92991d 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -44,13 +44,17 @@ jobs: env: userdir: ${{ secrets.ADMIN_LOGIN }} target: "/programs/devito" + activate: "conda activate devito" + run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" with: host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true - envs: target + envs: target, activate, run_tests script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd /home/${userdir}${target} + ${activate} + ${run_tests} From b0538580db852e17dd5c09d280d0fcb4532028b7 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 14:56:56 +0000 Subject: [PATCH 54/84] . --- .github/workflows/pytest-gpu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 13fc92991d..f52040e533 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,5 +56,4 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd /home/${userdir}${target} - ${activate} ${run_tests} From 9a0c8eef990b654ac0e22c9a022257b506da2ab1 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:00:06 +0000 Subject: [PATCH 55/84] . --- .github/workflows/pytest-gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index f52040e533..c6def9f1b0 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,4 +56,5 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd /home/${userdir}${target} + pwd ${run_tests} From 2645b12d3f23f8417f23d43a831bc57d2d81e2f2 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:10:49 +0000 Subject: [PATCH 56/84] . --- .github/workflows/pytest-gpu.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index c6def9f1b0..30d60a7dcc 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -42,6 +42,7 @@ jobs: - name: executing remote ssh commands test uses: appleboy/ssh-action@master env: + home: "/home" userdir: ${{ secrets.ADMIN_LOGIN }} target: "/programs/devito" activate: "conda activate devito" @@ -51,10 +52,10 @@ jobs: username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true - envs: target, activate, run_tests + envs: home, userdir, target, activate, run_tests script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd /home/${userdir}${target} + cd $home$userdir$target pwd - ${run_tests} + $run_tests From fa5cf13a7a0fd0b980a4fab504f187a360d25ea5 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:15:31 +0000 Subject: [PATCH 57/84] . --- .github/workflows/pytest-gpu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 30d60a7dcc..c04fba40b9 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -44,7 +44,7 @@ jobs: env: home: "/home" userdir: ${{ secrets.ADMIN_LOGIN }} - target: "/programs/devito" + target: "home/rhodri/programs/devito" activate: "conda activate devito" run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" with: @@ -56,6 +56,6 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd $home$userdir$target + cd $target pwd $run_tests From 939eccb028c840182e53881eeaf8f857ff6058d8 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:19:11 +0000 Subject: [PATCH 58/84] . --- .github/workflows/pytest-gpu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index c04fba40b9..b230f7e441 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,6 +56,5 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd $target + cd $home pwd - $run_tests From e97ce0afec3fb3df397ff85f645fe211124b1406 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:21:52 +0000 Subject: [PATCH 59/84] . --- .github/workflows/pytest-gpu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index b230f7e441..c1539120c8 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -42,7 +42,7 @@ jobs: - name: executing remote ssh commands test uses: appleboy/ssh-action@master env: - home: "/home" + myhome: "/home" userdir: ${{ secrets.ADMIN_LOGIN }} target: "home/rhodri/programs/devito" activate: "conda activate devito" @@ -52,9 +52,9 @@ jobs: username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true - envs: home, userdir, target, activate, run_tests + envs: myhome, userdir, target, activate, run_tests script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd $home + cd $myhome pwd From 304da7f70abe52760cdba4745c38fe18e2b801e8 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:43:04 +0000 Subject: [PATCH 60/84] . --- .github/workflows/pytest-gpu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index c1539120c8..03edb14672 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -42,7 +42,7 @@ jobs: - name: executing remote ssh commands test uses: appleboy/ssh-action@master env: - myhome: "/home" + myhome: "cd /home" userdir: ${{ secrets.ADMIN_LOGIN }} target: "home/rhodri/programs/devito" activate: "conda activate devito" @@ -56,5 +56,5 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd $myhome + $myhome pwd From 99b2030b03425c8d20ac4066de8d1a7da1f10691 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:52:02 +0000 Subject: [PATCH 61/84] . --- .github/workflows/pytest-gpu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 03edb14672..a7e5021162 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,5 +56,4 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - $myhome - pwd + echo $myhome From 8d736b44b29379a8c5e9327f8b6a02bea1e7b492 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 15:54:23 +0000 Subject: [PATCH 62/84] . --- .github/workflows/pytest-gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index a7e5021162..32a69dff56 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -57,3 +57,4 @@ jobs: export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH echo $myhome + echo $activate From 968d6f7e5037265a0ab5ce2a1687339bd9712299 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:00:28 +0000 Subject: [PATCH 63/84] . --- .github/workflows/pytest-gpu.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 32a69dff56..bf13e16772 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -41,20 +41,20 @@ jobs: id: host - name: executing remote ssh commands test uses: appleboy/ssh-action@master - env: - myhome: "cd /home" - userdir: ${{ secrets.ADMIN_LOGIN }} - target: "home/rhodri/programs/devito" - activate: "conda activate devito" - run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + #env: + #myhome: "cd /home" + #userdir: ${{ secrets.ADMIN_LOGIN }} + #target: "home/rhodri/programs/devito" + #activate: "conda activate devito" + #run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" with: host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true - envs: myhome, userdir, target, activate, run_tests + #envs: myhome, userdir, target, activate, run_tests script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - echo $myhome - echo $activate + testcd="cd /home/" + echo $testcd From 58f988bac38d5aa2ceb6d2295dbc153f757572ca Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:11:41 +0000 Subject: [PATCH 64/84] . --- .github/workflows/pytest-gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index bf13e16772..7e927e8db1 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,5 +56,6 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - testcd="cd /home/" + testcd="cd /home/rhodri/programs/devito" echo $testcd + $testcd From d5afab6ebac59d6867cce4232f2b77b48efb30a9 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:15:24 +0000 Subject: [PATCH 65/84] . --- .github/workflows/pytest-gpu.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 7e927e8db1..9c320d73dd 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,6 +56,9 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH + activate="conda activate devito" + $activate testcd="cd /home/rhodri/programs/devito" - echo $testcd $testcd + run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + $run_tests From a62874d2b8821e2be5bf31612847876c3f9b4f25 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:34:43 +0000 Subject: [PATCH 66/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 9c320d73dd..e119d76aca 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,7 +56,7 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - activate="conda activate devito" + activate="source activate devito" $activate testcd="cd /home/rhodri/programs/devito" $testcd From 5981b433d1b61286deb061a1220b911b8df62f36 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:43:54 +0000 Subject: [PATCH 67/84] . --- .github/workflows/pytest-gpu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index e119d76aca..23808e4995 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -56,8 +56,8 @@ jobs: script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - activate="source activate devito" - $activate + #activate="source activate devito" + #$activate testcd="cd /home/rhodri/programs/devito" $testcd run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" From c8d46eb16e3f05214bb209cba1b3b35dbe3d2312 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:56:31 +0000 Subject: [PATCH 68/84] . --- .github/workflows/pytest-gpu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 23808e4995..6e3ace166f 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -60,5 +60,6 @@ jobs: #$activate testcd="cd /home/rhodri/programs/devito" $testcd - run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" - $run_tests + pwd + #run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + #$run_tests From 3c8a2d3ac7f1e21e2ba029892b11cde2a17b36be Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 16:59:33 +0000 Subject: [PATCH 69/84] . --- .github/workflows/pytest-gpu.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 6e3ace166f..cfa3b7531e 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -47,19 +47,21 @@ jobs: #target: "home/rhodri/programs/devito" #activate: "conda activate devito" #run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + #run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + #$run_tests + #envs: myhome, userdir, target, activate, run_tests + #activate="source activate devito" + #$activate with: host: ${{ steps.host.outputs.action_host }} username: ${{ secrets.ADMIN_LOGIN }} password: ${{ secrets.ADMIN_PASSWORD }} script_stop: true - #envs: myhome, userdir, target, activate, run_tests + script: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - #activate="source activate devito" - #$activate testcd="cd /home/rhodri/programs/devito" $testcd pwd - #run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" - #$run_tests + ls From 59ebd132dd4405420101629654db31e0e8646454 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 17:57:39 +0000 Subject: [PATCH 70/84] . --- .github/workflows/pytest-gpu.yml | 54 +++++++++++++++++++------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index cfa3b7531e..9a18500036 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -39,29 +39,41 @@ jobs: - name: set host run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) id: host + #- name: executing remote ssh commands test + #uses: appleboy/ssh-action@master + ##env: + ##myhome: "cd /home" + ##userdir: ${{ secrets.ADMIN_LOGIN }} + ##target: "home/rhodri/programs/devito" + ##activate: "conda activate devito" + ##run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + ##run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" + ##$run_tests + ##envs: myhome, userdir, target, activate, run_tests + ##activate="source activate devito" + ##$activate + #with: + #host: ${{ steps.host.outputs.action_host }} + #username: ${{ secrets.ADMIN_LOGIN }} + #password: ${{ secrets.ADMIN_PASSWORD }} + #script_stop: true + + #script: | + #export PATH=~/programs/install/bin:$PATH + #export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH + #testcd="cd /home/rhodri/programs/devito" + #$testcd + #pwd + #ls - name: executing remote ssh commands test - uses: appleboy/ssh-action@master - #env: - #myhome: "cd /home" - #userdir: ${{ secrets.ADMIN_LOGIN }} - #target: "home/rhodri/programs/devito" - #activate: "conda activate devito" - #run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" - #run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" - #$run_tests - #envs: myhome, userdir, target, activate, run_tests - #activate="source activate devito" - #$activate + uses: fifsky/ssh-action@master with: - host: ${{ steps.host.outputs.action_host }} - username: ${{ secrets.ADMIN_LOGIN }} - password: ${{ secrets.ADMIN_PASSWORD }} - script_stop: true - - script: | + command: | export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - testcd="cd /home/rhodri/programs/devito" - $testcd + conda activate devito + cd /home/rhodri/programs/devito pwd - ls + host: ${{ steps.host.outputs.action_host }} + user: ${{ secrets.ADMIN_LOGIN }} + key: ${{ secrets.ADMIN_PASSWORD }} From 464cde38827d8a0b03248b0f25105ba678e040ab Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 17:58:23 +0000 Subject: [PATCH 71/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 9a18500036..5bfdb5ecb2 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -57,7 +57,6 @@ jobs: #username: ${{ secrets.ADMIN_LOGIN }} #password: ${{ secrets.ADMIN_PASSWORD }} #script_stop: true - #script: | #export PATH=~/programs/install/bin:$PATH #export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH @@ -77,3 +76,4 @@ jobs: host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} key: ${{ secrets.ADMIN_PASSWORD }} + From 38598a3a9c48bb052c16e460805e3a89e7a3f43f Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:03:33 +0000 Subject: [PATCH 72/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 5bfdb5ecb2..95525a06b4 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -75,5 +75,5 @@ jobs: pwd host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} - key: ${{ secrets.ADMIN_PASSWORD }} + pass: ${{ secrets.ADMIN_PASSWORD }} From 6f5259a22fabad37e4cadbb55faa49ba614a8e0a Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:08:54 +0000 Subject: [PATCH 73/84] . --- .github/workflows/pytest-gpu.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 95525a06b4..7c538ae3e1 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,12 +68,14 @@ jobs: uses: fifsky/ssh-action@master with: command: | - export PATH=~/programs/install/bin:$PATH - export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH conda activate devito - cd /home/rhodri/programs/devito - pwd host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} + #export PATH=~/programs/install/bin:$PATH + #export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH + #conda activate devito + #cd /home/rhodri/programs/devito + #pwd + From c991dc683717d21e3ba1451e46072ff0d5f0ce80 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:13:32 +0000 Subject: [PATCH 74/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 7c538ae3e1..0bd9c1640f 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,7 +68,7 @@ jobs: uses: fifsky/ssh-action@master with: command: | - conda activate devito + source activate devito host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} From f12fbf5180117196ef0d208f24b50a479df02311 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:17:03 +0000 Subject: [PATCH 75/84] . --- .github/workflows/pytest-gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 0bd9c1640f..436c2230d4 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,7 +68,7 @@ jobs: uses: fifsky/ssh-action@master with: command: | - source activate devito + conda -h host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} From 2651ac040988986864a6fc870234d34d86c41874 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:26:56 +0000 Subject: [PATCH 76/84] . --- .github/workflows/pytest-gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 436c2230d4..d7d4147432 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,7 +68,8 @@ jobs: uses: fifsky/ssh-action@master with: command: | - conda -h + activate="conda activate devito" + $activate host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} From a01f105bb02a9933ce189101cd0ebc02ba012159 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:30:31 +0000 Subject: [PATCH 77/84] . --- .github/workflows/pytest-gpu.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index d7d4147432..9ce95750f2 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,6 +68,10 @@ jobs: uses: fifsky/ssh-action@master with: command: | + export PATH=~/programs/install/bin:$PATH + export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH + cd ~/programs/devito + pwd activate="conda activate devito" $activate host: ${{ steps.host.outputs.action_host }} From 4d9ef9be632bd1a190413c62beb8d4c915b424cc Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:35:25 +0000 Subject: [PATCH 78/84] . --- .github/workflows/pytest-gpu.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 9ce95750f2..f30e4a90f1 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,12 +68,13 @@ jobs: uses: fifsky/ssh-action@master with: command: | + if [ -f ~/.bashrc ]; then + . ~/.bashrc + fi export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd ~/programs/devito - pwd - activate="conda activate devito" - $activate + conda activate devito host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} From eebe42fd7a174df3478d92e7e2af3321178eb809 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Tue, 18 Feb 2020 18:42:14 +0000 Subject: [PATCH 79/84] . --- .github/workflows/pytest-gpu.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index f30e4a90f1..a5153313cb 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,9 +68,7 @@ jobs: uses: fifsky/ssh-action@master with: command: | - if [ -f ~/.bashrc ]; then - . ~/.bashrc - fi + . ~/.bashrc export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd ~/programs/devito From 414a4425549ec3ca6fa1b7d87df1fe01c269376d Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 19 Feb 2020 09:40:50 +0000 Subject: [PATCH 80/84] . --- .github/workflows/pytest-gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index a5153313cb..dce474121d 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -70,6 +70,7 @@ jobs: command: | . ~/.bashrc export PATH=~/programs/install/bin:$PATH + export PATH="/home/rhodri/anaconda3/bin:$PATH" export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd ~/programs/devito conda activate devito From a40b8661f6cb009fd715185a157f590ba2c109df Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 19 Feb 2020 09:45:06 +0000 Subject: [PATCH 81/84] . --- .github/workflows/pytest-gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index dce474121d..4eca1f49ae 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -69,8 +69,9 @@ jobs: with: command: | . ~/.bashrc - export PATH=~/programs/install/bin:$PATH export PATH="/home/rhodri/anaconda3/bin:$PATH" + conda init bash + export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH cd ~/programs/devito conda activate devito From fa31aa132280eedd705e47a20c8e672eccf76a81 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 19 Feb 2020 09:51:29 +0000 Subject: [PATCH 82/84] . --- .github/workflows/pytest-gpu.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 4eca1f49ae..2eb82fbd12 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -68,17 +68,18 @@ jobs: uses: fifsky/ssh-action@master with: command: | - . ~/.bashrc - export PATH="/home/rhodri/anaconda3/bin:$PATH" - conda init bash export PATH=~/programs/install/bin:$PATH export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - cd ~/programs/devito + source ~/anaconda3/etc/profile.d/conda.sh conda activate devito + cd ~/programs/devito host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} + #. ~/.bashrc + #export PATH="/home/rhodri/anaconda3/bin:$PATH" + #conda init bash #export PATH=~/programs/install/bin:$PATH #export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH #conda activate devito From 83eacd59d875b6eae0adbe9da2b5c1219b9c3c27 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 19 Feb 2020 10:19:59 +0000 Subject: [PATCH 83/84] . --- .github/workflows/pytest-gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index 2eb82fbd12..a2ebf96e15 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -73,6 +73,7 @@ jobs: source ~/anaconda3/etc/profile.d/conda.sh conda activate devito cd ~/programs/devito + DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} From 179b30576abe3e8808aba2dbafe7e31d4540a9a7 Mon Sep 17 00:00:00 2001 From: Rhodri Nelson Date: Wed, 19 Feb 2020 12:26:41 +0000 Subject: [PATCH 84/84] . --- .github/workflows/pytest-gpu.yml | 41 +++----------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml index a2ebf96e15..aee31354f0 100644 --- a/.github/workflows/pytest-gpu.yml +++ b/.github/workflows/pytest-gpu.yml @@ -1,5 +1,5 @@ # Adapted from https://github.com/weeyin83/vm-actions -name: Deploy VM on Azure +name: Deploy VM on Azure and run GPU tests env: OUTPUT_PATH: ${{ github.workspace }} @@ -7,7 +7,7 @@ env: on: [push] jobs: - + # Deploy VM in Azure DeployVM: runs-on: ubuntu-latest @@ -20,7 +20,7 @@ jobs: - name: look for ps1 file run: | ls '${{ env.OUTPUT_PATH }}/PSA' - - name: provision virtual machine in azure + - name: deploy VM env: RESOURCE_GROUP: RhodriGpu RESOURCE_GROUP_REGION: uksouth @@ -39,31 +39,6 @@ jobs: - name: set host run: echo ::set-output name=action_host::$(az vm show -d -g RhodriGpu -n testgpu --query publicIps -o tsv) id: host - #- name: executing remote ssh commands test - #uses: appleboy/ssh-action@master - ##env: - ##myhome: "cd /home" - ##userdir: ${{ secrets.ADMIN_LOGIN }} - ##target: "home/rhodri/programs/devito" - ##activate: "conda activate devito" - ##run_tests: "DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" - ##run_tests="DEVITO_ARCH=clang DEVITO_PLATFORM=nvidiaX py.test -s -x --cov devito tests/test_gpu.py" - ##$run_tests - ##envs: myhome, userdir, target, activate, run_tests - ##activate="source activate devito" - ##$activate - #with: - #host: ${{ steps.host.outputs.action_host }} - #username: ${{ secrets.ADMIN_LOGIN }} - #password: ${{ secrets.ADMIN_PASSWORD }} - #script_stop: true - #script: | - #export PATH=~/programs/install/bin:$PATH - #export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - #testcd="cd /home/rhodri/programs/devito" - #$testcd - #pwd - #ls - name: executing remote ssh commands test uses: fifsky/ssh-action@master with: @@ -77,13 +52,3 @@ jobs: host: ${{ steps.host.outputs.action_host }} user: ${{ secrets.ADMIN_LOGIN }} pass: ${{ secrets.ADMIN_PASSWORD }} - - #. ~/.bashrc - #export PATH="/home/rhodri/anaconda3/bin:$PATH" - #conda init bash - #export PATH=~/programs/install/bin:$PATH - #export LD_LIBRARY_PATH=~/programs/install/lib:$LD_LIBRARY_PATH - #conda activate devito - #cd /home/rhodri/programs/devito - #pwd -