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
7d1c671c
Commit
7d1c671c
authored
9 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Extract function to open test streams.
parent
1097d35d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!34
Version 2.2.0
,
!13
Consolidation with CDI-PIO (develop)
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tests/deco2d_model.c
+1
-3
1 addition, 3 deletions
tests/deco2d_model.c
tests/simple_model.c
+1
-3
1 addition, 3 deletions
tests/simple_model.c
tests/simple_model_helper.c
+13
-0
13 additions, 0 deletions
tests/simple_model_helper.c
tests/simple_model_helper.h
+2
-0
2 additions, 0 deletions
tests/simple_model_helper.h
with
17 additions
and
6 deletions
tests/deco2d_model.c
+
1
−
3
View file @
7d1c671c
...
...
@@ -239,9 +239,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
{
for
(
size_t
varIdx
=
0
;
varIdx
<
nVars
;
++
varIdx
)
varDesc
[
varIdx
].
checksum_state
=
0
;
composeFilename
(
&
filename
,
fname_prefix
,
tfID
,
setup
.
suffix
);
int
streamID
=
streamOpenWrite
(
filename
,
setup
.
filetype
);
xassert
(
streamID
>=
0
);
int
streamID
=
composeStream
(
&
filename
,
fname_prefix
,
tfID
,
setup
.
suffix
,
setup
.
filetype
);
streamDefVlist
(
streamID
,
vlistID
);
vdate
=
19850101
;
...
...
This diff is collapsed.
Click to expand it.
tests/simple_model.c
+
1
−
3
View file @
7d1c671c
...
...
@@ -179,9 +179,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
{
for
(
size_t
varIdx
=
0
;
varIdx
<
nVars
;
++
varIdx
)
varDesc
[
varIdx
].
checksum_state
=
0
;
composeFilename
(
&
filename
,
fname_prefix
,
tfID
,
setup
.
suffix
);
int
streamID
=
streamOpenWrite
(
filename
,
setup
.
filetype
);
xassert
(
streamID
>=
0
);
int
streamID
=
composeStream
(
&
filename
,
fname_prefix
,
tfID
,
setup
.
suffix
,
setup
.
filetype
);
streamDefVlist
(
streamID
,
vlistID
);
vdate
=
19850101
;
...
...
This diff is collapsed.
Click to expand it.
tests/simple_model_helper.c
+
13
−
0
View file @
7d1c671c
...
...
@@ -82,6 +82,19 @@ composeFilename(char **buf, const char *fname_prefix, int tfID, const char *suff
*
buf
=
filename
;
}
int
composeStream
(
char
**
buf
,
const
char
*
fname_prefix
,
int
tfID
,
const
char
*
suffix
,
int
filetype
)
{
composeFilename
(
buf
,
fname_prefix
,
tfID
,
suffix
);
int
streamID
=
streamOpenWrite
(
*
buf
,
filetype
);
if
(
streamID
<
0
)
{
fprintf
(
stderr
,
"Failed to open stream: %s
\n
"
,
cdiStringError
(
streamID
));
abort
();
}
return
streamID
;
}
#if defined USE_MPI && !defined HAVE_PPM_CORE
static
int32_t
uniform_partition_start
(
struct
PPM_extent
set_interval
,
int
nparts
,
int
part_idx
);
...
...
This diff is collapsed.
Click to expand it.
tests/simple_model_helper.h
+
2
−
0
View file @
7d1c671c
...
...
@@ -38,6 +38,8 @@ void time_t2cditime(time_t t, int *date, int *timeofday);
void
composeFilename
(
char
**
buf
,
const
char
*
fname_prefix
,
int
tfID
,
const
char
*
suffix
);
int
composeStream
(
char
**
buf
,
const
char
*
fname_prefix
,
int
tfID
,
const
char
*
suffix
,
int
filetype
);
#if defined(USE_MPI) && !defined(HAVE_PPM_CORE)
struct
PPM_extent
{
...
...
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