Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flash test #18

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4bcee00
Add flash options to prediction
MTCam Mar 6, 2023
c3ae063
Pass smoke tests.
MTCam Mar 7, 2023
c906e37
Pass flash test
MTCam Mar 7, 2023
29dae49
Cosmetic tweaks, add Schmidt no.
MTCam Mar 7, 2023
17d838c
Add batch script for running flash test.
MTCam Mar 7, 2023
7fd77ab
Fix limiter bug, init interface fix.
MTCam Mar 8, 2023
1bd898e
Add scalability testing infrastructure files.
MTCam Mar 8, 2023
375bb9d
merge with upstream
MTCam Mar 10, 2023
8864cb9
Merge with upstream
MTCam Mar 10, 2023
1707ec2
Merge branch 'main' into mrgmn
MTCam Mar 11, 2023
ba7a04a
Merge branch 'add-flash-test' into add-scalability-test
MTCam Mar 11, 2023
212907d
Merge branch 'add-ks3d-case' into add-scalability-test
MTCam Mar 11, 2023
c364406
move scalability test to dedicated test directory
MTCam Mar 12, 2023
4a71bbb
Add scalability scripting and data
MTCam Mar 12, 2023
8873f58
Merge branch 'add-scalability-testing' into mrgup
MTCam Mar 12, 2023
033cc7b
Update params, switch a use_av/use_limiter to bool.
MTCam Mar 13, 2023
be9da54
Disable gc when ngarbage is set, else warn user of automatic gc.
MTCam Mar 13, 2023
3d676f2
Merge branch 'disable-automatic-garbage-collection' into add-scalabil…
MTCam Mar 13, 2023
92803f2
Update scripts trying to get timestamped logs
MTCam Mar 14, 2023
6fac461
Merge branch 'add-scalability-testing' into add-scalability-test
MTCam Mar 14, 2023
92538d2
Merge with outstanding scalability devel.
MTCam Mar 14, 2023
cb5e01a
Merge remote-tracking branch 'origin/add-flash-test' into add-flash-test
MTCam Mar 14, 2023
5c871a1
Update params for flame test
MTCam Mar 14, 2023
62b73c1
Print init messages according to init_name.
MTCam Mar 14, 2023
76e436f
Provide some needed options for automation
MTCam Mar 14, 2023
95ff802
Add batch script example for lassen.
MTCam Mar 14, 2023
9048389
fstring err
MTCam Mar 14, 2023
85cca38
Try high visc for flame
MTCam Mar 15, 2023
1d69077
Fix couple of init issues.
MTCam Mar 15, 2023
205fea6
Update scaling scripts
MTCam Mar 15, 2023
06c408c
Add and update scaling scripts.
MTCam Mar 20, 2023
1af1940
Use scalability version of scaling driver scripts.
MTCam Mar 20, 2023
0edfb32
Correct typo.
MTCam Mar 20, 2023
fb778f4
Use up-to-date version of smoke test script.
MTCam Mar 20, 2023
cc666e4
Update scalability scripting.
MTCam Mar 20, 2023
56b0af9
take out f string
MTCam Mar 20, 2023
d48ecd7
Update grid sizes.
MTCam Apr 5, 2023
1341be4
Add 12M/512rank case
MTCam Apr 5, 2023
11e8535
Use these settings for fine flame1d.
MTCam Apr 5, 2023
00ec591
bringing up to date
anderson2981 Apr 12, 2023
085bf3d
fix grad_cv_target
anderson2981 Apr 12, 2023
6df1d4d
brought in new stuff
anderson2981 Apr 13, 2023
a524f80
fix bug in flash util
anderson2981 Apr 14, 2023
6a2ffc2
index for comm tags
anderson2981 Apr 14, 2023
00ca2ee
updates
anderson2981 Apr 21, 2023
53e2200
Merge branch 'main' into add-flash-test
anderson2981 Apr 21, 2023
21da7cc
small change to wall_cp
anderson2981 Apr 21, 2023
2065421
fix none-type in create_fluid_state
anderson2981 Apr 24, 2023
7d48df6
merge with main
anderson2981 Apr 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions data/cav5_comb4/3D/scalability/mkmsh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SAMPFAC="4"
OUTPUT="actii"
MKLINK="false"
OVRWT="false"
NELEM="0"

while [[ $# -gt 0 ]]; do
arg=$1
Expand Down Expand Up @@ -65,6 +66,9 @@ while [[ $# -gt 0 ]]; do
--output=*)
OUTPUT=${arg#*=}
;;
--nelem=*)
NELEM=${arg#*=}
;;
--link)
MKLINK="true"
;;
Expand Down Expand Up @@ -94,7 +98,9 @@ printf "Cavity factor: ${CAVFAC}\n"
printf "Injector factor: ${INJFAC}\n"
printf "Shear layer factor: ${SHEARFAC}\n"
printf "Sample factor: ${SAMPFAC}\n"

if [[ "${OVRWT}" == "true" ]]; then
rm -f ${OUTPUT}_${NELEM}.msh
rm -f ${OUTPUT}.msh
MKLINK="true"
fi
Expand All @@ -106,6 +112,13 @@ if [[ "${MKLINK}" == "true" ]]; then
fi
printf "Make link ${OUTPUT}.msh for finished mesh.\n"
fi
if [[ ! -f ${OUTPUT}_${NELEM}.msh ]]; then
date
set -x
rm -f tmp.msh
gmsh -setnumber size ${SIZE} -setnumber blratio ${BLRAT} -setnumber cavityfac ${CAVFAC} -setnumber isofac ${ISOFAC} -setnumber samplefac ${SAMPFAC} -setnumber injectorfac ${INJFAC} -setnumber blratiocavity ${BLCAVRAT} -setnumber blratioinjector ${BLINJRAT} -setnumber blratiosample ${BLSAMPRAT} -setnumber blratiosurround ${BLSURRRAT} -setnumber shearfac ${SHEARFAC} -o tmp.msh -nopopup -format msh2 ./actii_from_brep.geo -3 -nt ${NCPUS}
set +x
date

date
set -x
Expand All @@ -120,13 +133,11 @@ if [ -f "tmp.msh" ]; then
printf "Mesh creation failed.\n"
exit 1
fi
mv tmp.msh ${OUTPUT}_${NCELLS}.msh
printf "Created ${OUTPUT}_${NCELLS}.msh with ${NCELLS} tets.\n"
else
printf "Expected mesh file already exists, skipping mesh creation.\n"
if [[ "${MKLINK}" == "true" ]]; then
ln -s ${OUTPUT}_${NCELLS}.msh ${OUTPUT}.msh
ln -s ${OUTPUT}_${NELEM}.msh ${OUTPUT}.msh
fi
else
printf "Mesh creation failed."
exit 1
fi


2 changes: 1 addition & 1 deletion data/cav5_comb4/3D/scalability/sizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
| 7.45 | 1,536k | 1,536,571 |
| 5.8545 | 3,072k | 3,071,835 |
| 4.61 | 6,144k | 6,142,150 |
| 3.6389 | 12,288k | 12,283,032 |
| 3.6389 | 12,288k | 12,283,032 |
1 change: 1 addition & 0 deletions flash_test/driver.py
20 changes: 20 additions & 0 deletions flash_test/flash_test.bsub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/bash
#BSUB -nnodes 1
#BSUB -G uiuc
#BSUB -W 360
#BSUB -J flash9
#BSUB -q pbatch
#BSUB -o flash9.out

source ../emirge/config/activate_env.sh
source ../emirge/mirgecom/scripts/mirge-testing-env.sh

set -x
$MIRGE_MPI_EXEC -n 1 $MIRGE_PARALLEL_SPAWNER python -u -O -m mpi4py driver.py -c ${casename} -i run_params.yaml -r restart_data/prediction-000965000 --log --lazy
set +x

# flash5 000483000
# flash6 000604000
# flash7 000726000
# flash8 000847000
# flash9 000965000
56 changes: 56 additions & 0 deletions flash_test/run_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# params to vary
init_name: Flash1D
order: 2
mu: 1.e-3
mesh_size: 0.0002
current_dt: 1.e-9
nviz: 1000
# everything else
init_shock: False
init_flame: True
viz_level: 3
nrestart: 1000
mesh_angle: 0
periodic: False
bl_ratio: 4.0
interface_ratio: 1.0
transfinite: True
nhealth: 100
nstatus: 100
t_final: 1.e-2
mach: 4.0
pressure_background: 101325
temperature_background: 300
use_species_limiter: 1
vel_sigma: 0
temp_sigma: 0
nspecies: 7
use_av: False
use_species_limiter: True
noslip: True
adiabatic: False
#mu: 1.e-5
#kappa: 2.0
alpha_sc: 0.05
s0_sc: -5.0
kappa_sc: 0.5
integrator: compiled_lsrk54
#integrator: euler
#inviscid_numerical_flux: hll
health_pres_min: 0.001
health_pres_max: 1000000
#
# wall settings
#
wall_penalty_amount: 0
wall_time_scale: 1
use_wall_ox: False
use_wall_mass: False
use_sponge: False
#
# filter settings
#
soln_nfilter: -1
use_rhs_filter: False
soln_filter_cutoff: 4
rhs_filter_cutoff: 3
1 change: 1 addition & 0 deletions scalability_test/data
1 change: 1 addition & 0 deletions scalability_test/driver.py
79 changes: 79 additions & 0 deletions scalability_test/generate_lassen_scaling_job_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/bash

NONOPT_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
-n|--nodes)
NUM_NODES="$2"
shift
shift
;;
-e|--end)
NUM_PROCS="$2"
shift
shift
;;
-s|--start)
NUM_PROCS_1="$2"
shift
shift
;;
-o|--output)
OUTPUT_PATH="$2"
shift
shift
;;
-q|--queue)
QUEUE_NAME="$2"
shift
shift
;;
-t|--time)
TIME_LIMIT="$2"
shift
shift
;;
-h|--help)
printf "Generates batch script for scaling tests on Lassen.\n\nUsage:\n"
printf "./generate_lassen_scaling_job_script.sh -n <nnodes> -s <nproc_start> -e <nproc_end> -o <batch script name> -q <queue name> -t <walltime limit>\n\n"
printf "Default: scaling_test_lassen.bsub.sh = single node scaling job to run on 1-4 GPUs on batch queue with 120m time limit.\n\n"
printf "Submit the resulting script with the \`bsub\` command.\n"
exit 1
;;
-*|--*)
echo "generate_lassen_scaling_job_script: Unknown option $1"
exit 1
;;
*)
NONOPT_ARGS+=("$1")
shift
;;
esac
done
set -- "${NONOPT_ARGS[@]}"


NUM_NODES=${NUM_NODES:-"1"}
NUM_PROCS_MAX=$(( 4 * ${NUM_NODES} ))
NUM_PROCS=${NUM_PROCS:-"${NUM_PROCS_MAX}"}
NUM_PROCS_1=${NUM_PROCS_1:-"1"}
OUTPUT_PATH=${OUTPUT_PATH:-"scaling_test_lassen.bsub.sh"}
QUEUE_NAME=${QUEUE_NAME:-"pbatch"}
TIME_LIMIT=${TIME_LIMIT:-"120"}

rm -f ${OUTPUT_PATH}
cat <<EOF > ${OUTPUT_PATH}
#!/bin/bash

#BSUB -nnodes ${NUM_NODES}
#BSUB -G uiuc
#BSUB -W ${TIME_LIMIT}
#BSUB -J scale${NUM_PROCS}
#BSUB -q ${QUEUE_NAME}
#BSUB -o scal${NUM_PROCS}.txt

source ../emirge/config/activate_env.sh
source ../emirge/mirgecom/scripts/mirge-testing-env.sh
source ../scripts/multi_scalability.sh -p ../ -s ${NUM_PROCS_1} -n ${NUM_PROCS}

EOF
11 changes: 11 additions & 0 deletions scalability_test/runLassenBatch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
#BSUB -nnodes 4
#BSUB -G uiuc
#BSUB -W 180
#BSUB -J scale16
#BSUB -q pbatch
#BSUB -o scal16.txt

source ../emirge/config/activate_env.sh
source ../emirge/mirgecom/scripts/mirge-testing-env.sh
source ../scripts/multi_scalability.sh -p ../ -s 1 -n 16
69 changes: 69 additions & 0 deletions scalability_test/run_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
##############
# run control
##############
nviz: 1000
nrestart: 1000
nhealth: -1
nstatus: -1
ngarbage: 10
viz_level: 1
viz_interval_type: 0
#viz_interval_type: 1
#viz_interval_type: 2
t_viz_interval: 1.e-9
constant_cfl: 0
#constant_cfl: 1
current_cfl: 0.05
current_dt: 1.0e-13
t_final: 2.e-11
mesh_filename: data/actii.msh
dimen: 3

##############
# wall model
##############
wall_time_scale: 100
wall_penalty_amount: 0
wall_material: 2

##############
# model control
##############
use_species_limiter: True
use_av: True
alpha_sc: 0.01
s0_sc: -5.0
kappa_sc: 0.5
order: 4
# use_rhs_filter: True
# rhs_filter_cutoff: 3

##############
# equation of state
##############
nspecies: 7
pyro_temp_iter: 1
pyro_temp_tol: 1.
transport: 1

##############
# ignition parameters
##############
use_ignition: 2
ignition_loc_x: 0.68
ignition_loc_y: -0.01
ignition_init_time: 5.e-8
ignition_strength: 600
ignition_duration: 1.e-8
ignition_diameter: 0.02
integrator: compiled_lsrk54
#health_pres_min: 2828
#health_pres_max: 274259

##############
# initialization
##############
vel_sigma: 500
temp_sigma: 1250
vel_sigma_inj: 5000
temp_sigma_inj: 5000
Loading