Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
H5hut
src
Commits
81403782
Commit
81403782
authored
Jun 20, 2019
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
H5Block3dSetView() does not dissolve ghost-zones any more
- new API function H5Block3dSetViewDissolveGhostZones() added
parent
6a4d711b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
20 deletions
+69
-20
src/Fortran/H5Block_model.c
src/Fortran/H5Block_model.c
+2
-1
src/h5core/h5b_model.c
src/h5core/h5b_model.c
+20
-17
src/include/H5Block_model.h
src/include/H5Block_model.h
+45
-1
src/include/h5core/h5b_model.h
src/include/h5core/h5b_model.h
+2
-1
No files found.
src/Fortran/H5Block_model.c
View file @
81403782
...
...
@@ -69,7 +69,8 @@ h5bl_3d_setview (
f
,
*
i_start
-
1
,
*
i_end
-
1
,
*
j_start
-
1
,
*
j_end
-
1
,
*
k_start
-
1
,
*
k_end
-
1
));
*
k_start
-
1
,
*
k_end
-
1
,
0
));
}
#define h5bl_3d_getview FC_MANGLING ( \
...
...
src/h5core/h5b_model.c
View file @
81403782
...
...
@@ -417,7 +417,6 @@ _dissolve_ghostzones (
p_el
=
p_save
;
}
}
}
h5_free
(
p_begin
);
H5_RETURN
(
H5_SUCCESS
);
...
...
@@ -544,7 +543,8 @@ h5b_3d_set_view (
const
h5_size_t
j_start
,
/*!< IN: start index of \c j */
const
h5_size_t
j_end
,
/*!< IN: end index of \c j */
const
h5_size_t
k_start
,
/*!< IN: start index of \c k */
const
h5_size_t
k_end
/*!< IN: end index of \c k */
const
h5_size_t
k_end
,
/*!< IN: end index of \c k */
const
h5_int64_t
dissolve_ghostzones
/*!< IN: bool: dissolve ghost-zones */
)
{
h5_file_p
f
=
(
h5_file_p
)
fh
;
H5_CORE_API_ENTER
(
h5_err_t
,
...
...
@@ -571,7 +571,6 @@ h5b_3d_set_view (
h5b_partition_t
*
write_layout
;
TRY
(
user_layout
=
h5_calloc
(
f
->
nprocs
,
sizeof
(
*
user_layout
)));
TRY
(
write_layout
=
h5_calloc
(
f
->
nprocs
,
sizeof
(
*
write_layout
)));
user_layout
[
f
->
myproc
]
=
b
->
user_layout
[
0
];
...
...
@@ -580,11 +579,7 @@ h5b_3d_set_view (
user_layout
,
1
,
f
->
b
->
partition_mpi_t
,
f
->
props
->
comm
));
_get_max_dimensions
(
f
,
user_layout
);
TRY
(
_dissolve_ghostzones
(
f
,
user_layout
,
write_layout
));
b
->
user_layout
[
0
]
=
user_layout
[
f
->
myproc
];
b
->
write_layout
[
0
]
=
write_layout
[
f
->
myproc
];
//b->user_layout[0] = user_layout[f->myproc];
h5_debug
(
"User layout: %lld:%lld, %lld:%lld, %lld:%lld"
,
(
long
long
)
b
->
user_layout
[
0
].
i_start
,
...
...
@@ -594,17 +589,25 @@ h5b_3d_set_view (
(
long
long
)
b
->
user_layout
[
0
].
k_start
,
(
long
long
)
b
->
user_layout
[
0
].
k_end
);
h5_debug
(
"Ghost-zone layout: %lld:%lld, %lld:%lld, %lld:%lld"
,
(
long
long
)
b
->
write_layout
[
0
].
i_start
,
(
long
long
)
b
->
write_layout
[
0
].
i_end
,
(
long
long
)
b
->
write_layout
[
0
].
j_start
,
(
long
long
)
b
->
write_layout
[
0
].
j_end
,
(
long
long
)
b
->
write_layout
[
0
].
k_start
,
(
long
long
)
b
->
write_layout
[
0
].
k_end
);
if
(
dissolve_ghostzones
)
{
TRY
(
write_layout
=
h5_calloc
(
f
->
nprocs
,
sizeof
(
*
write_layout
)));
TRY
(
_dissolve_ghostzones
(
f
,
user_layout
,
write_layout
));
b
->
write_layout
[
0
]
=
write_layout
[
f
->
myproc
];
h5_debug
(
"Ghost-zone layout: %lld:%lld, %lld:%lld, %lld:%lld"
,
(
long
long
)
b
->
write_layout
[
0
].
i_start
,
(
long
long
)
b
->
write_layout
[
0
].
i_end
,
(
long
long
)
b
->
write_layout
[
0
].
j_start
,
(
long
long
)
b
->
write_layout
[
0
].
j_end
,
(
long
long
)
b
->
write_layout
[
0
].
k_start
,
(
long
long
)
b
->
write_layout
[
0
].
k_end
);
h5_free
(
write_layout
);
}
else
{
b
->
write_layout
[
0
]
=
b
->
user_layout
[
0
];
}
h5_free
(
user_layout
);
h5_free
(
write_layout
);
#else
b
->
write_layout
[
0
]
=
b
->
user_layout
[
0
];
b
->
i_max
=
b
->
user_layout
->
i_end
;
...
...
src/include/H5Block_model.h
View file @
81403782
...
...
@@ -220,7 +220,51 @@ H5Block3dSetView (
h5b_3d_set_view
(
f
,
i_start
,
i_end
,
j_start
,
j_end
,
k_start
,
k_end
));
k_start
,
k_end
,
0
));
}
/**
Defines the partition of the field that this processor owns, using
Fortran ordering: the fastest moving index is \c i.
For writing ghost-zone are dissolved.
This routine uses an MPI_Allgather, so at large concurrency it should
be called as infrequently as possible. For instance, if several
steps/iteration use the same field dimensions, set the layout only
once.
\return \c H5_SUCCESS on success
\return \c H5_FAILURE on error
*/
static
inline
h5_err_t
H5Block3dSetViewDissolveGhostZones
(
const
h5_file_t
f
,
///< [in] File handle.
const
h5_int64_t
i_start
,
///< [in] start index of \c i
const
h5_int64_t
i_end
,
///< [in] end index of \c i
const
h5_int64_t
j_start
,
///< [in] start index of \c j
const
h5_int64_t
j_end
,
///< [in] end index of \c j
const
h5_int64_t
k_start
,
///< [in] start index of \c k
const
h5_int64_t
k_end
///< [in] end index of \c k
)
{
H5_API_ENTER
(
h5_err_t
,
"f=%p, "
"i_start=%lld, i_end=%lld, "
"j_start=%lld, j_end=%lld, "
"k_start=%lld, k_end=%lld"
,
(
h5_file_p
)
f
,
(
long
long
)
i_start
,
(
long
long
)
i_end
,
(
long
long
)
j_start
,
(
long
long
)
j_end
,
(
long
long
)
k_start
,
(
long
long
)
k_end
);
H5_API_RETURN
(
h5b_3d_set_view
(
f
,
i_start
,
i_end
,
j_start
,
j_end
,
k_start
,
k_end
,
1
));
}
/**
...
...
src/include/h5core/h5b_model.h
View file @
81403782
...
...
@@ -51,7 +51,8 @@ h5b_3d_set_view (
const
h5_file_t
,
const
h5_size_t
,
const
h5_size_t
,
const
h5_size_t
,
const
h5_size_t
,
const
h5_size_t
,
const
h5_size_t
);
const
h5_size_t
,
const
h5_size_t
,
const
h5_int64_t
);
h5_err_t
h5b_3d_get_view
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment