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
b97e519e
Commit
b97e519e
authored
7 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Extend tests for advance decomposition setting
parent
e938b326
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
+11
-1
11 additions, 1 deletion
tests/pio_write.c
tests/pio_write.h
+2
-0
2 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
+13
-1
13 additions, 1 deletion
tests/simple_model.c
with
28 additions
and
4 deletions
tests/pio_write.c
+
11
−
1
View file @
b97e519e
...
...
@@ -184,7 +184,8 @@ parse_long_option(struct model_config *restrict setup, int pioConfHandle, pioRol
static
const
char
cacheRedistStr
[]
=
"no-cache-redists"
,
pioRoleSchemeOptionStr
[]
=
"pio-role-scheme"
,
curvilinearGridOptionStr
[]
=
"no-create-curvilinear-grid"
,
uuidCreateOptionStr
[]
=
"no-create-uuid"
,
useDistGridOptionStr
[]
=
"no-use-dist-grid"
,
batchedRmaOptionStr
[]
=
"no-batch-rma"
,
datatypeOptionStr
[]
=
"datatype"
,
taxistypeOptionStr
[]
=
"taxis-type"
,
taxisunitOptionStr
[]
=
"taxis-unit"
;
presetDecoOptionStr
[]
=
"no-preset-decomposition"
,
datatypeOptionStr
[]
=
"datatype"
,
taxistypeOptionStr
[]
=
"taxis-type"
,
taxisunitOptionStr
[]
=
"taxis-unit"
;
static
const
struct
string2int
datatypeArgMap
[]
=
{
{
"pack"
,
CDI_DATATYPE_PACK
},
{
"pack1"
,
CDI_DATATYPE_PACK1
},
{
"pack2"
,
CDI_DATATYPE_PACK2
},
{
"pack3"
,
CDI_DATATYPE_PACK3
},
{
"pack4"
,
CDI_DATATYPE_PACK4
},
{
"pack5"
,
CDI_DATATYPE_PACK5
},
...
...
@@ -276,6 +277,15 @@ parse_long_option(struct model_config *restrict setup, int pioConfHandle, pioRol
{
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
)
{
#ifdef USE_MPI
...
...
This diff is collapsed.
Click to expand it.
tests/pio_write.h
+
2
−
0
View file @
b97e519e
...
...
@@ -19,10 +19,12 @@ 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
,
};
struct
model_config
...
...
This diff is collapsed.
Click to expand it.
tests/pio_write_run.in
+
2
−
2
View file @
b97e519e
...
...
@@ -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
+
13
−
1
View file @
b97e519e
...
...
@@ -86,6 +86,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
...
...
@@ -113,6 +114,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
;
...
...
@@ -167,6 +172,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
varDesc
[
varIdx
].
partDesc
=
xt_idxstripes_new
(
&
(
struct
Xt_stripe
){
.
start
=
start
,
.
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
);
...
...
@@ -183,7 +189,12 @@ modelRun(struct model_config setup, MPI_Comm comm)
for
(
size_t
varIdx
=
0
;
varIdx
<
nVars
;
++
varIdx
)
varDesc
[
varIdx
].
checksum_state
=
0
;
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
;
...
...
@@ -322,6 +333,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