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
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
EXADUNE
dune-common
Commits
6c8bcde4
Commit
6c8bcde4
authored
8 years ago
by
Steffen Müthing
Browse files
Options
Downloads
Patches
Plain Diff
[mpi] Allow user to specify thread support level in MPIHelper
parent
9b227d7a
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/parallel/mpihelper.hh
+5
-4
5 additions, 4 deletions
dune/common/parallel/mpihelper.hh
with
5 additions
and
4 deletions
dune/common/parallel/mpihelper.hh
+
5
−
4
View file @
6c8bcde4
...
...
@@ -214,10 +214,10 @@ namespace Dune
* @param argc The number of arguments provided to main.
* @param argv The arguments provided to main.
*/
DUNE_EXPORT
static
MPIHelper
&
instance
(
int
&
argc
,
char
**&
argv
)
DUNE_EXPORT
static
MPIHelper
&
instance
(
int
&
argc
,
char
**&
argv
,
int
required
=
MPI_THREAD_SINGLE
)
{
// create singleton instance
static
MPIHelper
singleton
(
argc
,
argv
);
static
MPIHelper
singleton
(
argc
,
argv
,
required
);
return
singleton
;
}
...
...
@@ -236,7 +236,7 @@ namespace Dune
void
prevent_warning
(
int
){}
//! \brief calls MPI_Init with argc and argv as parameters
MPIHelper
(
int
&
argc
,
char
**&
argv
)
MPIHelper
(
int
&
argc
,
char
**&
argv
,
int
required
)
{
int
wasInitialized
=
-
1
;
MPI_Initialized
(
&
wasInitialized
);
...
...
@@ -244,7 +244,8 @@ namespace Dune
{
rank_
=
-
1
;
size_
=
-
1
;
static
int
is_initialized
=
MPI_Init
(
&
argc
,
&
argv
);
int
provided
;
static
int
is_initialized
=
MPI_Init_thread
(
&
argc
,
&
argv
,
required
,
&
provided
);
prevent_warning
(
is_initialized
);
}
...
...
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