GitLab maintenance scheduled for Today, 2019-04-24, from 12:00 to 13:00 CDT - Services will be unavailable during this time.

Commit ddc1891d authored by Francois Tessier's avatar Francois Tessier

Reset variables on Write/Read initialization. One TAPIOCA object needed for all the I/O calls.

parent 3c412044
......@@ -32,7 +32,7 @@ int main (int argc, char * argv[])
MPI_File file_handle;
MPI_Status status;
char output[100];
Tapioca tp, tp2;
Tapioca tp;
int64_t chunkCount[1], chunkOffset[1];
int chunkSize[1];
......@@ -138,7 +138,7 @@ int main (int argc, char * argv[])
/*****************/
/* INIT TAPIOCA */
/*****************/
tp2.ReadInitialize (output, chunkCount, chunkSize, chunkOffset, 1, hdr, ARRAY_OF_STRUCTURES, sub_comm);
tp.ReadInitialize (output, chunkCount, chunkSize, chunkOffset, 1, hdr, ARRAY_OF_STRUCTURES, sub_comm);
/*****************/
start_time = MPI_Wtime();
......@@ -151,7 +151,7 @@ int main (int argc, char * argv[])
offset = scan_size * particle_size;
tp2.Read (file_handle, offset, xx_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, xx_r, num_particles, MPI_FLOAT, &status);
MPI_File_close (&file_handle);
......
......@@ -24,7 +24,6 @@ int main (int argc, char * argv[])
MPI_Status status;
char output[100];
Tapioca tp;
Tapioca tp2;
int64_t chunkCount[9], chunkOffset[9];
int chunkSize[9];
......@@ -202,7 +201,7 @@ int main (int argc, char * argv[])
/*****************/
/* INIT TAPIOCA */
/*****************/
tp2.ReadInitialize (output, chunkCount, chunkSize, chunkOffset, 9, hdr, ARRAY_OF_STRUCTURES, sub_comm);
tp.ReadInitialize (output, chunkCount, chunkSize, chunkOffset, 9, hdr, ARRAY_OF_STRUCTURES, sub_comm);
/*****************/
start_time = MPI_Wtime();
......@@ -215,31 +214,31 @@ int main (int argc, char * argv[])
offset = scan_size * particle_size;
tp2.Read (file_handle, offset, xx_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, xx_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, yy_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, yy_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, zz_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, zz_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, vx_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, vx_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, vy_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, vy_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, vz_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, vz_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, phi_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, phi_r, num_particles, MPI_FLOAT, &status);
offset += num_particles * sizeof(float);
tp2.Read (file_handle, offset, pid_r, num_particles, MPI_LONG_LONG, &status);
tp.Read (file_handle, offset, pid_r, num_particles, MPI_LONG_LONG, &status);
offset += num_particles * sizeof(int64_t);
tp2.Read (file_handle, offset, mask_r, num_particles, MPI_UNSIGNED_SHORT, &status);
tp.Read (file_handle, offset, mask_r, num_particles, MPI_UNSIGNED_SHORT, &status);
MPI_File_close (&file_handle);
......
......@@ -24,7 +24,6 @@ int main (int argc, char * argv[])
MPI_Status status;
char output[100];
Tapioca tp;
Tapioca tp2;
int64_t chunkCount[9], chunkOffset[9];
int chunkSize[9];
......@@ -202,7 +201,7 @@ int main (int argc, char * argv[])
/*****************/
/* INIT TAPIOCA */
/*****************/
tp2.ReadInitialize (output, chunkCount, chunkSize, chunkOffset, 9, hdr, ARRAY_OF_STRUCTURES, sub_comm);
tp.ReadInitialize (output, chunkCount, chunkSize, chunkOffset, 9, hdr, ARRAY_OF_STRUCTURES, sub_comm);
/*****************/
start_time = MPI_Wtime();
......@@ -215,31 +214,31 @@ int main (int argc, char * argv[])
offset = scan_size * sizeof(float);
tp2.Read (file_handle, offset, xx_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, xx_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(float);
tp2.Read (file_handle, offset, yy_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, yy_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(float);
tp2.Read (file_handle, offset, zz_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, zz_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(float);
tp2.Read (file_handle, offset, vx_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, vx_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(float);
tp2.Read (file_handle, offset, vy_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, vy_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(float);
tp2.Read (file_handle, offset, vz_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, vz_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(float);
tp2.Read (file_handle, offset, phi_r, num_particles, MPI_FLOAT, &status);
tp.Read (file_handle, offset, phi_r, num_particles, MPI_FLOAT, &status);
offset += (sub_particles - scan_size) * sizeof(float) + scan_size * sizeof(int64_t);
tp2.Read (file_handle, offset, pid_r, num_particles, MPI_LONG_LONG, &status);
tp.Read (file_handle, offset, pid_r, num_particles, MPI_LONG_LONG, &status);
offset += (sub_particles - scan_size) * sizeof(int64_t) + scan_size * sizeof(uint16_t);
tp2.Read (file_handle, offset, mask_r, num_particles, MPI_UNSIGNED_SHORT, &status);
tp.Read (file_handle, offset, mask_r, num_particles, MPI_UNSIGNED_SHORT, &status);
MPI_File_close (&file_handle);
......
#!/bin/bash
NODES=1024
NODES=64
PPN=16
NPROCS=$((NODES*PPN))
TARGET="/projects/visualization/ftessier/debug"
......@@ -31,7 +31,7 @@ function updateSettings()
SETTINGS="$SETTINGS BGLOCKLESSMPIO_F_TYPE=0x47504653"
}
for run in 0 1 2
for run in 0
do
rm $TARGET/*
updateSettings
......
......@@ -2,8 +2,6 @@
Tapioca::Tapioca ()
{
this->SetDefaultValues ();
this->ParseEnvVariables ();
}
......
......@@ -8,7 +8,10 @@ void Tapioca::ReadInitialize (char *filename, int64_t *chunkCount, int *chunkSiz
double startInitTime, endInitTime, startElectTime, endElectTime;
startInitTime = MPI_Wtime();
#endif
this->SetDefaultValues ();
this->ParseEnvVariables ();
this->filename_ = filename;
this->nChunks_ = nChunks;
this->chunksIndexMatching.resize (this->nChunks_);
......
......@@ -8,6 +8,9 @@ void Tapioca::WriteInitialize (char *filename, int64_t *chunkCount, int *chunkSi
double startInitTime, endInitTime, startElectTime, endElectTime;
startInitTime = MPI_Wtime();
#endif
this->SetDefaultValues ();
this->ParseEnvVariables ();
this->filename_ = filename;
this->nChunks_ = nChunks;
......
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