Skip to content
Snippets Groups Projects
Commit 27e196fb authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

use MPI_FLOAT instead of MPI_REAL4

parent 57284243
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
MPICXX = mpicxx
LINKER = mpicxx
DEFINES = -DNDEBUG
DEFINES = #-DNDEBUG
CFLAGS = -Wall \
-O2 \
#-pg \
......
......@@ -53,15 +53,15 @@ Morton_shuffler::Morton_shuffler(
n[1] = N1;
n[2] = N2;
n[3] = this->d;
this->dinput = new field_descriptor(4, n, MPI_REAL4, MPI_COMM_WORLD);
this->dinput = new field_descriptor(4, n, MPI_FLOAT, MPI_COMM_WORLD);
n[0] = N0/8;
n[1] = N1/8;
n[2] = N2/8;
n[3] = 8*8*8*this->d;
this->drcubbie = new field_descriptor(4, n, MPI_REAL4, MPI_COMM_WORLD);
this->drcubbie = new field_descriptor(4, n, MPI_FLOAT, MPI_COMM_WORLD);
n[0] = (N0/8) * (N1/8) * (N2/8);
n[1] = 8*8*8*this->d;
this->dzcubbie = new field_descriptor(2, n, MPI_REAL4, MPI_COMM_WORLD);
this->dzcubbie = new field_descriptor(2, n, MPI_FLOAT, MPI_COMM_WORLD);
//set up output file descriptor
int out_rank, out_nprocs;
......@@ -78,7 +78,7 @@ Morton_shuffler::Morton_shuffler(
n[0] = ((N0/8) * (N1/8) * (N2/8)) / nfiles;
n[1] = 8*8*8*this->d;
MPI_Comm_split(MPI_COMM_WORLD, this->out_group, out_rank, &this->out_communicator);
this->doutput = new field_descriptor(2, n, MPI_REAL4, this->out_communicator);
this->doutput = new field_descriptor(2, n, MPI_FLOAT, this->out_communicator);
}
Morton_shuffler::~Morton_shuffler()
......@@ -138,14 +138,14 @@ int Morton_shuffler::shuffle(
if (myrank == rid) MPI_Send(
rz,
cubbie_size,
MPI_REAL4,
MPI_FLOAT,
zid,
z,
MPI_COMM_WORLD);
else MPI_Recv(
rtmp + zz*cubbie_size,
cubbie_size,
MPI_REAL4,
MPI_FLOAT,
rid,
z,
MPI_COMM_WORLD,
......
......@@ -163,7 +163,7 @@ int fftwf_get_descriptors_3D(
ntmp[0] = n0;
ntmp[1] = n1;
ntmp[2] = n2;
*fr = new field_descriptor(3, ntmp, MPI_REAL4, MPI_COMM_WORLD);
*fr = new field_descriptor(3, ntmp, MPI_FLOAT, MPI_COMM_WORLD);
ntmp[0] = n0;
ntmp[1] = n1;
ntmp[2] = n2/2+1;
......
......@@ -160,7 +160,7 @@ field_descriptor::field_descriptor(
tsubsizes,
tstarts,
MPI_ORDER_C,
MPI_REAL4,
MPI_FLOAT,
&this->mpi_array_dtype);
MPI_Type_commit(&this->mpi_array_dtype);
}
......@@ -232,15 +232,15 @@ int field_descriptor::read(
MPI_File_set_view(
f,
0,
MPI_REAL4,
MPI_FLOAT,
this->mpi_array_dtype,
"native", //this needs to be made more general
"external32", //this needs to be made more general
info);
MPI_File_read_all(
f,
buffer,
read_size,
MPI_REAL4,
MPI_FLOAT,
MPI_STATUS_IGNORE);
MPI_File_close(&f);
}
......@@ -271,7 +271,7 @@ int field_descriptor::write(
MPI_File_set_view(
f,
0,
MPI_REAL4,
MPI_FLOAT,
this->mpi_array_dtype,
"native", //this needs to be made more general
info);
......@@ -279,7 +279,7 @@ int field_descriptor::write(
f,
buffer,
read_size,
MPI_REAL4,
MPI_FLOAT,
MPI_STATUS_IGNORE);
MPI_File_close(&f);
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment