Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
0de43401
Commit
0de43401
authored
May 18, 2018
by
Berenger Bramas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the Call to MPI where const cast is needed for old implementation
parent
0d25c845
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Src/Files/FMpiFmaGenericLoader.hpp
Src/Files/FMpiFmaGenericLoader.hpp
+3
-3
No files found.
Src/Files/FMpiFmaGenericLoader.hpp
View file @
0de43401
...
@@ -113,7 +113,7 @@ public:
...
@@ -113,7 +113,7 @@ public:
std
::
cout
<<
"FMpiFmaGenericWriter only works with binary file (.bfma)."
<<
std
::
endl
;
std
::
cout
<<
"FMpiFmaGenericWriter only works with binary file (.bfma)."
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
int
fileIsOpen
=
MPI_File_open
(
_parallelManager
->
global
().
getComm
(),
inFilename
.
c_str
(
),
int
fileIsOpen
=
MPI_File_open
(
_parallelManager
->
global
().
getComm
(),
const_cast
<
char
*>
(
inFilename
.
c_str
()
),
MPI_MODE_WRONLY
|
MPI_MODE_CREATE
,
MPI_INFO_NULL
,
&
_mpiFile
);
MPI_MODE_WRONLY
|
MPI_MODE_CREATE
,
MPI_INFO_NULL
,
&
_mpiFile
);
// Is it open?
// Is it open?
if
(
fileIsOpen
!=
MPI_SUCCESS
){
if
(
fileIsOpen
!=
MPI_SUCCESS
){
...
@@ -306,7 +306,7 @@ public:
...
@@ -306,7 +306,7 @@ public:
MPI_Type_size
(
MPI_INT
,
&
sizeType
)
;
MPI_Type_size
(
MPI_INT
,
&
sizeType
)
;
_headerSize
+=
sizeType
*
2
;
_headerSize
+=
sizeType
*
2
;
if
(
myRank
==
0
){
if
(
myRank
==
0
){
ierr
=
MPI_File_write_at
(
_mpiFile
,
_headerSize
,
&
nbParticles
,
1
,
mpiFSize_t
,
MPI_STATUS_IGNORE
);
ierr
=
MPI_File_write_at
(
_mpiFile
,
_headerSize
,
const_cast
<
FSize
*>
(
&
nbParticles
)
,
1
,
mpiFSize_t
,
MPI_STATUS_IGNORE
);
}
}
MPI_Type_size
(
mpiFSize_t
,
&
sizeType
)
;
MPI_Type_size
(
mpiFSize_t
,
&
sizeType
)
;
_headerSize
+=
sizeType
*
1
;
_headerSize
+=
sizeType
*
1
;
...
@@ -341,7 +341,7 @@ public:
...
@@ -341,7 +341,7 @@ public:
std
::
vector
<
FReal
>
particles
(
maxPartLeaf
*
_nbDataTowritePerRecord
);
std
::
vector
<
FReal
>
particles
(
maxPartLeaf
*
_nbDataTowritePerRecord
);
// Build the offset for eaxh processes
// Build the offset for eaxh processes
FSize
before
=
0
;
// Number of particles before me (rank < myrank)
FSize
before
=
0
;
// Number of particles before me (rank < myrank)
MPI_Scan
(
&
nbLocalParticles
,
&
before
,
1
,
mpiFSize_t
,
MPI_SUM
,
_parallelManager
->
global
().
getComm
());
MPI_Scan
(
const_cast
<
FSize
*>
(
&
nbLocalParticles
)
,
&
before
,
1
,
mpiFSize_t
,
MPI_SUM
,
_parallelManager
->
global
().
getComm
());
before
-=
nbLocalParticles
;
before
-=
nbLocalParticles
;
MPI_Offset
offset
=
_headerSize
+
sizeType
*
_nbDataTowritePerRecord
*
before
;
MPI_Offset
offset
=
_headerSize
+
sizeType
*
_nbDataTowritePerRecord
*
before
;
//
//
...
...
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