Skip to content

Commit

Permalink
Release v4.0.0 with GPU Acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
henryleberre committed Sep 18, 2022
1 parent 013146d commit fc40cce
Show file tree
Hide file tree
Showing 78 changed files with 103 additions and 683 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Continuous Integration

on:
push:
branches: [ GPU ]
paths:
- '**.f90'
- '**.fpp'
Expand All @@ -17,7 +16,6 @@ on:
- Dockerfile

pull_request:
branches: [ GPU ]

workflow_dispatch:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Documentation
on:
push:
branches:
- GPU
- master

workflow_dispatch:

Expand Down Expand Up @@ -33,13 +33,13 @@ jobs:
git config --global user.name "MFC Action"
git config --global user.email "MFC Action"
git clone "${{ secrets.DOC_PUSH_URL }}"
cd MFC-DOC
cd "$(find . -name '*.github.io')"
mv .github ..
rm -rf $(pwd)/*
mv ../.github .
mv ../install/doc/mfc/* .
git add -A
git commit -m "${{ github.sha }}: $(date +%d/%m/%Y-%H:%M:%S)" || true
git commit -m "${GITHUB_SHA::7}: $(date +%d/%m/%Y-%H:%M:%S)" || true
git push
# DOC_PUSH_URL should be of the format:
Expand Down
32 changes: 16 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ tests/*.txt
tests/*/**
!**/golden.txt

samples/*batch/*/
samples/*/D/*
samples/*/p*
samples/*/D_*
samples/*/*.inf
samples/*/*.inp
samples/*/*.dat
samples/*/*.o*
samples/*/silo*
samples/*/restart*
samples/*/*.out
samples/*/binary
samples/*/fort.1
samples/*/pre_process.sh
samples/*/simulation.sh
samples/*/post_process.sh
examples/*batch/*/
examples/*/D/*
examples/*/p*
examples/*/D_*
examples/*/*.inf
examples/*/*.inp
examples/*/*.dat
examples/*/*.o*
examples/*/silo*
examples/*/restart*
examples/*/*.out
examples/*/binary
examples/*/fort.1
examples/*/pre_process.sh
examples/*/simulation.sh
examples/*/post_process.sh

doc/*/MFC_user_guide.bbl
doc/*/MFC_user_guide.blg
Expand Down
91 changes: 63 additions & 28 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@
# - User Read:
# - $MEMBERWORK -> e.g /gpfs/wolf/scratch/henrylb


stages:
- clone # Clone MFC after removing artifacts from previous run(s).
- cpu # Build MFC & Test it on/with CPUs
- gpu # Build MFC & Test it on/with GPUs
- main


# Variables for all jobs
variables:
# Tell runner to not clone MFC
GIT_STRATEGY: none
GIT_STRATEGY: none
# Ascent Job Scheduler parameters
SCHEDULER_PARAMETERS: "-P CFD154 -nnodes 1 -W 00:30"


# This script runs before each job's main script is executed.
# It defines useful environment variables used at runtime.
before_script:
Expand All @@ -37,45 +38,79 @@ before_script:
# (Tidy) Delete clones/builds on the same branch older than 10 days
- echo "Removing:"
- export CI_MFC_BRANCH_DIR="$MEMBERWORK/cfd154/.ci/$CI_PROJECT_NAME/$CI_COMMIT_BRANCH"
- mkdir -p "$CI_MFC_BRANCH_DIR"
- find "$CI_MFC_BRANCH_DIR" -mindepth 1 -maxdepth 1 -type d -mtime +10 | sed s/^/\ -\ Removing\ /g
- find "$CI_MFC_BRANCH_DIR" -mindepth 1 -maxdepth 1 -type d -mtime +10 | xargs rm -rf

# Define MFC directory path
- CI_MFC_DIR="$MEMBERWORK/cfd154/.ci/$CI_PROJECT_NAME/$CI_COMMIT_BRANCH/$CI_COMMIT_SHORT_SHA"

# Clone MFC after removing artifacts from previous run(s).
clone-job:
stage: clone

.clone:
stage: main
script:
# Clean MFC directory if it exists (from a previous run)
- if [ -d "$CI_MFC_DIR" ]; then rm -rf "$CI_MFC_DIR"; fi
# Create empty MFC directory
- mkdir -p "$CI_MFC_DIR"

- if [ -d "$CI_MFC_DIR/$JOB_MODE" ]; then rm -rf "$CI_MFC_DIR/$JOB_MODE"; fi

# Clone MFC into MFC directory & cd into it
- git clone --single-branch --branch "$CI_COMMIT_BRANCH" "$CI_REPOSITORY_URL" "$CI_MFC_DIR/"
- cd "$CI_MFC_DIR" && echo "[CI] Running in $(pwd):"
- mkdir -p "$CI_MFC_DIR/$JOB_MODE/"
- git clone --single-branch --branch "$CI_COMMIT_BRANCH" "$CI_REPOSITORY_URL" "$CI_MFC_DIR/$JOB_MODE/"
tags:
- nobatch

cpu-test-job:
stage: cpu
needs:
- cpu-build-job
.build:
stage: main
script:
- cd "$CI_MFC_DIR" && echo "[CI] Running in $(pwd):"
- . ./mfc.sh load -c a -m g
- ./mfc.sh test -j 8 -m release-cpu
- cd "$CI_MFC_DIR/$JOB_MODE" && echo "[CI] Building in $(pwd):"
- . ./mfc.sh load -c a -m $(if [ "$(echo "$JOB_MODE" | grep -i 'cpu' | wc -c)" -gt 0 ]; then echo "c"; else echo "g"; fi)
- ./mfc.sh build -j 8 -m "$JOB_MODE"
tags:
- batch
- nobatch

gpu-test-job:
stage: gpu
needs:
- gpu-build-job
.test:
stage: main
script:
- cd "$CI_MFC_DIR" && echo "[CI] Running in $(pwd):"
- . ./mfc.sh load -c a -m g
- ./mfc.sh test -j 8 -m release-gpu
- cd "$CI_MFC_DIR/$JOB_MODE" && echo "[CI] Running in $(pwd):"
- . ./mfc.sh load -c a -m $(if [ "$(echo "$JOB_MODE" | grep -i 'cpu' | wc -c)" -gt 0 ]; then echo "c"; else echo "g"; fi)
- ./mfc.sh test -j 8 -m "$JOB_MODE"
tags:
- batch


clone-cpu:
variables:
JOB_MODE: "release-cpu"
extends: .clone

build-cpu:
variables:
JOB_MODE: "release-cpu"
extends: .build
needs:
- clone-cpu

test-cpu:
variables:
JOB_MODE: "release-cpu"
extends: .test
needs:
- build-cpu

clone-gpu:
variables:
JOB_MODE: "release-gpu"
extends: .clone

build-gpu:
variables:
JOB_MODE: "release-gpu"
extends: .build
needs:
- clone-gpu

test-gpu:
variables:
JOB_MODE: "release-gpu"
extends: .test
needs:
- build-gpu
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<a href="http://dx.doi.org/10.1016/j.cpc.2020.107396">
<img src="https://zenodo.org/badge/doi/10.1016/j.cpc.2020.107396.svg" />
</a>
<a href="https://github.com/MFlowCode/MFC-develop/actions">
<img src="https://github.com/MFlowCode/MFC-develop/actions/workflows/ci.yml/badge.svg" />
<a href="https://github.com/MFlowCode/MFC/actions">
<img src="https://github.com/MFlowCode/MFC/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://github.com/MFlowCode/MFC-develop/actions">
<img src="https://github.com/MFlowCode/MFC-develop/actions/workflows/doc.yml/badge.svg" />
<a href="https://github.com/MFlowCode/MFC/actions">
<img src="https://github.com/MFlowCode/MFC/actions/workflows/doc.yml/badge.svg" />
</a>
<a href="https://lbesson.mit-license.org/">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" />
</a>
<a href="https://github.com/MFlowCode/MFC-develop/commit/">
<img src="https://badgen.net/github/last-commit/MFlowCode/MFC-develop" />
<a href="https://github.com/MFlowCode/MFC/commit/">
<img src="https://badgen.net/github/last-commit/MFlowCode/MFC" />
</a>
<a href="https://hub.docker.com/repository/docker/henryleberre/mfc">
<img src="https://shields.io/docker/image-size/henryleberre/mfc" />
Expand Down
105 changes: 0 additions & 105 deletions dependencies/install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "@DOXYGEN_PROJECT_NAME@"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.0
PROJECT_NUMBER = 4.0.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Loading

0 comments on commit fc40cce

Please sign in to comment.