Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
473c62e5
Commit
473c62e5
authored
Jul 25, 2012
by
Thomas Jahns
🤸
Browse files
Only flush file affected by timestamp change.
parent
c579d861
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pio_posixfpguardsendrecv.c
View file @
473c62e5
...
...
@@ -390,28 +390,26 @@ defTimestepPF(aFiledataPF *afd, int tsID)
/***************************************************************/
static
void
flushOp
(
void
*
a
,
void
*
tsID
)
flushOp
(
aFiledataPF
*
a
,
int
tsID
)
{
writePF
(
(
aFiledataPF
*
)
a
,
((
aFiledataPF
*
)
a
)
->
fileID
);
defTimestepPF
(
(
aFiledataPF
*
)
a
,
(
int
)(
intptr_t
)
tsID
);
writePF
(
a
,
a
->
fileID
);
defTimestepPF
(
a
,
tsID
);
}
size_t
fwPOSIXFPGUARDSENDRECV
(
int
fileID
,
int
tsID
,
const
void
*
buffer
,
size_t
len
)
{
int
error
=
0
;
int
flush
=
0
;
int
filled
=
0
;
aFiledataPF
*
afd
;
afd
=
listSetGet
(
bibAFiledataPF
,
fileIDTestA
,
(
void
*
)(
intptr_t
)
fileID
);
aFiledataPF
*
afd
=
listSetGet
(
bibAFiledataPF
,
fileIDTestA
,
(
void
*
)(
intptr_t
)
fileID
);
flush
=
(
tsID
!=
afd
->
tsID
)
?
1
:
0
;
bool
flush
=
tsID
!=
afd
->
tsID
;
if
(
flush
==
1
)
if
(
flush
)
{
xdebug
(
"
tsID = %d, flush buffer"
,
tsID
);
listSetForeach
(
bibAFiledataPF
,
flushOp
,
(
void
*
)(
intptr_t
)
tsID
);
xdebug
(
"fileID %d,
tsID = %d, flush buffer"
,
fileID
,
tsID
);
flushOp
(
afd
,
tsID
);
xmpi
(
MPI_Barrier
(
commInqCommColl
()));
}
...
...
Write
Preview
Markdown
is supported
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