Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
OpenGeoSys Tools
ogs-utils
Commits
c2aa23ae
Commit
c2aa23ae
authored
7 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
added compile time measurement page
parent
700cd2f6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dev/compile-time-measurement/README.md
+111
-0
111 additions, 0 deletions
dev/compile-time-measurement/README.md
with
111 additions
and
0 deletions
dev/compile-time-measurement/README.md
0 → 100644
+
111
−
0
View file @
c2aa23ae
Measured compilation time after changing a single file of the OGS sources.
This should resemble the usual process development work.
# Summary
Compiling with fixed-size Eigen matrices takes significantly longer than with
dynamic-sized Eigen matrices.
# Used script
```
{sh}
#!/bin/sh
set -e
export MAKEFLAGS="-j3"
(
cd ../src
if [ "`git status --porcelain | wc -l`" -ne 0 ]; then
echo "Source directory contains untracked/uncommitted changes. Aborting" >&2
exit 1
fi
) || exit 1
if ! mkdir "build" &>/dev/null; then
echo "WARNING: reusing existing build directory!" >&2
read -r -p "Hit enter to continue "
fi
cd build
# set some cmake option I usually use
if ! cmake ../../src \
-DCMAKE_BUILD_TYPE=Release \
-DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON \
-DOGS_USE_LIS=ON;
then
# workaround for second git worktree
(
cd CMakeFiles/git-data
ln -s HEAD head-ref
)
cmake .
fi
# initial build in fresh build directory
time make ogs
# make a non-trivial change to the code
echo "inline void unused_dummy_function() {}" >> ../../src/ProcessLib/TES/TESLocalAssemblerInner.h
# supposedly faster second build
time make ogs
```
# Some results
Summary: Initial compile time: ~ 10 minutes, compilation of changes only: ~ 16 seconds.
Changing only ProcessLib/SmallDeformation/SmallDeformationFEM.h took ~20 seconds in the second build.
```
[...]
Scanning dependencies of target ogs
[100%] Building CXX object Applications/CLI/CMakeFiles/ogs.dir/ogs.cpp.o
[100%] Linking CXX executable ../../bin/ogs
[100%] Built target ogs
real 9m47,808s
user 24m2,080s
sys 1m25,050s
[ 5%] Built target logog
[ 10%] Built target BaseLib
[ 19%] Built target MathLib
[ 28%] Built target GeoLib
[ 47%] Built target MeshLib
[ 52%] Built target MeshGeoToolsLib
[ 61%] Built target NumLib
[ 75%] Built target MaterialLib
Scanning dependencies of target ProcessLib
[ 75%] Building CXX object ProcessLib/CMakeFiles/ProcessLib.dir/TES/CreateTESProcess.cpp.o
[ 75%] Building CXX object ProcessLib/CMakeFiles/ProcessLib.dir/TES/TESLocalAssemblerInner.cpp.o
[ 77%] Building CXX object ProcessLib/CMakeFiles/ProcessLib.dir/TES/TESProcess.cpp.o
[ 77%] Building CXX object ProcessLib/CMakeFiles/ProcessLib.dir/TES/TESReactionAdaptor.cpp.o
[ 78%] Linking CXX static library ../lib/libProcessLib.a
[100%] Built target ProcessLib
[100%] Built target ApplicationsLib
[100%] Linking CXX executable ../../bin/ogs
[100%] Built target ogs
real 0m15,544s
user 0m26,212s
sys 0m1,759s
```
## For reference: fixed-size Eigen matrices, three threads, ccache not disabled (but maybe not effective)
initial build:
```
real 55m52,166s
user 63m0,470s
sys 7m32,749s
```
build after change:
```
real 2m6,759s
user 2m11,119s
sys 0m2,841s
```
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