Skip to content

Commit

Permalink
Merge pull request #1097 from Iximiel/benchmark-header
Browse files Browse the repository at this point in the history
Adding a small header to the benchmark utility
  • Loading branch information
GiovanniBussi authored Jul 12, 2024
2 parents 6ceb747 + cb2fb77 commit ce48b26
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/cltools/Benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ int Benchmark::main(FILE* in, FILE*out,Communicator& pc) {
log.link(log_dev_null.get());
}
log.setLinePrefix("BENCH: ");

log <<"Welcome to PLUMED benchmark\n";
std::vector<Kernel> kernels;

// perform comparative analysis
Expand Down Expand Up @@ -589,13 +589,15 @@ int Benchmark::main(FILE* in, FILE*out,Communicator& pc) {
{
std::string paths;
parse("--kernel",paths);
log <<"Using --kernel=" << paths << "\n";
allpaths=Tools::getWords(paths,":");
}

std::vector<std::string> allplumed;
{
std::string paths;
parse("--plumed",paths);
log <<"Using --plumed=" << paths << "\n";
allplumed=Tools::getWords(paths,":");
}

Expand Down Expand Up @@ -628,27 +630,36 @@ int Benchmark::main(FILE* in, FILE*out,Communicator& pc) {
// read other flags:
bool shuffled=false;
parseFlag("--shuffled",shuffled);
if (shuffled)
log << "Using --shuffled\n";
int nf; parse("--nsteps",nf);
log << "Using --nsteps=" << nf << "\n";
unsigned natoms; parse("--natoms",natoms);

log << "Using --natoms=" << natoms << "\n";
double maxtime; parse("--maxtime",maxtime);
log << "Using --maxtime=" << maxtime << "\n";

bool domain_decomposition=false;
parseFlag("--domain-decomposition",domain_decomposition);
if (domain_decomposition)
log << "Using --domain-decomposition\n";

if(pc.Get_size()>1) domain_decomposition=true;
if(domain_decomposition) shuffled=true;

double timeToSleep;
parse("--sleep",timeToSleep);
log << "Using --sleep=" << timeToSleep << "\n";

std::vector<int> shuffled_indexes;

{
std::string atomicDistr;
parse("--atom-distribution",atomicDistr);
distribution = getAtomDistribution(atomicDistr);
log << "Using --atom-distribution=" << atomicDistr << "\n";
}

log <<"Initializing the setup of the kernel(s)\n";
const auto initial_time=std::chrono::high_resolution_clock::now();

for(auto & k : kernels) {
Expand Down Expand Up @@ -690,7 +701,6 @@ int Benchmark::main(FILE* in, FILE*out,Communicator& pc) {
// trap signals:
SignalHandlerGuard sigIntGuard(SIGINT, signalHandler);


for(int step=0; nf<0 || step<nf; ++step) {
std::shuffle(kernels_ptr.begin(),kernels_ptr.end(),rng);
distribution->positions(pos,step,atomicGenerator);
Expand Down

1 comment on commit ce48b26

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/ANGLES.tmp
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/CAVITY.tmp
Found broken examples in automatic/CLASSICAL_MDS.tmp
Found broken examples in automatic/CLUSTER_DIAMETER.tmp
Found broken examples in automatic/CLUSTER_DISTRIBUTION.tmp
Found broken examples in automatic/CLUSTER_PROPERTIES.tmp
Found broken examples in automatic/CONSTANT.tmp
Found broken examples in automatic/CONTACT_MATRIX.tmp
Found broken examples in automatic/CONTACT_MATRIX_PROPER.tmp
Found broken examples in automatic/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DFSCLUSTERING.tmp
Found broken examples in automatic/DISTANCE_FROM_CONTOUR.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FIND_CONTOUR.tmp
Found broken examples in automatic/FIND_CONTOUR_SURFACE.tmp
Found broken examples in automatic/FIND_SPHERICAL_CONTOUR.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/GPROPERTYMAP.tmp
Found broken examples in automatic/HBOND_MATRIX.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/INCYLINDER.tmp
Found broken examples in automatic/INENVELOPE.tmp
Found broken examples in automatic/INTERPOLATE_GRID.tmp
Found broken examples in automatic/LOCAL_AVERAGE.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/METATENSOR.tmp
Found broken examples in automatic/MULTICOLVARDENS.tmp
Found broken examples in automatic/OUTPUT_CLUSTER.tmp
Found broken examples in automatic/PAMM.tmp
Found broken examples in automatic/PCA.tmp
Found broken examples in automatic/PCAVARS.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in automatic/PYCVINTERFACE.tmp
Found broken examples in automatic/PYTHONFUNCTION.tmp
Found broken examples in automatic/Q3.tmp
Found broken examples in automatic/Q4.tmp
Found broken examples in automatic/Q6.tmp
Found broken examples in automatic/QUATERNION.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_LINEAR_PROJ.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_MAHA_DIST.tmp
Found broken examples in automatic/SPRINT.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/TORSIONS.tmp
Found broken examples in automatic/WHAM_WEIGHTS.tmp
Found broken examples in AnalysisPP.md
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.