Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cx-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christoph Alt
cx-test
Commits
433fef0f
Commit
433fef0f
authored
9 months ago
by
Christoph Alt
Browse files
Options
Downloads
Patches
Plain Diff
refactored the run script a bit
parent
035d694f
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Add a new benchmark case
Pipeline
#709244
passed
9 months ago
Stage: generate_child_pipeline
Stage: execute_child_pipeline
Pipeline: cx-test
#709245
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jobscript/benchmarks/percolationgpu.sh
+45
-31
45 additions, 31 deletions
jobscript/benchmarks/percolationgpu.sh
with
45 additions
and
31 deletions
jobscript/benchmarks/percolationgpu.sh
+
45
−
31
View file @
433fef0f
...
...
@@ -12,34 +12,48 @@ FULL_ARGUMENT="${BUILD_DIR}/${DIR}/${ARGUMENT}"
dev_name
=
$(
nvidia-smi
--id
=
${
VISABLE_DEVICE
}
--query-gpu
=
gpu_name
--format
=
csv,noheader 2> /dev/null |
tr
-d
'[:blank:]'
||
echo
"GPU_
${
VISABLE_DEVICE
}
"
)
# first test case channelflow
basename_exe
=
$(
basename
${
EXECUTABLE
}
)
profile_file
=
"ncuprofile_channelflow_
${
dev_name
}
"
# with profling
cmdChannelFlow
=
"
${
PROFILING
}
-o
$profile_file
$MPIRUN
$FULL_EXECUTABLE
$FULL_ARGUMENT
-NumericalSetup.timeSteps=2 -NumericalSetup.useParticles=false"
export
DB_FILE
=
"gpu_profile_percolation_
${
dev_name
}
.sqlite3"
echo
"Runing
$cmdChannelFlow
"
$cmdChannelFlow
&&
ncu
-i
"
${
profile_file
}
.ncu-rep"
--csv
--page
=
raw
>
"
$(
basename
-s
".ncu-rep"
${
profile_file
}
)
"
.csv
||
echo
"
${
cmdChannelFlow
}
failed"
# without profling
cmdChannelFlow
=
"
$MPIRUN
$FULL_EXECUTABLE
$FULL_ARGUMENT
-NumericalSetup.useParticles=false"
echo
"Runing
$cmdChannelFlow
"
export
DB_FILE
=
"gpu_benchmark_percolation_
${
dev_name
}
.sqlite3"
$cmdChannelFlow
||
echo
"
$cmdChannelFlow
failed"
# second test case percolation
profile_file
=
"ncuprofile_percolation_
${
dev_name
}
"
# with profling
cmdPercolation
=
"
${
PROFILING
}
-o
$profile_file
$MPIRUN
$FULL_EXECUTABLE
$FULL_ARGUMENT
-NumericalSetup.timeSteps=2"
echo
"Runing
$cmdPercolation
"
export
DB_FILE
=
"gpu_profile_percolation_
${
dev_name
}
.sqlite3"
$cmdPercolation
&&
ncu
-i
"
${
profile_file
}
.ncu-rep"
--csv
--page
=
raw
>
"
$(
basename
-s
".ncu-rep"
${
profile_file
}
)
"
.csv
||
echo
"
${
cmdPercolation
}
failed"
# without profiling
cmdPercolation
=
"
$MPIRUN
$FULL_EXECUTABLE
$FULL_ARGUMENT
"
echo
"Runing
$cmdPercolation
"
export
DB_FILE
=
"gpu_benchmark_percolation_
${
dev_name
}
.sqlite3"
$cmdPercolation
||
echo
"
$cmdPercolation
failed"
PROFILE_EXT
=
".ncu-rep"
CSV_EXT
=
".csv"
# Function to run the command with profiling
run_with_profiling
()
{
local
profile_file
=
$1
local
db_file
=
$2
local
cmd
=
$3
echo
"Running
$cmd
with profiling"
export
DB_FILE
=
$db_file
$cmd
&&
ncu
-i
"
${
profile_file
}${
PROFILE_EXT
}
"
--csv
--page
=
raw
>
"
${
profile_file
}${
CSV_EXT
}
"
||
echo
"
$cmd
failed"
}
# Function to run the command without profiling
run_without_profiling
()
{
local
db_file
=
$1
local
cmd
=
$2
echo
"Running
$cmd
without profiling"
export
DB_FILE
=
$db_file
$cmd
||
echo
"
$cmd
failed"
}
# Setup common command parameters
cmd_channelflow
=
"
${
MPIRUN
}
${
FULL_EXECUTABLE
}
${
FULL_ARGUMENT
}
-NumericalSetup.useParticles=false"
cmd_percolation
=
"
${
MPIRUN
}
${
FULL_EXECUTABLE
}
${
FULL_ARGUMENT
}
"
# First test case: ChannelFlow
profile_file_channelflow
=
"ncuprofile_channelflow_
${
dev_name
}
"
db_file_channelflow_profile
=
"gpu_profile_percolation_
${
dev_name
}
.sqlite3"
db_file_channelflow_benchmark
=
"gpu_benchmark_percolation_
${
dev_name
}
.sqlite3"
cmd_channelflow_profile
=
"
${
PROFILING
}
-o
$profile_file_channelflow
$cmd_channelflow
-NumericalSetup.timeSteps=2"
run_with_profiling
"
$profile_file_channelflow
"
"
$db_file_channelflow_profile
"
"
$cmd_channelflow_profile
"
run_without_profiling
"
$db_file_channelflow_benchmark
"
"
$cmd_channelflow
"
# Second test case: Percolation
profile_file_percolation
=
"ncuprofile_percolation_
${
dev_name
}
"
db_file_percolation_profile
=
"gpu_profile_percolation_
${
dev_name
}
.sqlite3"
db_file_percolation_benchmark
=
"gpu_benchmark_percolation_
${
dev_name
}
.sqlite3"
cmd_percolation_profile
=
"
${
PROFILING
}
-o
$profile_file_percolation
$cmd_percolation
-NumericalSetup.timeSteps=2"
run_with_profiling
"
$profile_file_percolation
"
"
$db_file_percolation_profile
"
"
$cmd_percolation_profile
"
run_without_profiling
"
$db_file_percolation_benchmark
"
"
$cmd_percolation
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment