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

Benchmark IO in single and double precision

This commit is contained in:
Antonin Portelli 2018-10-17 20:27:34 +01:00
parent 291bc2a1f0
commit 0ba3d469c7

View File

@ -3,9 +3,6 @@
#define MSG std::cout << GridLogMessage
#define SEP \
"============================================================================="
#ifndef BENCH_IO_LMAX
#define BENCH_IO_LMAX 40
#endif
using namespace Grid;
using namespace QCD;
@ -41,7 +38,7 @@ int main (int argc, char ** argv)
int64_t threads = GridThread::GetThreads();
MSG << "Grid is setup to use " << threads << " threads" << std::endl;
MSG << SEP << std::endl;
MSG << "Benchmark Lime write" << std::endl;
MSG << "Benchmark double precision Lime write" << std::endl;
MSG << SEP << std::endl;
for (auto &d: dir)
{
@ -49,7 +46,8 @@ int main (int argc, char ** argv)
writeBenchmark<LatticeFermion>(GridDefaultLatt(), d + "/ioBench", limeWrite<LatticeFermion>, Ls, rb);
}
MSG << "Benchmark Lime read" << std::endl;
MSG << SEP << std::endl;
MSG << "Benchmark double precision Lime read" << std::endl;
MSG << SEP << std::endl;
for (auto &d: dir)
{
@ -57,6 +55,24 @@ int main (int argc, char ** argv)
readBenchmark<LatticeFermion>(GridDefaultLatt(), d + "/ioBench", limeRead<LatticeFermion>, Ls, rb);
}
MSG << SEP << std::endl;
MSG << "Benchmark single precision Lime write" << std::endl;
MSG << SEP << std::endl;
for (auto &d: dir)
{
MSG << "-- Directory " << d << std::endl;
writeBenchmark<LatticeFermionF>(GridDefaultLatt(), d + "/ioBench", limeWrite<LatticeFermionF>, Ls, rb);
}
MSG << SEP << std::endl;
MSG << "Benchmark single precision Lime read" << std::endl;
MSG << SEP << std::endl;
for (auto &d: dir)
{
MSG << "-- Directory " << d << std::endl;
readBenchmark<LatticeFermionF>(GridDefaultLatt(), d + "/ioBench", limeRead<LatticeFermionF>, Ls, rb);
}
Grid_finalize();
return EXIT_SUCCESS;