Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
mpim-sw
libcdi
Commits
27763d43
Commit
27763d43
authored
7 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Clarify function.
parent
75a8911f
No related branches found
Branches containing commit
No related tags found
2 merge requests
!34
Version 2.2.0
,
!13
Consolidation with CDI-PIO (develop)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pio_server.c
+17
-5
17 additions, 5 deletions
src/pio_server.c
with
17 additions
and
5 deletions
src/pio_server.c
+
17
−
5
View file @
27763d43
...
...
@@ -170,12 +170,14 @@ setupClientRanks(void)
static
void
createClientStreamBuf
(
size_t
streamIdx
,
const
struct
clientBufSize
*
bufSizes
,
const
struct
cdiPioConf
*
conf
)
{
/* find and tabulate aggregate size needed for all clients of collector */
size_t
streamBufferSize
=
0
;
for
(
size_t
i
=
0
;
i
<
(
size_t
)
numClients_
;
++
i
)
{
streamBufferSize
+=
(
rxWin
[
streamIdx
].
clientBuf
[
i
].
size
=
bufSizes
[
i
].
bufSize
);
rxWin
[
streamIdx
].
clientBuf
[
i
].
dictSize
=
bufSizes
[
i
].
numDataRecords
+
bufSizes
[
i
].
numRPCRecords
;
}
/* set pointer to RMA buffer for client 0 of collector */
if
(
conf
->
batchedRMA
)
rxWin
[
streamIdx
].
clientBuf
[
0
].
mem
=
Malloc
(
streamBufferSize
);
else
...
...
@@ -191,16 +193,26 @@ createClientStreamBuf(size_t streamIdx, const struct clientBufSize *bufSizes, co
for
(
size_t
j
=
0
;
j
<
numStreams
;
++
j
)
if
(
rxWin
[
j
].
getWin
!=
MPI_WIN_NULL
)
{
rxWin
[
j
].
clientBuf
[
0
].
mem
=
sharedClientBuf
;
for
(
size_t
i
=
1
;
i
<
(
size_t
)
numClients_
;
++
i
)
rxWin
[
j
].
clientBuf
[
i
].
mem
=
rxWin
[
j
].
clientBuf
[
i
-
1
].
mem
+
rxWin
[
j
].
clientBuf
[
i
-
1
].
size
;
unsigned
char
*
newmem
=
sharedClientBuf
;
for
(
size_t
i
=
0
;
i
<
(
size_t
)
numClients_
;
++
i
)
{
rxWin
[
j
].
clientBuf
[
i
].
mem
=
newmem
;
newmem
+=
rxWin
[
j
].
clientBuf
[
i
].
size
;
}
}
}
}
rxWin
[
streamIdx
].
clientBuf
[
0
].
mem
=
sharedClientBuf
;
}
for
(
size_t
i
=
1
;
i
<
(
size_t
)
numClients_
;
++
i
)
rxWin
[
streamIdx
].
clientBuf
[
i
].
mem
=
rxWin
[
streamIdx
].
clientBuf
[
i
-
1
].
mem
+
rxWin
[
streamIdx
].
clientBuf
[
i
-
1
].
size
;
/* set pointers for other clients */
{
unsigned
char
*
newmem
=
rxWin
[
streamIdx
].
clientBuf
[
0
].
mem
;
for
(
size_t
i
=
1
;
i
<
(
size_t
)
numClients_
;
++
i
)
{
newmem
+=
rxWin
[
streamIdx
].
clientBuf
[
i
-
1
].
size
;
rxWin
[
streamIdx
].
clientBuf
[
i
].
mem
=
newmem
;
}
}
}
static
void
...
...
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