forked from devitocodes/devito
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from devitocodes/timetiling_on_master
Timetiling on master
- Loading branch information
Showing
384 changed files
with
59,252 additions
and
13,082 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | ||
|
||
- 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/[email protected] | ||
|
||
- 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/[email protected] | ||
with: | ||
ref: asv-results | ||
clean: false | ||
|
||
- name: Commit benchmarks results | ||
run: | | ||
git config --local user.email "[email protected]" | ||
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/[email protected] | ||
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/[email protected] | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | ||
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 }} |
Oops, something went wrong.