Skip to content
GitLab
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
1ce8aac0
Commit
1ce8aac0
authored
Dec 02, 2014
by
Thomas Jahns
🤸
Browse files
Add missing static declarations and fix bug in load-balancing
for serial netCDF library usage.
parent
625abbda
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pio_server.c
View file @
1ce8aac0
...
...
@@ -438,15 +438,16 @@ int cdiPioNextOpenRank()
return
minRank
;
}
void
cdiPioOpenFileOnRank
(
int
rank
)
static
void
cdiPioOpenFileOnRank
(
int
rank
)
{
xassert
(
cdiSerialOpenFileCount
!=
NULL
&&
rank
>=
0
&&
rank
<
commInqSizeColl
());
&&
(
unsigned
)
rank
<
(
unsigned
)
commInqSizeColl
());
++
(
cdiSerialOpenFileCount
[
rank
]);
}
void
cdiPioCloseFileOnRank
(
int
rank
)
static
void
cdiPioCloseFileOnRank
(
int
rank
)
{
xassert
(
cdiSerialOpenFileCount
!=
NULL
&&
rank
>=
0
&&
rank
<
commInqSizeColl
());
...
...
@@ -987,6 +988,7 @@ cdiPioStreamCDFOpenWrap(const char *filename, const char *filemode,
if
(
ioMode
!=
PIO_NONE
)
xmpi
(
MPI_Bcast
(
&
fileID
,
1
,
MPI_INT
,
rank
,
commInqCommColl
()));
streamptr
->
ownerRank
=
rank
;
cdiPioOpenFileOnRank
(
rank
);
return
fileID
;
}
default:
...
...
@@ -1010,11 +1012,11 @@ cdiPioStreamCDFCloseWrap(stream_t *streamptr, int recordBufIsToBeDeleted)
case
FILETYPE_NC4
:
case
FILETYPE_NC4C
:
{
int
rank
,
rankOpen
;
int
rank
,
rankOpen
=
cdiPioSerialOpenFileMap
(
streamptr
->
self
)
;
if
(
commInqIOMode
()
==
PIO_NONE
||
((
rank
=
commInqRankColl
())
==
(
rankOpen
=
cdiPioSerialOpenFileMap
(
streamptr
->
self
))))
||
((
rank
=
commInqRankColl
())
==
rankOpen
))
cdiStreamCloseDefaultDelegate
(
streamptr
,
recordBufIsToBeDeleted
);
cdiPioCloseFileOnRank
(
rankOpen
);
break
;
}
default:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment