Skip to content

Commit

Permalink
png images
Browse files Browse the repository at this point in the history
  • Loading branch information
hamsteri15 committed Dec 14, 2023
1 parent 40dedb1 commit 7046c22
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 104 deletions.
22 changes: 12 additions & 10 deletions tutorials/scalingTest/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@ runCase()
MODEL=$2
runApplication blockMesh

if [ "$DECOMP_NUMBER" = "1" ]; then
if [ "$NPROC" = "1" ]; then
runApplication $(getApplication)
else
runApplication decomposePar
runParallel $(getApplication)

if ["$MODEL" = "gpu"]; then
mpirun -np $NPROC ./multigpu_run.sh > log.foamRun&
wait
else
runParallel $(getApplication)
fi
#For slurm jobs, uncomment these
#if ["$MODEL" = "gpu"]; then
#srun --exclusive --ntasks=$NPROC --gpu-bind=single:1 foamRun -solver multicomponentFluid -parallel > log.foamRun
#else
#srun --ntasks=$NPROC foamRun -solver multicomponentFluid -parallel > log.foamRun
#fi

fi

}
Expand All @@ -93,10 +95,10 @@ runCase()
MODELS=("gpu" "cpu")
#MODELS=("gpu")
ODES=("Rosenbrock23")
NPROCS=(10 20 40 80)
NSTEPS=2000
NPROCS=(1 4 8 16)
NSTEPS=400
MECHS=("h2" "gri")
NCELLS=(100)
NCELLS=(30)


for NCELL in ${NCELLS[@]};
Expand Down
31 changes: 0 additions & 31 deletions tutorials/scalingTest/bases/gri-base/multigpu_run.sh

This file was deleted.

31 changes: 0 additions & 31 deletions tutorials/scalingTest/bases/h2-base/multigpu_run.sh

This file was deleted.

31 changes: 0 additions & 31 deletions tutorials/scalingTest/bases/yao-base/multigpu_run.sh

This file was deleted.

Binary file added tutorials/scalingTest/gri_results_a100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tutorials/scalingTest/gri_results_rtx3080ti.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tutorials/scalingTest/h2_results_a100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tutorials/scalingTest/h2_results_rtx3080ti.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion tutorials/scalingTest/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def plotMechanism(ax, df, mech_name):

def read():

f = open("results.dat", "r")
#f = open("results_a100.dat", "r")
f = open("results_rtx3080ti.dat", "r")

proc = []
tcpu = []
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions tutorials/scalingTest/results_rtx3080ti.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ncores t-cpu t-gpu mechanism ode ncells
1 2311.0627 490.294736 gri Rosenbrock23 30
16 176.198639 242.005437 gri Rosenbrock23 30
4 598.733945 284.076566 gri Rosenbrock23 30
8 316.282783 255.162786 gri Rosenbrock23 30
1 250.060717 117.301023 h2 Rosenbrock23 30
16 28.098566 24.871078 h2 Rosenbrock23 30
4 70.88382 39.178084 h2 Rosenbrock23 30
8 40.674046 27.021495 h2 Rosenbrock23 30
26 changes: 26 additions & 0 deletions tutorials/scalingTest/slurm_job.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
#SBATCH -J bench
#SBATCH --output=runLog.out
#SBATCH --error=runLog.err
#SBATCH --time=24:00:00
#SBATCH --partition=gpumedium
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=128
#SBATCH --account=project_2001715
#SBATCH --gres=gpu:a100:4


# to allocate gpus #SBATCH --gres=gpu:a100:4

source ~/OpenFOAM/OpenFOAM-dev/etc/bashrc

module load cuda

# Source run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

nvidia-cuda-mps-control -f > mps.log&


./Allrun_gpu

0 comments on commit 7046c22

Please sign in to comment.