Skip to content

Commit 604cd7d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into IGRMergeOne
2 parents 5c3b870 + f1fea7a commit 604cd7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1539
-1795
lines changed

.github/workflows/bench.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 'Benchmark'
22

3-
on:
3+
on:
4+
pull_request:
45
pull_request_review:
56
types: [submitted]
67
workflow_dispatch:
@@ -23,7 +24,10 @@ jobs:
2324

2425
self:
2526
name: Georgia Tech | Phoenix (NVHPC)
26-
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && ${{ github.event.review.state == 'approved' }}
27+
if: ${{ github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && (
28+
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
29+
(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'sbryngelson')
30+
) }}
2731
needs: file-changes
2832
strategy:
2933
matrix:

.github/workflows/frontier/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
build_opts=""
4-
if [ "$1" == "gpu" ]; then
4+
if [ "$1" = "gpu" ]; then
55
build_opts="--gpu"
66
fi
77

.github/workflows/frontier/submit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ else
1313
exit 1
1414
fi
1515

16-
if [ "$2" == "cpu" ]; then
16+
if [ "$2" = "cpu" ]; then
1717
sbatch_device_opts="\
1818
#SBATCH -n 32 # Number of cores required"
19-
elif [ "$2" == "gpu" ]; then
19+
elif [ "$2" = "gpu" ]; then
2020
sbatch_device_opts="\
2121
#SBATCH -n 8 # Number of cores required"
2222
else

.github/workflows/frontier/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
gpus=`rocm-smi --showid | awk '{print $1}' | grep -Eo '[0-9]+' | uniq | tr '\n' ' '`
44
ngpus=`echo "$gpus" | tr -d '[:space:]' | wc -c`
55

6-
if [ "$job_device" == "gpu" ]; then
6+
if [ "$job_device" = "gpu" ]; then
77
./mfc.sh test --max-attempts 3 -j $ngpus -- -c frontier
88
else
99
./mfc.sh test --max-attempts 3 -j 32 -- -c frontier

.github/workflows/phoenix/bench.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@
22

33
n_ranks=12
44

5-
if [ "$job_device" == "gpu" ]; then
5+
if [ "$job_device" = "gpu" ]; then
66
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
77
gpu_ids=$(seq -s ' ' 0 $(($n_ranks-1))) # 0,1,2,...,gpu_count-1
88
device_opts="--gpu -g $gpu_ids"
99
fi
1010

11-
mkdir -p /storage/scratch1/6/sbryngelson3/mytmp_build
12-
export TMPDIR=/storage/scratch1/6/sbryngelson3/mytmp_build
11+
tmpbuild=/storage/scratch1/6/sbryngelson3/mytmp_build
12+
currentdir=$tmpbuild/run-$(( RANDOM % 900 ))
13+
mkdir -p $tmpbuild
14+
mkdir -p $currentdir
1315

14-
if ["$job_device" == "gpu"]; then
16+
export TMPDIR=$currentdir
17+
18+
if [ "$job_device" = "gpu" ]; then
1519
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
1620
else
1721
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
1822
fi
1923

24+
sleep 10
25+
rm -rf "$currentdir" || true
26+
2027
unset TMPDIR

.github/workflows/phoenix/submit-bench.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ sbatch_gpu_opts="\
2525
#SBATCH -G2\
2626
"
2727

28-
if [ "$2" == "cpu" ]; then
28+
if [ "$2" = "cpu" ]; then
2929
sbatch_device_opts="$sbatch_cpu_opts"
30-
elif [ "$2" == "gpu" ]; then
30+
elif [ "$2" = "gpu" ]; then
3131
sbatch_device_opts="$sbatch_gpu_opts"
3232
else
3333
usage

.github/workflows/phoenix/submit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ sbatch_gpu_opts="\
2525
#SBATCH -G2\
2626
"
2727

28-
if [ "$2" == "cpu" ]; then
28+
if [ "$2" = "cpu" ]; then
2929
sbatch_device_opts="$sbatch_cpu_opts"
30-
elif [ "$2" == "gpu" ]; then
30+
elif [ "$2" = "gpu" ]; then
3131
sbatch_device_opts="$sbatch_gpu_opts"
3232
else
3333
usage

.github/workflows/phoenix/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash
22

33
build_opts=""
4-
if [ "$job_device" == "gpu" ]; then
4+
if [ "$job_device" = "gpu" ]; then
55
build_opts="--gpu"
66
fi
77

88
./mfc.sh test --dry-run -j 8 $build_opts
99

1010
n_test_threads=8
1111

12-
if [ "$job_device" == "gpu" ]; then
12+
if [ "$job_device" = "gpu" ]; then
1313
gpu_count=$(nvidia-smi -L | wc -l) # number of GPUs on node
1414
gpu_ids=$(seq -s ' ' 0 $(($gpu_count-1))) # 0,1,2,...,gpu_count-1
1515
device_opts="-g $gpu_ids"

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ gam = "gam"
1717
Gam = "Gam"
1818
strang = "strang"
1919
Strang = "Strang"
20+
TKE = "TKE"
2021

2122
[files]
2223
extend-exclude = ["docs/documentation/references*", "tests/", "toolchain/cce_simulation_workgroup_256.sh"]

docs/documentation/case.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,6 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
832832
| `mixlayer_vel_profile` | Logical | Set the mean streamwise velocity to hyperbolic tangent profile |
833833
| `mixlayer_vel_coef` | Real | Coefficient for the hyperbolic tangent profile of a mixing layer |
834834
| `mixlayer_perturb` | Logical | Perturb the initial velocity field by instability waves |
835-
| `mixlayer_domain` | Real | Domain size of a mixing layer for the linear stability analysis |
836835

837836
The table lists velocity field parameters.
838837
The parameters are optionally used to define initial velocity profiles and perturbations.
@@ -847,15 +846,13 @@ The parameters are optionally used to define initial velocity profiles and pertu
847846

848847
- `perturb_sph_fluid` specifies the fluid component whose partial density is to be perturbed.
849848

850-
- `mixlayer_vel_profile` activates setting the mean streamwise velocity to a hyperbolic tangent profile. This option works only for 2D and 3D cases.
849+
- `mixlayer_vel_profile` activates setting the mean streamwise velocity to a hyperbolic tangent profile. This option works only for `n > 0`.
851850

852851
- `mixlayer_vel_coef` is a parameter for the hyperbolic tangent profile of a mixing layer when `mixlayer_vel_profile = 'T'`. The mean streamwise velocity profile is given as:
853852

854-
$$ u = patch\_icpp(1)\%vel(1) * tanh(y\_cc * mixlayer\_vel\_profile) $$
853+
$$ u = \mbox{patch\_icpp(1)\%vel(1)} * \tanh( y_{cc} * \mbox{mixlayer\_vel\_coef}) $$
855854

856-
- `mixlayer_perturb` activates the perturbation of initial velocity by instability waves obtained from linear stability analysis for a mixing layer with hyperbolic tangent mean streamwise velocity profile. This option only works for `n > 0`, `bc_y%[beg,end] = -6`, `num_fluids = 1`, `model_eqns = 2` and `mixlayer_vel_profile = 'T'`.
857-
858-
- `mixlayer_domain` defines the domain size to compute spatial eigenvalues of the linear instability analysis when `mixlayer_perturb = 'T'`. For example, the spatial eigenvalue in `x` direction in 2D problem will be $2 \pi \alpha / (mixlayer\_domain*patch\_icpp(1)\%length\_y)$ for $\alpha = 1$, $2$ and $4$.
855+
- `mixlayer_perturb` activates the velocity perturbation for a temporal mixing layer with hyperbolic tangent mean streamwise velocity profile, using an inverter version of the spectrum-based synthetic turbulence generation method proposed by Guo et al. (2023, JFM). This option only works for `p > 0` and `mixlayer_vel_profile = 'T'`.
859856

860857
### 11. Phase Change Model
861858
| Parameter | Type | Description |

0 commit comments

Comments
 (0)