Commit 2ebe67d0 authored by berenger-bramas's avatar berenger-bramas
Browse files

Enable the loading of binary file in double with the mpi loader.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@187 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 90c75725
......@@ -95,7 +95,13 @@ public:
// local number to read
particles = new FReal[bufsize];
MPI_File_read_at(file, headDataOffSet + startPart * 4 * sizeof(FReal), particles, bufsize, MPI_FLOAT, &status);
if( sizeof(FReal) == sizeof(float) ){
MPI_File_read_at(file, headDataOffSet + startPart * 4 * sizeof(FReal), particles, bufsize, MPI_FLOAT, &status);
}
else{
MPI_File_read_at(file, headDataOffSet + startPart * 4 * sizeof(FReal), particles, bufsize, MPI_DOUBLE, &status);
}
// check if needed
int count(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment