Skip to content

Commit

Permalink
minor fix with tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Junmin Gu committed Sep 9, 2024
1 parent 309ad55 commit e6a2151
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions examples/8c_benchmark_ptl_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ std::vector<std::string> getBackends(bool bpOnly)
res.emplace_back(".bp");
#endif

if (bpOnly) {
if (res.size() == 0)
std::cerr<<" BP is not supported "<<std::endl;
return res;
}

#if openPMD_HAVE_HDF5
if (!bpOnly)
res.emplace_back(".h5");
Expand Down Expand Up @@ -416,18 +422,17 @@ void parse(TestInput &input, std::string line)
// Apply a specific backend instead of trying all available ones
if (vec.at(0).compare("backend") == 0)
{
if (vec[1][0] != '.')
input.m_Backend += '.';

input.m_Backend += vec[1];
if (vec[1][0] != '.')
input.m_Backend += '.';
input.m_Backend += vec[1];
}

if (vec[0].compare("joinedArray") == 0)
{
if (vec[1].size() > 0) {
if ( (vec[1][0] == 't') or (vec[1][0] == 'T') )
input.m_UseJoinedDim = true;
}
if ( (vec[1][0] == 't') or (vec[1][0] == 'T') )
input.m_UseJoinedDim = true;
}
return;
}

Expand Down Expand Up @@ -509,17 +514,17 @@ void doWork(TestInput & input)
if ( 0 < input.m_Backend.size() )
{
BasicParticlePattern p(input);
p.printMe();
p.run();
p.printMe();
p.run();
}
else
{
for (auto const &which : backends)
{
input.m_Backend = which;
BasicParticlePattern p(input);
p.printMe();
p.run();
BasicParticlePattern p(input);
p.printMe();
p.run();
}
}
}
Expand Down Expand Up @@ -812,4 +817,3 @@ void BasicParticlePattern::printMe()
<< "\n\t NumPtls (millions) per rank/step: "<<m_Input.m_PtlMin/1000000<<" to "<<m_Input.m_PtlMax/1000000
<< std::endl;
} // printMe

0 comments on commit e6a2151

Please sign in to comment.