Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
c2bb1809
There was an error fetching the commit references. Please try again later.
Commit
c2bb1809
authored
6 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Added Send and Receive to MpiCommunicator + MpiCommunicator refactoring.
parent
9a180ecb
No related branches found
No related tags found
1 merge request
!26
Lbm
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/Communicators/MpiCommunicator.h
+4
-6
4 additions, 6 deletions
src/TNL/Communicators/MpiCommunicator.h
src/TNL/Communicators/NoDistrCommunicator.h
+2
-2
2 additions, 2 deletions
src/TNL/Communicators/NoDistrCommunicator.h
with
6 additions
and
8 deletions
src/TNL/Communicators/MpiCommunicator.h
+
4
−
6
View file @
c2bb1809
...
...
@@ -220,7 +220,7 @@ class MpiCommunicator
#endif
}
static
int
GetRank
(
CommunicationGroup
group
)
static
int
GetRank
(
CommunicationGroup
group
=
AllGroup
)
{
#ifdef HAVE_MPI
TNL_ASSERT_TRUE
(
IsInitialized
(),
"Fatal Error - MPI communicator is not initialized"
);
...
...
@@ -233,7 +233,7 @@ class MpiCommunicator
#endif
}
static
int
GetSize
(
CommunicationGroup
group
)
static
int
GetSize
(
CommunicationGroup
group
=
AllGroup
)
{
#ifdef HAVE_MPI
TNL_ASSERT_TRUE
(
IsInitialized
(),
"Fatal Error - MPI communicator is not initialized"
);
...
...
@@ -309,13 +309,13 @@ class MpiCommunicator
}
template
<
typename
T
>
static
Request
IRecv
(
T
*
data
,
int
count
,
int
src
,
int
tag
,
CommunicationGroup
group
)
static
Request
IRecv
(
T
*
data
,
int
count
,
int
src
,
int
tag
,
CommunicationGroup
group
=
AllGroup
)
{
#ifdef HAVE_MPI
TNL_ASSERT_TRUE
(
IsInitialized
(),
"Fatal Error - MPI communicator is not initialized"
);
TNL_ASSERT_NE
(
group
,
NullGroup
,
"IRecv cannot be called with NullGroup"
);
Request
req
;
MPI_Irecv
(
(
void
*
)
data
,
count
,
MPITypeResolver
<
T
>::
getType
()
,
src
,
tag
,
group
,
&
req
);
MPI_Irecv
(
const_cast
<
void
*
>
(
(
const
void
*
)
data
)
,
count
,
MPITypeResolver
<
T
>::
getType
()
,
src
,
tag
,
group
,
&
req
);
return
req
;
#else
throw
Exceptions
::
MPISupportMissing
();
...
...
@@ -522,8 +522,6 @@ class MpiCommunicator
#endif
#endif
}
};
#ifdef HAVE_MPI
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Communicators/NoDistrCommunicator.h
+
2
−
2
View file @
c2bb1809
...
...
@@ -55,12 +55,12 @@ class NoDistrCommunicator
return
false
;
}
static
int
GetRank
(
CommunicationGroup
group
)
static
int
GetRank
(
CommunicationGroup
group
=
AllGroup
)
{
return
0
;
}
static
int
GetSize
(
CommunicationGroup
group
)
static
int
GetSize
(
CommunicationGroup
group
=
AllGroup
)
{
return
1
;
}
...
...
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