1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

more I/O benchmark code cleaning

This commit is contained in:
Antonin Portelli 2020-10-07 15:38:41 +01:00
parent 9ba3647bdf
commit 1ba25a0d8c

View File

@ -8,7 +8,6 @@ using namespace Grid;
int main (int argc, char ** argv) int main (int argc, char ** argv)
{ {
#ifdef HAVE_LIME
std::vector<std::string> dir; std::vector<std::string> dir;
unsigned int Ls; unsigned int Ls;
bool rb; bool rb;
@ -40,6 +39,26 @@ int main (int argc, char ** argv)
MSG << "Grid is setup to use " << threads << " threads" << std::endl; MSG << "Grid is setup to use " << threads << " threads" << std::endl;
MSG << "MPI partition " << mpi << std::endl; MSG << "MPI partition " << mpi << std::endl;
MSG << SEP << std::endl;
MSG << "Benchmark Grid std write" << std::endl;
MSG << SEP << std::endl;
for (auto &d: dir)
{
MSG << "-- Directory " << d << std::endl;
writeBenchmark<LatticeFermion>(GridDefaultLatt(), d + "/ioBench",
stdWrite<LatticeFermion>, Ls, rb);
}
MSG << SEP << std::endl;
MSG << "Benchmark Grid std read" << std::endl;
MSG << SEP << std::endl;
for (auto &d: dir)
{
MSG << "-- Directory " << d << std::endl;
readBenchmark<LatticeFermion>(GridDefaultLatt(), d + "/ioBench",
stdRead<LatticeFermion>, Ls, rb);
}
#ifdef HAVE_LIME
MSG << SEP << std::endl; MSG << SEP << std::endl;
MSG << "Benchmark Grid C-Lime write" << std::endl; MSG << "Benchmark Grid C-Lime write" << std::endl;
MSG << SEP << std::endl; MSG << SEP << std::endl;
@ -58,6 +77,7 @@ int main (int argc, char ** argv)
readBenchmark<LatticeFermion>(GridDefaultLatt(), d + "/ioBench", readBenchmark<LatticeFermion>(GridDefaultLatt(), d + "/ioBench",
limeRead<LatticeFermion>, Ls, rb); limeRead<LatticeFermion>, Ls, rb);
} }
#endif
// MSG << SEP << std::endl; // MSG << SEP << std::endl;
// MSG << "Benchmark single precision Lime write" << std::endl; // MSG << "Benchmark single precision Lime write" << std::endl;
@ -79,6 +99,5 @@ int main (int argc, char ** argv)
Grid_finalize(); Grid_finalize();
#endif
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }