Skip to content

Commit

Permalink
workflows: Update gpu yml and action, tests: Revert GPU iso-acoustic …
Browse files Browse the repository at this point in the history
…test tolerance.
  • Loading branch information
rhodrin committed Feb 21, 2020
1 parent 82f9007 commit 2781683
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/azure/deployVM.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ param(
[string]
$serverName,

[Parameter(Mandatory = $True)]
[string]
$vmImage,

[Parameter(Mandatory = $True)]
[string]
$adminLogin,
Expand Down Expand Up @@ -81,7 +85,7 @@ try {
az vm create `
--resource-group $resourceGroupName `
--name $serverName `
--image testgpu-image-20200219162635 `
--image $vmImage `
--admin-username $adminLogin `
--admin-password $adminPassword
}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pytest-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
env:
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
RESOURCE_GROUP_REGION: uksouth
SERVER_NAME: gpu_ci_vm
SERVER_NAME: gpu_ci_vm_${{ steps.extract_branch.outputs.branch }}
IMAGE: gpu_ci_vm-image-21022020
run: >
pwsh -command "& '${{ env.OUTPUT_PATH }}\.github\azure\deployVM.ps1'"
-servicePrincipal ${{ secrets.SERVICE_PRINCIPAL_APPID }}
Expand All @@ -40,6 +41,7 @@ jobs:
-resourceGroupName $RESOURCE_GROUP
-resourceGroupNameRegion $RESOURCE_GROUP_REGION
-serverName $SERVER_NAME
-vmImage $IMAGE
-adminLogin ${{ secrets.ADMIN_LOGIN }}
-adminPassword ${{ secrets.ADMIN_PASSWORD }}
Expand All @@ -58,6 +60,10 @@ jobs:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate devito
cd ~/programs/devito
# Ensure no merge conflicts arise
git checkout master
git rev-parse --verify --quiet ${{ steps.extract_branch.outputs.branch }}
if [ $? -eq 0 ]; then git branch -D ${{ steps.extract_branch.outputs.branch }}; fi
git fetch
git checkout ${{ steps.extract_branch.outputs.branch }}
git pull
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ def test_iso_ac(self):
op = Operator([stencil] + src_term + rec_term, dle=('advanced', {'openmp': True}))
op(time=time_range.num-1, dt=dt)

assert np.isclose(norm(rec), 495.54, atol=1e-1, rtol=0)
assert np.isclose(norm(rec), 490.54, atol=1e-2, rtol=0)

0 comments on commit 2781683

Please sign in to comment.