Skip to content

Commit

Permalink
V2.9 - add to OPES same MPI-related error messages of METAD (#940)
Browse files Browse the repository at this point in the history
* better doc

* METAD-like MPI error
  • Loading branch information
invemichele authored May 16, 2023
1 parent 22c2a3d commit 1f3dba8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/opes/ECVmultiThermalBaric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ ECVmultiThermalBaric::ECVmultiThermalBaric(const ActionOptions&ao)
log.printf(" and a pressure range from PRESSURE_MIN=%g to PRESSURE_MAX=%g\n",pres_min,pres_max);
if(pres_min==pres_max)
log.printf(" +++ WARNING +++ if you only need a multithermal simulation it is more efficient to set it up with ECV_MULTITHERMAL\n");
if(geom_spacing_)
if(!geom_spacing_)
log.printf(" -- NO_GEOM_SPACING: inverse temperatures will be linearly spaced\n");
if(coeff_!=0)
log.printf(" -- CUT_CORNER: ignoring some high temperature and low pressure values\n");
Expand Down
4 changes: 4 additions & 0 deletions src/opes/OPESexpanded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ OPESexpanded::OPESexpanded(const ActionOptions&ao)
parseFlag("WALKERS_MPI",walkers_mpi);
if(walkers_mpi)
{
//If this Action is not compiled with MPI the user is informed and we exit gracefully
plumed_massert(Communicator::plumedHasMPI(),"Invalid walkers configuration: WALKERS_MPI flag requires MPI compilation");
plumed_massert(Communicator::initialized(),"Invalid walkers configuration: WALKERS_MPI needs the communicator correctly initialized.");

if(comm.Get_rank()==0) //multi_sim_comm works on first rank only
{
NumWalkers_=multi_sim_comm.Get_size();
Expand Down
10 changes: 9 additions & 1 deletion src/opes/OPESmetad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,11 @@ void OPESmetad<mode>::registerKeywords(Keywords& keys)
keys.use("ARG");
keys.add("compulsory","TEMP","-1","temperature. If not set, it is taken from MD engine, but not all MD codes provide it");
keys.add("compulsory","PACE","the frequency for kernel deposition");
keys.add("compulsory","SIGMA","ADAPTIVE","the initial widths of the kernels. If not set, adaptive sigma will be used with the given ADAPTIVE_SIGMA_STRIDE");
std::string info_sigma("the initial widths of the kernels");
if(mode::explore)
info_sigma+=", divided by \\f$\\sqrt{\\gamma}\\f$";
info_sigma+=". If not set, an adaptive sigma will be used with the given ADAPTIVE_SIGMA_STRIDE";
keys.add("compulsory","SIGMA","ADAPTIVE",info_sigma);
keys.add("compulsory","BARRIER","the free energy barrier to be overcome. It is used to set BIASFACTOR, EPSILON, and KERNEL_CUTOFF to reasonable values");
keys.add("compulsory","COMPRESSION_THRESHOLD","1","merge kernels if closer than this threshold, in units of sigma");
//extra options
Expand Down Expand Up @@ -554,6 +558,10 @@ OPESmetad<mode>::OPESmetad(const ActionOptions& ao)
parseFlag("WALKERS_MPI",walkers_mpi);
if(walkers_mpi)
{
//If this Action is not compiled with MPI the user is informed and we exit gracefully
plumed_massert(Communicator::plumedHasMPI(),"Invalid walkers configuration: WALKERS_MPI flag requires MPI compilation");
plumed_massert(Communicator::initialized(),"Invalid walkers configuration: WALKERS_MPI needs the communicator correctly initialized.");

if(comm.Get_rank()==0)//multi_sim_comm works on first rank only
{
NumWalkers_=multi_sim_comm.Get_size();
Expand Down

1 comment on commit 1f3dba8

@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/a-masterclass-22-09.txt
Found broken examples in automatic/a-masterclass-22-11.txt
Found broken examples in automatic/a-masterclass-22-12.txt
Found broken examples in automatic/performance-optimization.txt
Found broken examples in automatic/a-trieste-6.txt
Found broken examples in automatic/munster.txt
Found broken examples in automatic/ANN.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/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/INCLUDE.tmp
Found broken examples in automatic/MAZE_MEMETIC_SAMPLING.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_RANDOM_WALK.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in MiscelaneousPP.md

Please sign in to comment.