Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
RadioObservatory
LOFAR
Commits
96e34180
Commit
96e34180
authored
8 years ago
by
Alexander van Amesfoort
Browse files
Options
Downloads
Patches
Plain Diff
Task #9127: COBALT: fix MPI incompat with 1.10. Remain compat w/ 1.6 (missing MPI Send const qual)
parent
f59f5a7d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
RTCP/Cobalt/InputProc/src/Transpose/MPIUtil.cc
+40
-28
40 additions, 28 deletions
RTCP/Cobalt/InputProc/src/Transpose/MPIUtil.cc
with
40 additions
and
28 deletions
RTCP/Cobalt/InputProc/src/Transpose/MPIUtil.cc
+
40
−
28
View file @
96e34180
...
@@ -126,44 +126,56 @@ namespace LOFAR {
...
@@ -126,44 +126,56 @@ namespace LOFAR {
MPIAllocator
mpiAllocator
;
MPIAllocator
mpiAllocator
;
namespace
{
MPI_Request
Guarded_MPI_Issend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
typedef
int
(
*
MPI_SEND
)(
void
*
,
int
,
MPI_Datatype
,
int
,
int
,
MPI_Comm
,
MPI_Request
*
);
// Generic send method
MPI_Request
Guarded_MPI_Send
(
MPI_SEND
sendMethod
,
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
DEBUG
(
"SEND: size "
<<
numBytes
<<
" tag "
<<
hex
<<
tag
<<
dec
<<
" to "
<<
destRank
);
DEBUG
(
"SEND: size "
<<
numBytes
<<
" tag "
<<
hex
<<
tag
<<
dec
<<
" to "
<<
destRank
);
ASSERT
(
numBytes
>
0
);
ASSERT
(
numBytes
>
0
);
ASSERT
(
tag
>=
0
);
// Silly MPI requirement
ASSERT
(
tag
>=
0
);
// Silly MPI requirement (Reason: MPI_ANY_TAG is -1, but only for receivers)
//SmartPtr<ScopedLock> sl = MPI_threadSafe() ? 0 : new ScopedLock(MPIMutex);
//SmartPtr<ScopedLock> sl = MPI_threadSafe() ? 0 : new ScopedLock(MPIMutex);
MPI_Request
request
;
MPI_Request
request
;
// const_cast is for missing const in protos in OpenMPI <=1.6 (1.10 is fixed, not sure in between)
int
error
;
int
error
=
::
MPI_Issend
(
const_cast
<
void
*>
(
ptr
),
numBytes
,
MPI_BYTE
,
destRank
,
tag
,
MPI_COMM_WORLD
,
&
request
);
error
=
sendMethod
(
const_cast
<
void
*>
(
ptr
),
numBytes
,
MPI_BYTE
,
destRank
,
tag
,
MPI_COMM_WORLD
,
&
request
);
ASSERT
(
error
==
MPI_SUCCESS
);
ASSERT
(
error
==
MPI_SUCCESS
);
return
request
;
return
request
;
}
}
}
MPI_Request
Guarded_MPI_Issend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
return
Guarded_MPI_Send
(
::
MPI_Issend
,
ptr
,
numBytes
,
destRank
,
tag
);
}
MPI_Request
Guarded_MPI_Irsend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
MPI_Request
Guarded_MPI_Irsend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
return
Guarded_MPI_Send
(
::
MPI_Irsend
,
ptr
,
numBytes
,
destRank
,
tag
);
DEBUG
(
"SEND: size "
<<
numBytes
<<
" tag "
<<
hex
<<
tag
<<
dec
<<
" to "
<<
destRank
);
ASSERT
(
numBytes
>
0
);
ASSERT
(
tag
>=
0
);
// Silly MPI requirement (Reason: MPI_ANY_TAG is -1, but only for receivers)
//SmartPtr<ScopedLock> sl = MPI_threadSafe() ? 0 : new ScopedLock(MPIMutex);
MPI_Request
request
;
// const_cast is for missing const in protos in OpenMPI <=1.6 (1.10 is fixed, not sure in between)
int
error
=
::
MPI_Irsend
(
const_cast
<
void
*>
(
ptr
),
numBytes
,
MPI_BYTE
,
destRank
,
tag
,
MPI_COMM_WORLD
,
&
request
);
ASSERT
(
error
==
MPI_SUCCESS
);
return
request
;
}
}
MPI_Request
Guarded_MPI_Ibsend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
MPI_Request
Guarded_MPI_Ibsend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
return
Guarded_MPI_Send
(
::
MPI_Ibsend
,
ptr
,
numBytes
,
destRank
,
tag
);
DEBUG
(
"SEND: size "
<<
numBytes
<<
" tag "
<<
hex
<<
tag
<<
dec
<<
" to "
<<
destRank
);
ASSERT
(
numBytes
>
0
);
ASSERT
(
tag
>=
0
);
// Silly MPI requirement (Reason: MPI_ANY_TAG is -1, but only for receivers)
//SmartPtr<ScopedLock> sl = MPI_threadSafe() ? 0 : new ScopedLock(MPIMutex);
MPI_Request
request
;
// const_cast is for missing const in protos in OpenMPI <=1.6 (1.10 is fixed, not sure in between)
int
error
=
::
MPI_Ibsend
(
const_cast
<
void
*>
(
ptr
),
numBytes
,
MPI_BYTE
,
destRank
,
tag
,
MPI_COMM_WORLD
,
&
request
);
ASSERT
(
error
==
MPI_SUCCESS
);
return
request
;
}
}
MPI_Request
Guarded_MPI_Isend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
MPI_Request
Guarded_MPI_Isend
(
const
void
*
ptr
,
size_t
numBytes
,
int
destRank
,
int
tag
)
{
return
Guarded_MPI_Send
(
::
MPI_Isend
,
ptr
,
numBytes
,
destRank
,
tag
);
DEBUG
(
"SEND: size "
<<
numBytes
<<
" tag "
<<
hex
<<
tag
<<
dec
<<
" to "
<<
destRank
);
ASSERT
(
numBytes
>
0
);
ASSERT
(
tag
>=
0
);
// Silly MPI requirement (Reason: MPI_ANY_TAG is -1, but only for receivers)
//SmartPtr<ScopedLock> sl = MPI_threadSafe() ? 0 : new ScopedLock(MPIMutex);
MPI_Request
request
;
// const_cast is for missing const in protos in OpenMPI <=1.6 (1.10 is fixed, not sure in between)
int
error
=
::
MPI_Isend
(
const_cast
<
void
*>
(
ptr
),
numBytes
,
MPI_BYTE
,
destRank
,
tag
,
MPI_COMM_WORLD
,
&
request
);
ASSERT
(
error
==
MPI_SUCCESS
);
return
request
;
}
}
MPI_Request
Guarded_MPI_Irecv
(
void
*
ptr
,
size_t
numBytes
,
int
srcRank
,
int
tag
)
{
MPI_Request
Guarded_MPI_Irecv
(
void
*
ptr
,
size_t
numBytes
,
int
srcRank
,
int
tag
)
{
...
...
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