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
8a6740c4
Commit
8a6740c4
authored
7 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Check that variables can be processed by YAXT.
parent
0aa86097
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pio_client.c
+25
-0
25 additions, 0 deletions
src/pio_client.c
with
25 additions
and
0 deletions
src/pio_client.c
+
25
−
0
View file @
8a6740c4
...
...
@@ -3,6 +3,7 @@
#endif
#include
<ctype.h>
#include
<errno.h>
#include
<yaxt.h>
...
...
@@ -89,9 +90,33 @@ cdiPioClientStreamOpen(const char *filename, char filemode,
return
fileID
;
}
static
void
checkVlistForPIO
(
int
vlistID
)
{
int
nVars
=
vlistNvars
(
vlistID
);
int
varShape
[
3
];
for
(
int
varID
=
0
;
varID
<
nVars
;
++
varID
)
{
cdiPioQueryVarDims
(
varShape
,
vlistID
,
varID
);
intmax_t
size
=
1
;
for
(
size_t
i
=
0
;
i
<
3
;
++
i
)
size
*=
varShape
[
i
];
if
(
size
>
XT_INT_MAX
)
{
errno
=
EOVERFLOW
;
SysError
(
"CDI Variable too large for YAXT,"
" use configure with larger index type
\n
"
"vlistID=%d, varID=%d, variable size=%zu"
,
vlistID
,
varID
,
(
size_t
)
size
);
}
}
}
static
void
cdiPioClientStreamDefVlist_
(
int
streamID
,
int
vlistID
)
{
checkVlistForPIO
(
vlistID
);
cdiStreamDefVlist_
(
streamID
,
vlistID
);
int
clientRank
=
commInqRankModel
(),
numClients
=
cdiPioCommInqSizeClients
(),
...
...
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