Skip to content

Commit

Permalink
Merge pull request #101 from PrincetonUniversity/devel
Browse files Browse the repository at this point in the history
SPECFEM++ (v0.1.0)

- Jenkins tests did not perform since the cluster is down for maintenance today. But the tests passed on the devel branch
  • Loading branch information
Rohit-Kakodkar authored Jan 9, 2024
2 parents 65d6a66 + ea9b566 commit 22b82c3
Show file tree
Hide file tree
Showing 668 changed files with 54,028 additions and 7,895 deletions.
6 changes: 6 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"image": "ghcr.io/princetonuniversity/specfempp:devel",
"workspaceFolder": "/usr/local/specfempp",
"features": {
}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
examples/homogeneous-medium-flat-topography/databases/database.bin filter=lfs diff=lfs merge=lfs -text
tests/regression-tests/elastic_domain/cpu/databases/database.bin filter=lfs diff=lfs merge=lfs -text
tests/regression-tests/elastic_domain/gpu/databases/database.bin filter=lfs diff=lfs merge=lfs -text
35 changes: 1 addition & 34 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: [push, pull_request]
on: [push]

jobs:
build-serial:
Expand All @@ -17,36 +17,3 @@ jobs:
run: cmake -S . -B build
- name: Build
run: cmake --build build
build-openmp:
runs-on: ubuntu-latest
steps:
- name: Check GNU and Cmake versions
run: gcc --version && cmake --version
- name: Checkout repository
uses: actions/checkout@v1
- name: Get submodules
run: git submodule init
&& git submodule update
- name: Configure OpenMP build
run: cmake -S . -B build -DKokkos_ENABLE_OPENMP=ON
- name: Build
run: cmake --build build
build-ampere80:
runs-on: ubuntu-latest
steps:
- name: Check GNU and Cmake versions
run: gcc --version && cmake --version
- name: Install Cuda Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '11.7.0'
- name: Checkout repository
uses: actions/checkout@v1
- name: Get submodules
run: git submodule init
&& git submodule update
- name: Configure OPENMP & CUDA build
run: cmake -S . -B build -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_AMPERE80=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON
- name: Build
run: cmake --build build
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish to Docker
on:
push:
branches:
- devel
- main
tags:
- v*
permissions:
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Add your test steps here if needed...
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/PrincetonUniversity/SPECFEMPP
tags: |
type=ref,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'devel') }}
type=ref,event=tag
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
6 changes: 3 additions & 3 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Unittests

on: [push, pull_request]
on: [push]

jobs:
build-and-test:
Expand All @@ -14,9 +14,9 @@ jobs:
run: git submodule init
&& git submodule update
- name: Configure
run: cmake -S . -B build
run: cmake -S . -B build -DBUILD_TESTS=ON
- name: Build
run: cmake --build build
- name: Run all tests
run: cd build/tests/unittests
run: cd build/tests/unit-tests
&& ctest
17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
.vscode/
.DS_Store
build/
build*/*
_build/
_templates/
public/
firebase*.yml
*.out
debug.sh
output.log
run.sh
results/
timing.sh
examples/*/*_config.yaml
tests/regression-tests/*.yaml
tests/regression-tests/*/cpu/*.yaml
tests/regression-tests/*/gpu/*.yaml
*.mod
*.o
*/OUTPUT_FILES/*
*.gnu
examples/*/Par_File
*OUTPUT_FILES*
*.sqlite
*.nsys-rep
*.ncu-rep
133 changes: 133 additions & 0 deletions .jenkins/compiler_checks.gvy
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
pipeline{
agent {
node {
label 'della_rk9481'
}
}
stages{
stage( ' Load git modules ' ){
steps {
echo ' Getting git submodules '
sh 'git submodule init'
sh 'git submodule update'
}
}
stage(' GNU Compilation Check '){
matrix {
axes {
axis{
name 'HostSpace'
values 'SERIAL;-DKokkos_ENABLE_SERIAL=ON', 'OPENMP;-DKokkos_ENABLE_OPENMP=ON'
}
axis{
name 'DeviceSpace'
values 'NONE;-DKokkos_ENABLE_CUDA=OFF', 'CUDA_AMPERE80;-DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_AMPERE80=ON', 'CUDA_VOLTA70;-DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_VOLTA70=ON', 'CUDA_PASCAL60;-DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_PASCAL60=ON'
}
}
stages {
stage ('Build and Clean '){
environment {
CUDA_MODULE='cudatoolkit/12.2'
// CMAKE build flags
CMAKE_HOST_NAME = """${sh(
returnStdout: true,
script: 'cut -d";" -f1 <<<"${HostSpace}"'
).trim()}"""
CMAKE_HOST_FLAGS = """${sh(
returnStdout: true,
script: 'cut -d";" -f2 <<<"${HostSpace}"'
).trim()}"""
CMAKE_DEVICE_NAME = """${sh(
returnStdout: true,
script: 'cut -d";" -f1 <<<"${DeviceSpace}"'
).trim()}"""
CMAKE_DEVICE_FLAGS = """${sh(
returnStdout: true,
script: 'cut -d";" -f2 <<<"${DeviceSpace}"'
).trim()}"""
}
stages {
stage (' Build '){
steps {
echo "Building ${CMAKE_HOST_FLAGS} ${CMAKE_DEVICE_FLAGS}"
sh """
module load boost/1.73.0
module load ${CUDA_MODULE}
cmake3 -S . -B build_GNU_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${env.GIT_COMMIT} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${CMAKE_DEVICE_FLAGS}
cmake3 --build build_GNU_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${env.GIT_COMMIT}
"""
echo ' Build completed '
}
}
}
post {
always {
echo ' Cleaning '
sh "rm -rf build_GNU_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${env.GIT_COMMIT}"
}
}
}
}
}
}
stage(' Intel Compilation Check '){
matrix {
axes {
axis{
name 'HostSpace'
values 'SERIAL;-DKokkos_ENABLE_SERIAL=ON', 'OPENMP;-DKokkos_ENABLE_OPENMP=ON'
}
axis{
name 'DeviceSpace'
values 'NONE;-DKokkos_ENABLE_CUDA=OFF'
}
}
stages {
stage ('Build and Clean '){
environment {
// CMAKE build flags
CMAKE_HOST_NAME = """${sh(
returnStdout: true,
script: 'cut -d";" -f1 <<<"${HostSpace}"'
).trim()}"""
CMAKE_HOST_FLAGS = """${sh(
returnStdout: true,
script: 'cut -d";" -f2 <<<"${HostSpace}"'
).trim()}"""
CMAKE_DEVICE_NAME = """${sh(
returnStdout: true,
script: 'cut -d";" -f1 <<<"${DeviceSpace}"'
).trim()}"""
CMAKE_DEVICE_FLAGS = """${sh(
returnStdout: true,
script: 'cut -d";" -f2 <<<"${DeviceSpace}"'
).trim()}"""
}
stages {
stage (' Build '){
steps {
echo "Building ${CMAKE_HOST_FLAGS} ${CMAKE_DEVICE_FLAGS}"
sh """
module load boost/1.73.0
module load intel/2022.2.0
export CC=icx
export CXX=icpx
cmake3 -S . -B build_INTEL_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${env.GIT_COMMIT} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${CMAKE_DEVICE_FLAGS}
cmake3 --build build_INTEL_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${env.GIT_COMMIT}
"""
echo ' Build completed '
}
}
}
post {
always {
echo ' Cleaning '
sh "rm -rf build_INTEL_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${env.GIT_COMMIT}"
}
}
}
}
}
}
}
}
Loading

0 comments on commit 22b82c3

Please sign in to comment.