Skip to content

Commit

Permalink
Merge pull request #18 from devitocodes/timetiling_on_master
Browse files Browse the repository at this point in the history
Timetiling on master
  • Loading branch information
georgebisbas authored Oct 12, 2020
2 parents c150f6c + c426e11 commit 588f257
Show file tree
Hide file tree
Showing 384 changed files with 59,252 additions and 13,082 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ branch = True
omit =
# Autogenerated missed code handles other VCSes.
devito/_version.py
examples/*__init__*
concurrency = multiprocessing
parallel = True

Expand Down
49 changes: 49 additions & 0 deletions .github/azure/startVM.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Start a (stopped) VM

[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]
$vmName
)

az login `
--service-principal `
--username $servicePrincipal `
--password $servicePrincipalSecret `
--tenant $servicePrincipalTenantId

az account set --subscription $azureSubscriptionName

Write-Output "Booting VM"
try {
az vm start -g $resourceGroupName -n $vmName --verbose
Write-Output "VM running"
}
catch {
Write-Output "VM already running"
}
# Add pause for safety
Start-Sleep -s 120
az vm list -d -o table --query "[?name=='$vmName']"
Write-Output ""
46 changes: 46 additions & 0 deletions .github/azure/stopVM.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Stop an (active) VM

[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]
$vmName
)

az login `
--service-principal `
--username $servicePrincipal `
--password $servicePrincipalSecret `
--tenant $servicePrincipalTenantId

az account set --subscription $azureSubscriptionName

Write-Output "Stopping VM"
try {
az vm deallocate -g $resourceGroupName -n $vmName --verbose
Write-Output "VM stopped"
}
catch {
Write-Output "VM not running"
}
Write-Output ""
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
# Add assignees
assignees:
- "mloubout"
commit-message:
prefix: "pip prod"
prefix-development: "pip dev"
include: "scope"
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
- title: '🐛 Bug Fixes'
labels:
- 'bug-performance-C'
- 'bug-performance-py'
- 'bug-py-minor'
- 'bug-py'
- 'bug-performance-gpu'
- title: 'API'
label: 'API'
- title: 'Examples'
label: 'examples'
- title: 'Documentation'
label: 'documentation'
- title: 'Compiler'
label: 'Compiler'
- title: 'MPI'
label: 'MPI'
- title: 'GPU'
label: 'GPUs'
- title: 'Testing'
label: 'testing'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## Changes
$CHANGES
148 changes: 148 additions & 0 deletions .github/workflows/asv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Runner informaiton:
# Standard F8s_v2 (8 vcpus, 16 GiB memory)
# Intel Xeon® Platinum 8168 (SkyLake)

name: asv-benchmarks

env:
OUTPUT_PATH: ${{ github.workspace }}
RESOURCE_GROUP: devito-regression
VM_NAME: asv-runner-00

on:
# Trigger the workflow on push to the master branch
push:
branches:
- master

jobs:
# Boot the self-hosted runner and start runner app
start-runner:
name: start-runner
runs-on: ubuntu-latest

steps:
- name: checkout repo
uses: actions/checkout@v2.3.2

- name: start VM
env:
SP_APPID: ${{ secrets.SERVICE_PRINCIPAL_APPID }}
SP_SECRET: ${{ secrets.SERVICE_PRINCIPAL_SECRET }}
TENANT_ID: ${{ secrets.SERVICE_PRINCIPAL_TENANTID }}
SUB_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
run: >
pwsh -command "& '${{ env.OUTPUT_PATH }}\.github\azure\startVM.ps1'"
-servicePrincipal $SP_APPID
-servicePrincipalSecret $SP_SECRET
-servicePrincipalTenantId $TENANT_ID
-azureSubscriptionName $SUB_ID
-resourceGroupName $RESOURCE_GROUP
-vmName $VM_NAME
- name: set host
run: echo ::set-output name=action_host::$(az vm show -d -g $RESOURCE_GROUP -n $VM_NAME --query publicIps -o tsv)
id: host

- name: start actions runner app
uses: fifsky/ssh-action@master
with:
command: |
#!/bin/bash
nohup actions-runner/run.sh >/dev/null 2>&1 &
host: ${{ steps.host.outputs.action_host }}
user: ${{ secrets.CI_GPU_VM_ADMIN_LOGIN }}
pass: ${{ secrets.CI_GPU_VM_ADMIN_PASSWORD }}
args: "-tt"

# Run the asv benchmarks on the self-hosted runner
benchmarks:
name: benchmarks
needs: start-runner
runs-on: [self-hosted, asv]

env:
DEVITO_ARCH: "gcc-9"
DEVITO_LANGUAGE: "openmp"
DEVITO_BENCHMARKS: "1"
DEVITO_LOGGING: "PERF"
OMP_NUM_THREADS: "8"
CC: "gcc-9"
CXX: "g++-9"

steps:
- name: Checkout devito
uses: actions/checkout@v2.3.2

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .
pip install --upgrade asv
- name: Setup asv
run: |
asv machine --config benchmarks/regression/asv.conf.json --machine F8s_v2 --os ubuntu-18.04 --arch x86-64 --cpu IntelXeon8168 --num_cpu 8 --ram 16GB
- name: Run benchmarks
run: |
asv run -v --strict --show-stderr --config benchmarks/regression/asv.conf.json --cpu-affinity 0-7 --machine F8s_v2
- name: Checkout asv-results branch
uses: actions/checkout@v2.3.2
with:
ref: asv-results
clean: false

- name: Commit benchmarks results
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f benchmarks/regression/.asv/results/
git status
git commit -m "Commit ASV results"
- name: Push benchmarks results to the asv-results branch
uses: ad-m/github-push-action@master
with:
branch: asv-results
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create results (html)
run: |
asv publish --config benchmarks/regression/asv.conf.json
- name: Deploy results to devitocodes/devito-performance/gh-pages
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
EXTERNAL_REPOSITORY: devitocodes/devito-performance
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./benchmarks/regression/.asv/html

# Stop the runner
stop-runner:
name: stop-runner
if: ${{ always() }}
needs: benchmarks
runs-on: ubuntu-latest

steps:
- name: checkout repo
uses: actions/checkout@v2.3.2

- name: stop VM
env:
SP_APPID: ${{ secrets.SERVICE_PRINCIPAL_APPID }}
SP_SECRET: ${{ secrets.SERVICE_PRINCIPAL_SECRET }}
TENANT_ID: ${{ secrets.SERVICE_PRINCIPAL_TENANTID }}
SUB_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
run: >
pwsh -command "& '${{ env.OUTPUT_PATH }}\.github\azure\stopVM.ps1'"
-servicePrincipal $SP_APPID
-servicePrincipalSecret $SP_SECRET
-servicePrincipalTenantId $TENANT_ID
-azureSubscriptionName $SUB_ID
-resourceGroupName $RESOURCE_GROUP
-vmName $VM_NAME
16 changes: 16 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Cancel

on: [push]

jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.4.0
with:
# Ids to cancel core/mpi/gpu/examples/tutorials
# https://api.github.com/repos/devitocodes/devito/actions/workflows
workflow_id: 167582, 203470, 203471, 434862, 501517
access_token: ${{ github.token }}
Loading

0 comments on commit 588f257

Please sign in to comment.