Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kirill Terekhov
INMOST
Commits
1592c2a1
Commit
1592c2a1
authored
Nov 06, 2020
by
Kirill Terekhov
Browse files
fix output size mismatch in .pmf file writer
parent
a358cf08
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/IO/mesh_pmf_file.cpp
View file @
1592c2a1
...
@@ -427,8 +427,10 @@ namespace INMOST
...
@@ -427,8 +427,10 @@ namespace INMOST
REPORT_STR
(
"Parallel write"
);
REPORT_STR
(
"Parallel write"
);
int
ierr
;
int
ierr
;
INMOST_DATA_ENUM_TYPE
numprocs
=
GetProcessorsNumber
(),
k
;
INMOST_DATA_ENUM_TYPE
numprocs
=
GetProcessorsNumber
(),
k
;
INMOST_DATA_BIG_ENUM_TYPE
datasize
=
static_cast
<
INMOST_DATA_ENUM_TYPE
>
(
out
.
tellp
())
,
offset
;
INMOST_DATA_BIG_ENUM_TYPE
datasize
,
offset
;
std
::
vector
<
INMOST_DATA_BIG_ENUM_TYPE
>
datasizes
(
numprocs
,
0
),
offsets
(
numprocs
,
0
);
std
::
vector
<
INMOST_DATA_BIG_ENUM_TYPE
>
datasizes
(
numprocs
,
0
),
offsets
(
numprocs
,
0
);
std
::
string
local_data
(
out
.
str
());
datasize
=
local_data
.
size
();
REPORT_VAL
(
"local_write_file_size"
,
datasize
);
REPORT_VAL
(
"local_write_file_size"
,
datasize
);
REPORT_MPI
(
ierr
=
MPI_Gather
(
&
datasize
,
1
,
INMOST_MPI_DATA_BIG_ENUM_TYPE
,
&
datasizes
[
0
],
1
,
INMOST_MPI_DATA_BIG_ENUM_TYPE
,
0
,
GetCommunicator
()));
REPORT_MPI
(
ierr
=
MPI_Gather
(
&
datasize
,
1
,
INMOST_MPI_DATA_BIG_ENUM_TYPE
,
&
datasizes
[
0
],
1
,
INMOST_MPI_DATA_BIG_ENUM_TYPE
,
0
,
GetCommunicator
()));
if
(
ierr
!=
MPI_SUCCESS
)
REPORT_MPI
(
MPI_Abort
(
GetCommunicator
(),
__LINE__
));
if
(
ierr
!=
MPI_SUCCESS
)
REPORT_MPI
(
MPI_Abort
(
GetCommunicator
(),
__LINE__
));
...
@@ -474,10 +476,6 @@ namespace INMOST
...
@@ -474,10 +476,6 @@ namespace INMOST
if
(
datasize
)
if
(
datasize
)
{
{
INMOST_DATA_BIG_ENUM_TYPE
shift
=
0
,
chunk
;
INMOST_DATA_BIG_ENUM_TYPE
shift
=
0
,
chunk
;
std
::
string
local_data
(
out
.
str
());
//TODO: remove temporary check!!!
if
(
static_cast
<
INMOST_DATA_BIG_ENUM_TYPE
>
(
local_data
.
size
())
!=
datasize
)
std
::
cout
<<
__FILE__
<<
":"
<<
__LINE__
<<
" different sizes "
<<
local_data
.
size
()
<<
" and "
<<
datasize
<<
std
::
endl
;
//REPORT_MPI(ierr = MPI_File_write_ordered(fh,&local_data[0],static_cast<INMOST_MPI_SIZE>(local_data.size()),MPI_CHAR,&stat));
//REPORT_MPI(ierr = MPI_File_write_ordered(fh,&local_data[0],static_cast<INMOST_MPI_SIZE>(local_data.size()),MPI_CHAR,&stat));
while
(
shift
!=
datasize
)
while
(
shift
!=
datasize
)
{
{
...
...
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