Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Podhorszki, Norbert
ADIOS2
Commits
dc81a88f
Commit
dc81a88f
authored
Mar 08, 2020
by
Keichi Takahashi
Browse files
Fix unaligned memory access in SSC engine
parent
ddaeeb07
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/adios2/engine/ssc/SscReader.tcc
View file @
dc81a88f
...
...
@@ -96,8 +96,8 @@ void SscReader::GetDeferredCommon(Variable<T> &variable, T *data)
b.shape.size() == 1 and b.start[0] == 0 and
b.count[0] == 1 and b.shape[0] == 1)
{
data[0] = reinterpret_cast<T *>(
m_Buffer.data() +
b.bufferStart)[0]
;
std::memcpy(data,
m_Buffer.data() +
b.bufferStart,
sizeof(T))
;
}
else
{
...
...
source/adios2/helper/adiosMpiHandshake.cpp
View file @
dc81a88f
...
...
@@ -56,11 +56,13 @@ void MpiHandshake::Test()
size_t
offset
=
PlaceInBuffer
(
stream
,
rank
);
char
mode
=
m_Buffer
[
offset
];
offset
+=
sizeof
(
char
);
int
appMasterRank
=
reinterpret_cast
<
int
*>
(
m_Buffer
.
data
()
+
offset
)[
0
];
int
appMasterRank
;
std
::
memcpy
(
&
appMasterRank
,
m_Buffer
.
data
()
+
offset
,
sizeof
(
appMasterRank
));
offset
+=
sizeof
(
int
);
int
appSize
=
reinterpret_cast
<
int
*>
(
m_Buffer
.
data
()
+
offset
)[
0
];
int
appSize
;
std
::
memcpy
(
&
appSize
,
m_Buffer
.
data
()
+
offset
,
sizeof
(
appSize
));
offset
+=
sizeof
(
int
);
std
::
string
filename
=
m_Buffer
.
data
()
+
offset
;
m_AppsSize
[
appMasterRank
]
=
appSize
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment