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
7e036074
Commit
7e036074
authored
2 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Consistently use size_t for nmissing.
parent
2db1c258
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!91
Add alternative code path for huge buffers.
,
!89
Miscellaneous fixes and CDI-PIO improvements
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pio_interface.c
+6
-4
6 additions, 4 deletions
src/pio_interface.c
src/pio_interface.h
+3
-1
3 additions, 1 deletion
src/pio_interface.h
with
9 additions
and
5 deletions
src/pio_interface.c
+
6
−
4
View file @
7e036074
...
...
@@ -326,7 +326,7 @@ cdiPioBufferPartData_(int streamID, int varID, int memtype, const void *packData
xassert
(
varID
>=
0
&&
varID
<
streamInqNvars
(
streamID
));
collWaitAll
();
int
dataHeaderID
=
memtype
==
MEMTYPE_DOUBLE
?
DATA_HEADER_DOUBLE
:
DATA_HEADER_FLOAT
;
struct
winHeaderEntry
dataHeader
=
{
.
id
=
dataHeaderID
,
.
specific
.
dataRecord
=
{
varID
,
numMissVals
},
.
offset
=
-
1
};
struct
winHeaderEntry
dataHeader
=
{
.
id
=
dataHeaderID
,
.
specific
.
dataRecord
=
{
varID
,
(
int
)
numMissVals
},
.
offset
=
-
1
};
modelWinEnqueue
(
streamIdx
,
dataHeader
,
packData
,
packDataFunc
);
{
struct
winHeaderEntry
partHeader
=
{
.
id
=
PARTDESCMARKER
,
.
offset
=
0
};
...
...
@@ -748,15 +748,17 @@ pioWriteTimestep(void)
}
void
cdiPioStreamWriteVarPart_
(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
int
numMissVals
,
Xt_idxlist
partDesc
)
cdiPioStreamWriteVarPart_
(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
size_t
numMissVals
,
Xt_idxlist
partDesc
)
{
if
(
CDI_Debug
)
Message
(
"streamID = %d varID = %d"
,
streamID
,
varID
);
int
chunk
=
xt_idxlist_get_num_indices
(
partDesc
);
xassert
(
chunk
==
0
||
data
);
void
(
*
myStreamWriteVarPart
)(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
in
t
numMissVals
,
Xt_idxlist
partDesc
)
=
(
void
(
*
)(
int
,
int
,
int
,
const
void
*
,
in
t
,
Xt_idxlist
))
namespaceSwitchGet
(
NSSWITCH_STREAM_WRITE_VAR_PART_
).
func
;
void
(
*
myStreamWriteVarPart
)(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
size_
t
numMissVals
,
Xt_idxlist
partDesc
)
=
(
void
(
*
)(
int
,
int
,
int
,
const
void
*
,
size_
t
,
Xt_idxlist
))
namespaceSwitchGet
(
NSSWITCH_STREAM_WRITE_VAR_PART_
).
func
;
if
(
!
myStreamWriteVarPart
)
xabort
(
"local part writing is unsupported!"
);
...
...
This diff is collapsed.
Click to expand it.
src/pio_interface.h
+
3
−
1
View file @
7e036074
...
...
@@ -27,7 +27,9 @@ void memcpyPackFunc(void *dataDesc, void *buf, int size, int *pos, void *context
extern
float
cdiPIOpartInflate_
;
void
cdiPioStreamWriteVarPart_
(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
int
numMissVals
,
Xt_idxlist
partDesc
);
void
cdiPioStreamWriteVarPart_
(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
size_t
numMissVals
,
Xt_idxlist
partDesc
);
void
cdiPioClientStreamWinInit
(
int
streamID
);
void
cdiPioClientStreamWinCreate
(
int
streamID
,
struct
collSpec
*
cspec
);
...
...
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