Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
swiftmpistepsim
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
swiftmpistepsim
Commits
8ee066b9
Commit
8ee066b9
authored
5 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Add GPL and start proper documentation
parent
d6f94d8e
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-1
1 addition, 1 deletion
.gitignore
COPYING
+674
-0
674 additions, 0 deletions
COPYING
README.md
+32
-0
32 additions, 0 deletions
README.md
swiftmpistepsim.c
+17
-8
17 additions, 8 deletions
swiftmpistepsim.c
with
724 additions
and
9 deletions
.gitignore
+
1
−
1
View file @
8ee066b9
mpistalls
swiftmpistepsim
*.o
*~
This diff is collapsed.
Click to expand it.
COPYING
0 → 100644
+
674
−
0
View file @
8ee066b9
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
32
−
0
View file @
8ee066b9
This package is a standalone part of
[
SWIFT
](
http://www.swiftsim.com
)
that
aims to roughly simulate the MPI interactions that taking a single step
of a simulation makes.
The interactions are captured from a run of SWIFT when configured using the
configure option
`--enable-mpiuse-reports`
. When this is enabled each step of
the simulation produces logs for each rank which record when the MPI
interaction was started and when it completed. Other information such as the
ranks involved, the size of the data exchanged, the MPI tags used and which
SWIFT task types were used are also recorded.
To use the program
`swiftmpistepsim`
you need to select the step of interest
(for instance one whose run-time seems dominated by the MPI tasks) and then
concatenate all the logs for that step into a single file. You can then
run using:
```
mpirun -np <nranks> swiftmpistepsim <step-log>
```
which will output timings for the various MPI calls.
To simulate SWIFT we use three threads, which run simultaneously, one that
injects the MPI commands, i.e. initiates the interaction using calls to
`MPI_Isend`
and
`MPI_Irecv`
, and two other threads that poll the MPI library
using
`MPI_Test`
to discover when the exchanges have been completed.
SWIFT itself uses more threads than this for the injection and polling phases,
but it is not thought to make a large difference. A later development could
explore that...
---------------------------
Peter W. Draper 18 Sep 2019.
This diff is collapsed.
Click to expand it.
swiftmpistepsim.c
+
17
−
8
View file @
8ee066b9
/**
*
Attempt to reproduce the asynchronous stalling that we see for medium
*
busy steps in SWIFT.
/**
*****************************************************************************
*
This file is part of SWIFT.
*
Copyright (c) 2019 Peter W. Draper
*
* Timed injection version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* So we need to setup a multithreaded MPI program that performs asynchronous
* exchanges of various data sizes and continuously checks the requests for
* completion. Also need timers to record the time taken by all this...
*/
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#include
<mpi.h>
#include
<pthread.h>
#include
<unistd.h>
...
...
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