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
3e0f447c
Commit
3e0f447c
authored
11 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Extend close backend call for optional buffer deletion.
parent
57c28978
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/cdi_int.h
+2
-1
2 additions, 1 deletion
src/cdi_int.h
src/pio.c
+1
-1
1 addition, 1 deletion
src/pio.c
src/pio.h
+1
-1
1 addition, 1 deletion
src/pio.h
src/stream.c
+11
-7
11 additions, 7 deletions
src/stream.c
with
15 additions
and
10 deletions
src/cdi_int.h
+
2
−
1
View file @
3e0f447c
...
...
@@ -366,7 +366,8 @@ void
cdiStreamwriteVarChunk_
(
int
streamID
,
int
varID
,
int
memtype
,
const
int
rect
[][
2
],
const
void
*
data
,
int
nmiss
);
void
cdiStreamCloseDefaultDelegate
(
stream_t
*
streamptr
);
cdiStreamCloseDefaultDelegate
(
stream_t
*
streamptr
,
int
recordBufIsToBeDeleted
);
char
*
cdiUnitNamePtr
(
int
cdi_unit
);
...
...
This diff is collapsed.
Click to expand it.
src/pio.c
+
1
−
1
View file @
3e0f447c
...
...
@@ -237,7 +237,7 @@ cdiPioStreamWriteVarChunk_(int streamID, int varID, int memtype,
}
void
cdiPioStreamClose
(
stream_t
*
streamptr
)
cdiPioStreamClose
(
stream_t
*
streamptr
,
int
recordBufIsToBeDeleted
)
{
statusCode
nspStatus
=
namespaceInqResStatus
();
switch
(
nspStatus
)
...
...
This diff is collapsed.
Click to expand it.
src/pio.h
+
1
−
1
View file @
3e0f447c
...
...
@@ -25,7 +25,7 @@ void cdiPioStreamWriteVar_(int streamID, int varID, int memtype,
void
cdiPioStreamWriteVarChunk_
(
int
streamID
,
int
varID
,
int
memtype
,
const
int
rect
[][
2
],
const
void
*
data
,
int
nmiss
);
void
cdiPioStreamClose
(
stream_t
*
streamptr
);
void
cdiPioStreamClose
(
stream_t
*
streamptr
,
int
recordBufIsToBeDeleted
);
#else
typedef
int
MPI_Comm
;
...
...
This diff is collapsed.
Click to expand it.
src/stream.c
+
11
−
7
View file @
3e0f447c
...
...
@@ -1124,7 +1124,7 @@ int streamOpenWrite(const char *filename, int filetype)
}
void
cdiStreamCloseDefaultDelegate
(
stream_t
*
streamptr
)
cdiStreamCloseDefaultDelegate
(
stream_t
*
streamptr
,
int
recordBufIsToBeDeleted
)
{
int
fileID
=
streamptr
->
fileID
;
int
filetype
=
streamptr
->
filetype
;
...
...
@@ -1138,7 +1138,8 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr)
case
FILETYPE_GRB2
:
{
gribClose
(
fileID
);
gribContainersDelete
(
streamptr
);
if
(
recordBufIsToBeDeleted
)
gribContainersDelete
(
streamptr
);
break
;
}
#endif
...
...
@@ -1146,7 +1147,8 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr)
case
FILETYPE_SRV
:
{
fileClose
(
fileID
);
srvDelete
(
streamptr
->
record
->
srvp
);
if
(
recordBufIsToBeDeleted
)
srvDelete
(
streamptr
->
record
->
srvp
);
break
;
}
#endif
...
...
@@ -1154,7 +1156,8 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr)
case
FILETYPE_EXT
:
{
fileClose
(
fileID
);
extDelete
(
streamptr
->
record
->
extp
);
if
(
recordBufIsToBeDeleted
)
extDelete
(
streamptr
->
record
->
extp
);
break
;
}
#endif
...
...
@@ -1162,7 +1165,8 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr)
case
FILETYPE_IEG
:
{
fileClose
(
fileID
);
iegDelete
(
streamptr
->
record
->
iegp
);
if
(
recordBufIsToBeDeleted
)
iegDelete
(
streamptr
->
record
->
iegp
);
break
;
}
#endif
...
...
@@ -1219,10 +1223,10 @@ void streamClose(int streamID)
vlistID
=
streamptr
->
vlistID
;
void
(
*
streamCloseDelegate
)(
stream_t
*
)
void
(
*
streamCloseDelegate
)(
stream_t
*
streamptr
,
int
recordBufIsToBeDeleted
)
=
namespaceSwitchGet
(
NSSWITCH_STREAM_CLOSE_BACKEND
);
streamCloseDelegate
(
streamptr
);
streamCloseDelegate
(
streamptr
,
1
);
if
(
streamptr
->
record
)
{
...
...
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