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
fb0161fc
Commit
fb0161fc
authored
7 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Extend tests for advance decomposition setting
parent
3ef8e865
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tests/pio_write.c
+13
-0
13 additions, 0 deletions
tests/pio_write.c
tests/pio_write.h
+3
-0
3 additions, 0 deletions
tests/pio_write.h
tests/pio_write_run.in
+2
-2
2 additions, 2 deletions
tests/pio_write_run.in
tests/simple_model.c
+14
-1
14 additions, 1 deletion
tests/simple_model.c
with
32 additions
and
3 deletions
tests/pio_write.c
+
13
−
0
View file @
fb0161fc
...
...
@@ -188,6 +188,7 @@ parse_long_option(struct model_config *restrict setup,
uuidCreateOptionStr
[]
=
"no-create-uuid"
,
useDistGridOptionStr
[]
=
"no-use-dist-grid"
,
batchedRmaOptionStr
[]
=
"no-batch-rma"
,
presetDecoOptionStr
[]
=
"no-preset-decomposition"
,
datatypeOptionStr
[]
=
"datatype"
,
taxistypeOptionStr
[]
=
"taxis-type"
,
taxisunitOptionStr
[]
=
"taxis-unit"
;
...
...
@@ -335,6 +336,18 @@ parse_long_option(struct model_config *restrict setup,
setup
->
flags
=
(
setup
->
flags
&
~
PIO_WRITE_CONFIG_CREATE_UUID_FLAG
)
|
(
bop
.
value
<<
PIO_WRITE_CONFIG_CREATE_UUID_BIT
);
}
else
if
((
bop
=
parseBooleanLongOption
(
sizeof
(
presetDecoOptionStr
),
presetDecoOptionStr
,
str
)).
matched
)
{
#ifdef USE_MPI
setup
->
flags
=
(
setup
->
flags
&
~
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_FLAG
)
|
(
bop
.
value
<<
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_BIT
);
#else
invalidOptionDie
(
"CDI-PIO option -q%s unavailable in non-MPI mode
\n
"
,
presetDecoOptionStr
+
(
bop
.
invert
?
0
:
3
));
#endif
}
else
if
((
bop
=
parseBooleanLongOption
(
sizeof
(
batchedRmaOptionStr
),
batchedRmaOptionStr
,
str
)).
matched
)
{
...
...
This diff is collapsed.
Click to expand it.
tests/pio_write.h
+
3
−
0
View file @
fb0161fc
...
...
@@ -18,11 +18,14 @@ enum {
PIO_WRITE_CONFIG_CREATE_UUID_BIT
,
PIO_WRITE_CONFIG_CREATE_CURVILINEAR_GRID_BIT
,
PIO_WRITE_CONFIG_USE_DIST_GRID_BIT
,
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_BIT
,
PIO_WRITE_CONFIG_CHECKSUM_FLAG
=
1
<<
PIO_WRITE_CONFIG_CHECKSUM_BIT
,
PIO_WRITE_CONFIG_CREATE_UUID_FLAG
=
1
<<
PIO_WRITE_CONFIG_CREATE_UUID_BIT
,
PIO_WRITE_CONFIG_CREATE_CURVILINEAR_GRID_FLAG
=
1
<<
PIO_WRITE_CONFIG_CREATE_CURVILINEAR_GRID_BIT
,
PIO_WRITE_CONFIG_USE_DIST_GRID_FLAG
=
1
<<
PIO_WRITE_CONFIG_USE_DIST_GRID_BIT
,
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_FLAG
=
1
<<
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_BIT
,
};
...
...
This diff is collapsed.
Click to expand it.
tests/pio_write_run.in
+
2
−
2
View file @
fb0161fc
...
...
@@ -8,14 +8,14 @@ fi
mpi_task_num="${mpi_task_num-4}"
suffix="${suffix-grb}"
if [ "@USE_MPI@" = yes ]; then
variations="-qno-batch-rma -qcache-redists -qcreate-curvilinear-grid"
variations="-qno-batch-rma -qcache-redists -qcreate-curvilinear-grid
-qpreset-decomposition=true
"
else
variations="-qcreate-curvilinear-grid"
fi
test_variation()
{
exec 5>&1 6>&2 >"$LOG" 2>&1
echo "creating data" >&2
echo "creating data
with $1
" >&2
variation=$1
../libtool --mode=execute \
@MPI_LAUNCH@ \
...
...
This diff is collapsed.
Click to expand it.
tests/simple_model.c
+
14
−
1
View file @
fb0161fc
...
...
@@ -85,6 +85,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
size_t
varslice_size
=
0
,
varsliceF_size
=
0
;
#if USE_MPI
int
*
chunks
=
NULL
,
*
displs
=
NULL
,
comm_size
=
1
;
Xt_idxlist
*
partDescPreset
=
NULL
;
#endif
#if USE_MPI
...
...
@@ -114,6 +115,10 @@ modelRun(struct model_config setup, MPI_Comm comm)
vlistID
=
vlistCreate
();
varDesc
=
(
struct
varDesc_t
*
)
Malloc
(
nVars
*
sizeof
(
varDesc
[
0
]));
#if USE_MPI
if
(
setup
.
flags
&
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_FLAG
)
partDescPreset
=
(
Xt_idxlist
*
)
Malloc
(
nVars
*
sizeof
(
*
partDescPreset
));
#endif
for
(
size_t
varIdx
=
0
;
varIdx
<
nVars
;
varIdx
++
)
{
int
varLevs
=
(
int
)
cdi_repeatable_random
()
%
4
;
...
...
@@ -182,6 +187,8 @@ modelRun(struct model_config setup, MPI_Comm comm)
.
nstrides
=
chunkSize
,
.
stride
=
1
},
1
);
partDescriptionSet:
;
}
if
(
setup
.
flags
&
PIO_WRITE_CONFIG_PRESET_DECOMPOSITION_FLAG
)
partDescPreset
[
varIdx
]
=
varDesc
[
varIdx
].
partDesc
;
#endif
varDesc
[
varIdx
].
code
=
GRIB_USERDEF
+
(
int
)
varIdx
;
vlistDefVarCode
(
vlistID
,
varDesc
[
varIdx
].
id
,
varDesc
[
varIdx
].
code
);
...
...
@@ -201,7 +208,12 @@ modelRun(struct model_config setup, MPI_Comm comm)
int
streamID
=
composeStream
(
&
filename
,
fname_prefix
,
tfID
,
setup
.
suffix
,
setup
.
filetype
);
streamDefVlist
(
streamID
,
vlistID
);
#ifdef USE_MPI
if
(
partDescPreset
)
cdiPioStreamDefDecomposedVlist
(
streamID
,
vlistID
,
partDescPreset
);
else
#endif
streamDefVlist
(
streamID
,
vlistID
);
vdate
=
19850101
;
vtime
=
120000
;
...
...
@@ -357,6 +369,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
}
gridDestroy
(
gridID
);
#if USE_MPI
Free
(
partDescPreset
);
Free
(
displs
);
Free
(
chunks
);
Free
(
var
);
...
...
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