Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Podhorszki, Norbert
ADIOS2
Commits
7ed0e0b8
Commit
7ed0e0b8
authored
7 years ago
by
Atkins, Charles Vernon
Browse files
Options
Downloads
Patches
Plain Diff
Fix const-ness with mpidummy
parent
78c57400
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!22
Fix clang tidy issues round2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/mpidummy.h
+18
-17
18 additions, 17 deletions
include/mpidummy.h
source/format/BP1Aggregator.cpp
+1
-1
1 addition, 1 deletion
source/format/BP1Aggregator.cpp
source/mpidummy.cpp
+15
-13
15 additions, 13 deletions
source/mpidummy.cpp
with
34 additions
and
31 deletions
include/mpidummy.h
+
18
−
17
View file @
7ed0e0b8
...
@@ -73,34 +73,35 @@ int MPI_Comm_size(MPI_Comm comm, int *size);
...
@@ -73,34 +73,35 @@ int MPI_Comm_size(MPI_Comm comm, int *size);
int
MPI_Comm_free
(
MPI_Comm
*
comm
);
int
MPI_Comm_free
(
MPI_Comm
*
comm
);
MPI_Comm
MPI_Comm_f2c
(
MPI_Fint
comm
);
MPI_Comm
MPI_Comm_f2c
(
MPI_Fint
comm
);
int
MPI_Gather
(
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
MPI_Gather
(
const
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
);
void
*
recvbuf
,
int
recvcount
,
MPI_Datatype
recvtype
,
int
root
,
int
MPI_Gatherv
(
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
MPI_Comm
comm
);
void
*
recvbuf
,
int
*
recvcnts
,
int
*
displs
,
int
MPI_Gatherv
(
const
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
const
int
*
recvcounts
,
const
int
*
displs
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
);
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
);
int
MPI_Allgather
(
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
,
int
MPI_Allgather
(
const
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcount
,
MPI_Datatype
recvtype
,
void
*
recvbuf
,
int
recvcount
,
MPI_Datatype
recvtype
,
MPI_Comm
comm
);
MPI_Comm
comm
);
int
MPI_Scatter
(
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
int
MPI_Scatter
(
const
void
*
sendbuf
,
int
sendc
ou
nt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
void
*
recvbuf
,
int
recvc
ou
nt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
);
MPI_Comm
comm
);
int
MPI_Scatterv
(
void
*
sendbuf
,
int
*
sendcnts
,
int
*
displs
,
int
MPI_Scatterv
(
const
void
*
sendbuf
,
const
int
*
sendc
ou
nts
,
const
int
*
displs
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvc
ou
nt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
);
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
);
int
MPI_Recv
(
void
*
recvbuffer
,
int
count
,
MPI_Datatype
type
,
int
source
,
int
MPI_Recv
(
void
*
buf
,
int
count
,
MPI_Datatype
data
type
,
int
source
,
int
tag
,
int
tag
,
MPI_Comm
comm
,
MPI_Status
*
status
);
MPI_Comm
comm
,
MPI_Status
*
status
);
int
MPI_Irecv
(
void
*
recvbuffer
,
int
count
,
MPI_Datatype
type
,
int
source
,
int
MPI_Irecv
(
void
*
buf
,
int
count
,
MPI_Datatype
data
type
,
int
source
,
int
tag
,
int
tag
,
MPI_Comm
comm
,
MPI_Request
*
request
);
MPI_Comm
comm
,
MPI_Request
*
request
);
int
MPI_Send
(
void
*
sendbuffer
,
int
count
,
MPI_Datatype
type
,
int
dest
ination
,
int
MPI_Send
(
const
void
*
buf
,
int
count
,
MPI_Datatype
data
type
,
int
dest
,
int
tag
,
MPI_Comm
comm
);
int
tag
,
MPI_Comm
comm
);
int
MPI_Isend
(
void
*
recvbuffer
,
int
count
,
MPI_Datatype
type
,
int
source
,
int
MPI_Isend
(
const
void
*
buf
,
int
count
,
MPI_Datatype
data
type
,
int
dest
,
int
tag
,
MPI_Comm
comm
,
MPI_Request
*
request
);
int
tag
,
MPI_Comm
comm
,
MPI_Request
*
request
);
int
MPI_Wait
(
MPI_Request
*
request
,
MPI_Status
*
status
);
int
MPI_Wait
(
MPI_Request
*
request
,
MPI_Status
*
status
);
int
MPI_File_open
(
MPI_Comm
comm
,
char
*
filename
,
int
amode
,
MPI_Info
info
,
int
MPI_File_open
(
MPI_Comm
comm
,
const
char
*
filename
,
int
amode
,
MPI_Info
info
,
MPI_File
*
fh
);
MPI_File
*
fh
);
int
MPI_File_close
(
MPI_File
*
fh
);
int
MPI_File_close
(
MPI_File
*
fh
);
int
MPI_File_get_size
(
MPI_File
fh
,
MPI_Offset
*
size
);
int
MPI_File_get_size
(
MPI_File
fh
,
MPI_Offset
*
size
);
...
@@ -108,7 +109,7 @@ int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype,
...
@@ -108,7 +109,7 @@ int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype,
MPI_Status
*
status
);
MPI_Status
*
status
);
int
MPI_File_seek
(
MPI_File
fh
,
MPI_Offset
offset
,
int
whence
);
int
MPI_File_seek
(
MPI_File
fh
,
MPI_Offset
offset
,
int
whence
);
int
MPI_Get_count
(
MPI_Status
*
status
,
MPI_Datatype
datatype
,
int
*
count
);
int
MPI_Get_count
(
const
MPI_Status
*
status
,
MPI_Datatype
datatype
,
int
*
count
);
int
MPI_Error_string
(
int
errorcode
,
char
*
string
,
int
*
resultlen
);
int
MPI_Error_string
(
int
errorcode
,
char
*
string
,
int
*
resultlen
);
int
MPI_Comm_split
(
MPI_Comm
comm
,
int
color
,
int
key
,
MPI_Comm
*
comm_out
);
int
MPI_Comm_split
(
MPI_Comm
comm
,
int
color
,
int
key
,
MPI_Comm
*
comm_out
);
...
...
This diff is collapsed.
Click to expand it.
source/format/BP1Aggregator.cpp
+
1
−
1
View file @
7ed0e0b8
...
@@ -98,7 +98,7 @@ void BP1Aggregator::WriteProfilingLog(const std::string fileName,
...
@@ -98,7 +98,7 @@ void BP1Aggregator::WriteProfilingLog(const std::string fileName,
MPI_Isend
(
&
rankLogSize
,
1
,
MPI_INT
,
0
,
0
,
m_MPIComm
,
&
requestSize
);
MPI_Isend
(
&
rankLogSize
,
1
,
MPI_INT
,
0
,
0
,
m_MPIComm
,
&
requestSize
);
MPI_Request
requestRankLog
;
MPI_Request
requestRankLog
;
MPI_Isend
(
const_cast
<
char
*>
(
rankLog
.
c_str
()
),
rankLogSize
,
MPI_CHAR
,
0
,
1
,
MPI_Isend
(
rankLog
.
data
(
),
rankLogSize
,
MPI_CHAR
,
0
,
1
,
m_MPIComm
,
&
requestRankLog
);
m_MPIComm
,
&
requestRankLog
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
source/mpidummy.cpp
+
15
−
13
View file @
7ed0e0b8
...
@@ -20,9 +20,10 @@
...
@@ -20,9 +20,10 @@
#include
<cstring>
#include
<cstring>
//#define _LARGEFILE64_SOURCE
//#define _LARGEFILE64_SOURCE
#include
<unistd.h>
#include
<sys/time.h>
#include
<sys/time.h>
#include
<sys/types.h>
#include
<sys/types.h>
#include
<unistd.h>
/// \endcond
/// \endcond
#include
"mpidummy.h"
#include
"mpidummy.h"
...
@@ -95,8 +96,9 @@ int MPI_Comm_free(MPI_Comm *comm)
...
@@ -95,8 +96,9 @@ int MPI_Comm_free(MPI_Comm *comm)
MPI_Comm
MPI_Comm_f2c
(
MPI_Fint
comm
)
{
return
comm
;
}
MPI_Comm
MPI_Comm_f2c
(
MPI_Fint
comm
)
{
return
comm
;
}
int
MPI_Gather
(
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
MPI_Gather
(
const
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
{
{
int
ier
=
MPI_SUCCESS
;
int
ier
=
MPI_SUCCESS
;
size_t
n
=
0
,
nsent
=
0
,
nrecv
=
0
;
size_t
n
=
0
,
nsent
=
0
,
nrecv
=
0
;
...
@@ -146,8 +148,8 @@ int MPI_Gather(void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf,
...
@@ -146,8 +148,8 @@ int MPI_Gather(void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf,
return
ier
;
return
ier
;
}
}
int
MPI_Gatherv
(
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
int
MPI_Gatherv
(
const
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
*
recvcnts
,
int
*
displs
,
void
*
recvbuf
,
const
int
*
recvcnts
,
const
int
*
displs
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
{
{
int
ier
=
MPI_SUCCESS
;
int
ier
=
MPI_SUCCESS
;
...
@@ -165,7 +167,7 @@ int MPI_Gatherv(void *sendbuf, int sendcnt, MPI_Datatype sendtype,
...
@@ -165,7 +167,7 @@ int MPI_Gatherv(void *sendbuf, int sendcnt, MPI_Datatype sendtype,
return
ier
;
return
ier
;
}
}
int
MPI_Allgather
(
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
,
int
MPI_Allgather
(
const
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcount
,
MPI_Datatype
recvtype
,
void
*
recvbuf
,
int
recvcount
,
MPI_Datatype
recvtype
,
MPI_Comm
comm
)
MPI_Comm
comm
)
{
{
...
@@ -173,7 +175,7 @@ int MPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
...
@@ -173,7 +175,7 @@ int MPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
0
,
comm
);
0
,
comm
);
}
}
int
MPI_Scatter
(
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
int
MPI_Scatter
(
const
void
*
sendbuf
,
int
sendcnt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
MPI_Comm
comm
)
{
{
...
@@ -216,7 +218,7 @@ int MPI_Scatter(void *sendbuf, int sendcnt, MPI_Datatype sendtype,
...
@@ -216,7 +218,7 @@ int MPI_Scatter(void *sendbuf, int sendcnt, MPI_Datatype sendtype,
if
(
ier
==
MPI_SUCCESS
)
if
(
ier
==
MPI_SUCCESS
)
{
{
memcpy
(
send
buf
,
recv
buf
,
nsent
);
memcpy
(
recv
buf
,
send
buf
,
nsent
);
}
}
else
else
{
{
...
@@ -226,7 +228,7 @@ int MPI_Scatter(void *sendbuf, int sendcnt, MPI_Datatype sendtype,
...
@@ -226,7 +228,7 @@ int MPI_Scatter(void *sendbuf, int sendcnt, MPI_Datatype sendtype,
return
ier
;
return
ier
;
}
}
int
MPI_Scatterv
(
void
*
sendbuf
,
int
*
sendcnts
,
int
*
displs
,
int
MPI_Scatterv
(
const
void
*
sendbuf
,
const
int
*
sendcnts
,
const
int
*
displs
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
sendtype
,
void
*
recvbuf
,
int
recvcnt
,
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
MPI_Datatype
recvtype
,
int
root
,
MPI_Comm
comm
)
{
{
...
@@ -260,13 +262,13 @@ int MPI_Irecv(void * /*recvbuffer*/, int /*count*/, MPI_Datatype /*type*/,
...
@@ -260,13 +262,13 @@ int MPI_Irecv(void * /*recvbuffer*/, int /*count*/, MPI_Datatype /*type*/,
return
0
;
return
0
;
}
}
int
MPI_Send
(
void
*
/*sendbuffer*/
,
int
/*count*/
,
MPI_Datatype
/*type*/
,
int
MPI_Send
(
const
void
*
/*sendbuffer*/
,
int
/*count*/
,
MPI_Datatype
/*type*/
,
int
/*destination*/
,
int
/*tag*/
,
MPI_Comm
/*comm*/
)
int
/*destination*/
,
int
/*tag*/
,
MPI_Comm
/*comm*/
)
{
{
return
0
;
return
0
;
}
}
int
MPI_Isend
(
void
*
/*recvbuffer*/
,
int
/*count*/
,
MPI_Datatype
/*type*/
,
int
MPI_Isend
(
const
void
*
/*recvbuffer*/
,
int
/*count*/
,
MPI_Datatype
/*type*/
,
int
/*source*/
,
int
/*tag*/
,
MPI_Comm
/*comm*/
,
int
/*source*/
,
int
/*tag*/
,
MPI_Comm
/*comm*/
,
MPI_Request
*
/*request*/
)
MPI_Request
*
/*request*/
)
{
{
...
@@ -275,7 +277,7 @@ int MPI_Isend(void * /*recvbuffer*/, int /*count*/, MPI_Datatype /*type*/,
...
@@ -275,7 +277,7 @@ int MPI_Isend(void * /*recvbuffer*/, int /*count*/, MPI_Datatype /*type*/,
int
MPI_Wait
(
MPI_Request
*
/*request*/
,
MPI_Status
*
/*status*/
)
{
return
0
;
}
int
MPI_Wait
(
MPI_Request
*
/*request*/
,
MPI_Status
*
/*status*/
)
{
return
0
;
}
int
MPI_File_open
(
MPI_Comm
/*comm*/
,
char
*
filename
,
int
amode
,
int
MPI_File_open
(
MPI_Comm
/*comm*/
,
const
char
*
filename
,
int
amode
,
MPI_Info
/*info*/
,
MPI_File
*
fh
)
MPI_Info
/*info*/
,
MPI_File
*
fh
)
{
{
*
fh
=
open64
(
filename
,
amode
);
*
fh
=
open64
(
filename
,
amode
);
...
@@ -327,7 +329,7 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
...
@@ -327,7 +329,7 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
return
MPI_SUCCESS
;
return
MPI_SUCCESS
;
}
}
int
MPI_Get_count
(
MPI_Status
*
status
,
MPI_Datatype
,
int
*
count
)
int
MPI_Get_count
(
const
MPI_Status
*
status
,
MPI_Datatype
,
int
*
count
)
{
{
*
count
=
static_cast
<
int
>
(
*
status
);
*
count
=
static_cast
<
int
>
(
*
status
);
return
MPI_SUCCESS
;
return
MPI_SUCCESS
;
...
...
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