Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
d8945a16
Commit
d8945a16
authored
Dec 02, 2014
by
Thomas Jahns
🤸
Browse files
Fix incorrect use of MPI_CHAR.
* Also add missing fail-safe wrapper.
parent
5c5f4d39
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/pio_mpinonb.c
View file @
d8945a16
...
...
@@ -146,9 +146,9 @@ writeMPINONB(aFiledataM *of)
rankNode
,
amount
);
xmpi
(
MPI_Wait
(
&
(
of
->
request
),
&
status
));
xmpi
(
MPI_File_iwrite_shared
(
of
->
fh
,
of
->
db
->
buffer
,
amount
,
MPI_CHAR
,
&
(
of
->
request
)
));
xdebug
(
"%d bytes written for fileID=%d"
,
amount
,
fileID
);
xmpi
(
MPI_File_iwrite_shared
(
of
->
fh
,
of
->
db
->
buffer
,
amount
,
MPI_
UNSIGNED_
CHAR
,
&
of
->
request
));
xdebug
(
"%d bytes written for fileID=%d"
,
amount
,
fileID
);
/* change outputBuffer */
...
...
src/pio_posixasynch.c
View file @
d8945a16
...
...
@@ -266,7 +266,7 @@ void pioWriterAIO(void)
struct
fileOpTag
rtag
=
decodeFileOpTag
(
tag
);
int
messagesize
;
xmpi
(
MPI_Get_count
(
&
status
,
MPI_CHAR
,
&
messagesize
));
xmpi
(
MPI_Get_count
(
&
status
,
MPI_
UNSIGNED_
CHAR
,
&
messagesize
));
xdebug
(
"receive message from source=%d, id=%d, command=%d ( %s ), "
"messagesize=%d"
,
source
,
rtag
.
id
,
rtag
.
command
,
...
...
@@ -280,7 +280,7 @@ void pioWriterAIO(void)
*
sizeof
(
messageBuffer
[
0
]));
char
*
pMB
=
messageBuffer
;
xmpi
(
MPI_Recv
(
messageBuffer
,
messagesize
,
MPI_CHAR
,
source
,
xmpi
(
MPI_Recv
(
messageBuffer
,
messagesize
,
MPI_
UNSIGNED_
CHAR
,
source
,
tag
,
commNode
,
&
status
));
char
*
filename
=
strtok
(
pMB
,
token
);
...
...
@@ -350,8 +350,9 @@ void pioWriterAIO(void)
bfd
->
nextOpIndex
=
(
bfd
->
nextOpIndex
+
1
)
%
nPrefStreams
;
MPI_Recv
((
void
*
)
bfd
->
ctrlBlks
[
bfd
->
currOpIndex
].
aio_buf
,
messagesize
,
MPI_CHAR
,
source
,
tag
,
commNode
,
&
status
);
xmpi
(
MPI_Recv
((
void
*
)
bfd
->
ctrlBlks
[
bfd
->
currOpIndex
].
aio_buf
,
messagesize
,
MPI_UNSIGNED_CHAR
,
source
,
tag
,
commNode
,
&
status
));
writePA
(
bfd
,
(
size_t
)
messagesize
);
...
...
src/pio_posixnonb.c
View file @
d8945a16
...
...
@@ -154,8 +154,8 @@ pioWriterStdIO(void)
tag
=
status
.
MPI_TAG
;
rtag
=
decodeFileOpTag
(
tag
);
xmpi
(
MPI_Get_count
(
&
status
,
MPI_CHAR
,
&
messagesize
));
xmpi
(
MPI_Get_count
(
&
status
,
MPI_
UNSIGNED_
CHAR
,
&
messagesize
));
xdebug
(
"RECEIVE MESSAGE FROM SOURCE=%d, ID=%d, COMMAND=%d ( %s ),"
"MESSAGESIZE=%d"
,
source
,
rtag
.
id
,
rtag
.
command
,
...
...
@@ -169,8 +169,8 @@ pioWriterStdIO(void)
=
xmalloc
((
size_t
)
messagesize
*
sizeof
(
messageBuffer
[
0
]));
pMB
=
messageBuffer
;
xmpi
(
MPI_Recv
(
messageBuffer
,
messagesize
,
MPI_
CHAR
,
source
,
tag
,
commNode
,
&
status
));
xmpi
(
MPI_Recv
(
messageBuffer
,
messagesize
,
MPI_
UNSIGNED_CHAR
,
source
,
tag
,
commNode
,
&
status
));
xdebug
(
"%s"
,
"after recv, in loop"
);
...
...
@@ -219,8 +219,8 @@ pioWriterStdIO(void)
xdebug
(
"COMMAND %s, ID=%d, NAME=%s"
,
command2charP
[
rtag
.
command
],
rtag
.
id
,
bfd
->
name
);
xmpi
(
MPI_Recv
(
bfd
->
fb
->
buffer
,
messagesize
,
MPI_
CHAR
,
source
,
tag
,
commNode
,
&
status
));
xmpi
(
MPI_Recv
(
bfd
->
fb
->
buffer
,
messagesize
,
MPI_
UNSIGNED_CHAR
,
source
,
tag
,
commNode
,
&
status
));
writeP
(
bfd
,
amount
);
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment