Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
cbaddc0d
Commit
cbaddc0d
authored
14 years ago
by
Martin Nolte
Browse files
Options
Downloads
Patches
Plain Diff
also add a method to obtain MPI_COMM_SELF or a fake, depending on whether MPI
has been found [[Imported from SVN: r6388]]
parent
17de3834
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
dune/common/mpihelper.hh
+36
-8
36 additions, 8 deletions
dune/common/mpihelper.hh
with
36 additions
and
8 deletions
dune/common/mpihelper.hh
+
36
−
8
View file @
cbaddc0d
...
...
@@ -79,17 +79,31 @@ namespace Dune
*/
typedef
No_Comm
MPICommunicator
;
/**
* @brief Get the default communicator.
/** \brief get the default communicator
*
* Return a communicator to exchange data with all processes
*
*
@
return
-1 As we are fake.
*
\
return
s a fake communicator
*/
static
MPICommunicator
getCommunicator
()
static
MPICommunicator
getCommunicator
()
{
static
MPICommunicator
comm
;
return
comm
;
}
/** \brief get a local communicator
*
* Returns a communicator to communicate with the local process only
*
* \returns a fake communicator
*/
static
MPICommunicator
getLocalCommunicator
()
{
return
getCommunicator
();
}
static
CollectiveCommunication
<
MPICommunicator
>
getCollectiveCommunication
()
{
...
...
@@ -156,14 +170,28 @@ namespace Dune
*/
typedef
MPI_Comm
MPICommunicator
;
/**
* @brief Get the default communicator.
/** \brief get the default communicator
*
* Return a communicator to exchange data with all processes
*
*
@
return MPI_COMM_WORLD
*
\
return
s
MPI_COMM_WORLD
*/
static
MPICommunicator
getCommunicator
(){
static
MPICommunicator
getCommunicator
()
{
return
MPI_COMM_WORLD
;
}
/** \brief get a local communicator
*
* Returns a communicator to exchange data with the local process only
*
* \returns MPI_COMM_SELF
*/
static
MPICommunicator
getLocalCommunicator
()
{
return
MPI_COMM_SELF
;
}
static
CollectiveCommunication
<
MPICommunicator
>
getCollectiveCommunication
()
{
...
...
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