diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 08dae55d17..2d5a027427 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -700,7 +700,7 @@ void FixPour::pre_exchange() int ninserted_mols = ninserted_atoms / natom; ninserted += ninserted_mols; if (ninserted_mols < nnew && me == 0) - error->warning(FLERR,"Less insertions than requested",0); + error->warning(FLERR,"Less insertions than requested"); // reset global natoms,nbonds,etc // increment maxtag_all and maxmol_all if necessary diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index 9be33324de..56320d0017 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -128,7 +128,7 @@ void BondFENEKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"FENE bond too long",0); + error->warning(FLERR,"FENE bond too long"); k_error_flag.template modify(); k_error_flag.template sync(); diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index 92efd9d082..a17c0f5ecd 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -142,7 +142,7 @@ void DihedralCharmmKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) { energy += evm.emol; diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 59a20b26da..bae2e39268 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -165,7 +165,7 @@ void DihedralClass2Kokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index 764981f231..000956fb1d 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -128,7 +128,7 @@ void DihedralHarmonicKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index ae2b522f81..13bdc0f222 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -127,7 +127,7 @@ void DihedralOPLSKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 32d4c89548..4180a33aff 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -393,7 +393,7 @@ void FixShakeKokkos::post_force(int vflag) Kokkos::deep_copy(h_error_flag,d_error_flag); if (h_error_flag() == 2) - error->warning(FLERR,"Shake determinant < 0.0",0); + error->warning(FLERR,"Shake determinant < 0.0"); else if (h_error_flag() == 3) error->one(FLERR,"Shake determinant = 0.0"); diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 68f7223c44..6ae51216a4 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -141,7 +141,7 @@ void ImproperClass2Kokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Improper problem",0); + error->warning(FLERR,"Improper problem"); // Angle-Angle energy/force diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index 8a64e679bf..f0977745da 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -129,7 +129,7 @@ void ImproperHarmonicKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index 7064a500d2..0e8f7e1933 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -152,9 +152,9 @@ void PairDSMC::compute(int /*eflag*/, int /*vflag*/) convert_double_to_equivalent_int(num_of_collisions_double); if (num_of_collisions > number_of_A) - error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_A",0); + error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_A"); if (num_of_collisions > number_of_B) - error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_B",0); + error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_B"); // perform collisions on pairs of particles in icell diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index 6af537f6f4..7aa7b69ecf 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -593,7 +593,7 @@ void FixDeposit::pre_exchange() // warn if not successful b/c too many attempts if (!success && comm->me == 0) - error->warning(FLERR,"Particle deposition was unsuccessful",0); + error->warning(FLERR,"Particle deposition was unsuccessful"); // reset global natoms,nbonds,etc // increment maxtag_all and maxmol_all if necessary diff --git a/src/MISC/fix_ttm.cpp b/src/MISC/fix_ttm.cpp index 87832bd0f9..519007ebf7 100644 --- a/src/MISC/fix_ttm.cpp +++ b/src/MISC/fix_ttm.cpp @@ -434,7 +434,7 @@ void FixTTM::end_of_step() num_inner_timesteps = static_cast(update->dt/inner_dt) + 1; inner_dt = update->dt/double(num_inner_timesteps); if (num_inner_timesteps > 1000000) - error->warning(FLERR,"Too many inner timesteps in fix ttm",0); + error->warning(FLERR,"Too many inner timesteps in fix ttm"); } for (int ith_inner_timestep = 0; ith_inner_timestep < num_inner_timesteps; diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index ba40d12c11..4607e6ebb1 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -254,7 +254,7 @@ double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/, char str[128]; sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g", update->ntimestep,sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } diff --git a/src/MOLECULE/bond_fene_expand.cpp b/src/MOLECULE/bond_fene_expand.cpp index 7eaff1df89..910c52a96c 100644 --- a/src/MOLECULE/bond_fene_expand.cpp +++ b/src/MOLECULE/bond_fene_expand.cpp @@ -92,7 +92,7 @@ void BondFENEExpand::compute(int eflag, int vflag) sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %g", update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } @@ -269,7 +269,7 @@ double BondFENEExpand::single(int type, double rsq, int /*i*/, int /*j*/, char str[128]; sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g", update->ntimestep,sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index f8322fd9a1..cde4e9f47b 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -153,7 +153,7 @@ void DihedralCharmm::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 15e3aedc80..f8d3511fd4 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -156,7 +156,7 @@ void DihedralCharmmfsw::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_harmonic.cpp b/src/MOLECULE/dihedral_harmonic.cpp index 8495e6210f..800018d258 100644 --- a/src/MOLECULE/dihedral_harmonic.cpp +++ b/src/MOLECULE/dihedral_harmonic.cpp @@ -139,7 +139,7 @@ void DihedralHarmonic::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_helix.cpp b/src/MOLECULE/dihedral_helix.cpp index 6c50547d97..a844e936b2 100644 --- a/src/MOLECULE/dihedral_helix.cpp +++ b/src/MOLECULE/dihedral_helix.cpp @@ -170,7 +170,7 @@ void DihedralHelix::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index 0a3857eeda..a042c5fc2c 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -162,7 +162,7 @@ void DihedralMultiHarmonic::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index ee4b495a68..67d7cf8694 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -168,7 +168,7 @@ void DihedralOPLS::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index ed0f1b3ba0..684472aa7b 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -153,7 +153,7 @@ void ImproperCvff::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index f4511734db..5a0474a1af 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -127,7 +127,7 @@ void ImproperHarmonic::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index 78a79e0542..1d7702eb40 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -134,7 +134,7 @@ void ImproperUmbrella::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index f8c6b661b4..56ce6415de 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -1716,7 +1716,7 @@ void FixShake::shake(int m) double determ = b*b - 4.0*a*c; if (determ < 0.0) { - error->warning(FLERR,"Shake determinant < 0.0",0); + error->warning(FLERR,"Shake determinant < 0.0"); determ = 0.0; } diff --git a/src/USER-CGDNA/bond_oxdna_fene.cpp b/src/USER-CGDNA/bond_oxdna_fene.cpp index abff3804b8..de32a9c661 100644 --- a/src/USER-CGDNA/bond_oxdna_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna_fene.cpp @@ -221,7 +221,7 @@ void BondOxdnaFene::compute(int eflag, int vflag) sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %g", update->ntimestep,atom->tag[a],atom->tag[b],r); - error->warning(FLERR,str,0); + error->warning(FLERR,str); rlogarg = 0.1; } @@ -400,7 +400,7 @@ double BondOxdnaFene::single(int type, double rsq, int /*i*/, int /*j*/, char str[128]; sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g", update->ntimestep,sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); rlogarg = 0.1; } diff --git a/src/USER-INTEL/bond_fene_intel.cpp b/src/USER-INTEL/bond_fene_intel.cpp index 073d3b2b2e..2fe2e95179 100644 --- a/src/USER-INTEL/bond_fene_intel.cpp +++ b/src/USER-INTEL/bond_fene_intel.cpp @@ -187,7 +187,7 @@ void BondFENEIntel::eval(const int vflag, sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %g", update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); if (rlogarg <= (flt_t)-3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = (flt_t)0.1; } diff --git a/src/USER-INTEL/dihedral_charmm_intel.cpp b/src/USER-INTEL/dihedral_charmm_intel.cpp index d84658c797..2d2be5083e 100644 --- a/src/USER-INTEL/dihedral_charmm_intel.cpp +++ b/src/USER-INTEL/dihedral_charmm_intel.cpp @@ -255,7 +255,7 @@ void DihedralCharmmIntel::eval(const int vflag, TAGINT_FORMAT " " TAGINT_FORMAT, me,tid,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-INTEL/dihedral_fourier_intel.cpp b/src/USER-INTEL/dihedral_fourier_intel.cpp index c06eb4823b..e7398ce923 100644 --- a/src/USER-INTEL/dihedral_fourier_intel.cpp +++ b/src/USER-INTEL/dihedral_fourier_intel.cpp @@ -218,7 +218,7 @@ void DihedralFourierIntel::eval(const int vflag, TAGINT_FORMAT " " TAGINT_FORMAT, me,tid,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-INTEL/dihedral_harmonic_intel.cpp b/src/USER-INTEL/dihedral_harmonic_intel.cpp index cfa8d8fda1..988247a13b 100644 --- a/src/USER-INTEL/dihedral_harmonic_intel.cpp +++ b/src/USER-INTEL/dihedral_harmonic_intel.cpp @@ -218,7 +218,7 @@ void DihedralHarmonicIntel::eval(const int vflag, TAGINT_FORMAT " " TAGINT_FORMAT, me,tid,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-INTEL/dihedral_opls_intel.cpp b/src/USER-INTEL/dihedral_opls_intel.cpp index ec28d5ea9d..86d5d60d6e 100644 --- a/src/USER-INTEL/dihedral_opls_intel.cpp +++ b/src/USER-INTEL/dihedral_opls_intel.cpp @@ -244,7 +244,7 @@ void DihedralOPLSIntel::eval(const int vflag, TAGINT_FORMAT " " TAGINT_FORMAT, me,tid,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-INTEL/improper_cvff_intel.cpp b/src/USER-INTEL/improper_cvff_intel.cpp index 7f8b9ba21d..5521af2253 100644 --- a/src/USER-INTEL/improper_cvff_intel.cpp +++ b/src/USER-INTEL/improper_cvff_intel.cpp @@ -240,7 +240,7 @@ void ImproperCvffIntel::eval(const int vflag, TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-INTEL/improper_harmonic_intel.cpp b/src/USER-INTEL/improper_harmonic_intel.cpp index 8615912e01..4dde37ac20 100644 --- a/src/USER-INTEL/improper_harmonic_intel.cpp +++ b/src/USER-INTEL/improper_harmonic_intel.cpp @@ -232,7 +232,7 @@ void ImproperHarmonicIntel::eval(const int vflag, TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index 337bf271c4..fc9776a6a5 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -206,7 +206,7 @@ void ComputeCNPAtom::compute_peratom() if (nerrorall && comm->me == 0) { char str[128]; sprintf(str,"Too many neighbors in CNP for %d atoms",nerrorall); - error->warning(FLERR,str,0); + error->warning(FLERR,str); } // compute CNP value for each atom in group diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.cpp b/src/USER-MISC/dihedral_cosine_shift_exp.cpp index fe7fe05683..bf10cc90f9 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.cpp +++ b/src/USER-MISC/dihedral_cosine_shift_exp.cpp @@ -143,7 +143,7 @@ void DihedralCosineShiftExp::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-MISC/dihedral_fourier.cpp b/src/USER-MISC/dihedral_fourier.cpp index bdc95e07aa..8328eebeb0 100644 --- a/src/USER-MISC/dihedral_fourier.cpp +++ b/src/USER-MISC/dihedral_fourier.cpp @@ -148,7 +148,7 @@ void DihedralFourier::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-MISC/dihedral_nharmonic.cpp b/src/USER-MISC/dihedral_nharmonic.cpp index e847766bc5..34bd60d67b 100644 --- a/src/USER-MISC/dihedral_nharmonic.cpp +++ b/src/USER-MISC/dihedral_nharmonic.cpp @@ -163,7 +163,7 @@ void DihedralNHarmonic::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-MISC/dihedral_quadratic.cpp b/src/USER-MISC/dihedral_quadratic.cpp index ef5711215c..ac8a1c602a 100644 --- a/src/USER-MISC/dihedral_quadratic.cpp +++ b/src/USER-MISC/dihedral_quadratic.cpp @@ -169,7 +169,7 @@ void DihedralQuadratic::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-MISC/dihedral_table_cut.cpp b/src/USER-MISC/dihedral_table_cut.cpp index 46adef5923..c4143e6701 100644 --- a/src/USER-MISC/dihedral_table_cut.cpp +++ b/src/USER-MISC/dihedral_table_cut.cpp @@ -264,7 +264,7 @@ void DihedralTableCut::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-MISC/fix_ttm_mod.cpp b/src/USER-MISC/fix_ttm_mod.cpp index 20f6853bf6..ea179c8062 100644 --- a/src/USER-MISC/fix_ttm_mod.cpp +++ b/src/USER-MISC/fix_ttm_mod.cpp @@ -719,7 +719,7 @@ void FixTTMMod::end_of_step() num_inner_timesteps = static_cast(update->dt/inner_dt) + 1; inner_dt = update->dt/double(num_inner_timesteps); if (num_inner_timesteps > 1000000) - error->warning(FLERR,"Too many inner timesteps in fix ttm/mod",0); + error->warning(FLERR,"Too many inner timesteps in fix ttm/mod"); for (int ith_inner_timestep = 0; ith_inner_timestep < num_inner_timesteps; ith_inner_timestep++) { for (int ixnode = 0; ixnode < nxnodes; ixnode++) diff --git a/src/USER-MISC/improper_cossq.cpp b/src/USER-MISC/improper_cossq.cpp index 70877ac95d..158053e0b5 100644 --- a/src/USER-MISC/improper_cossq.cpp +++ b/src/USER-MISC/improper_cossq.cpp @@ -109,7 +109,7 @@ void ImproperCossq::compute(int eflag, int vflag) TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n",me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n",me,x[i2][0],x[i2][1],x[i2][2]); fprintf(screen," 3rd atom: %d %g %g %g\n",me,x[i3][0],x[i3][1],x[i3][2]); diff --git a/src/USER-MISC/improper_fourier.cpp b/src/USER-MISC/improper_fourier.cpp index 7f9c7b8d77..652d8da059 100644 --- a/src/USER-MISC/improper_fourier.cpp +++ b/src/USER-MISC/improper_fourier.cpp @@ -159,7 +159,7 @@ void ImproperFourier::addone(const int &i1,const int &i2,const int &i3,const int TAGINT_FORMAT " " TAGINT_FORMAT, me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index a48033865e..68dce4a763 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -119,7 +119,7 @@ void BondFENEExpandOMP::eval(int nfrom, int nto, ThrData * const thr) sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %g", update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); if (check_error_thr((rlogarg <= -3.0),tid,FLERR,"Bad FENE bond")) return; diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index b343ef32d8..705cf3242a 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -115,7 +115,7 @@ void BondFENEOMP::eval(int nfrom, int nto, ThrData * const thr) sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %g", update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); if (check_error_thr((rlogarg <= -3.0),tid,FLERR,"Bad FENE bond")) return; diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index c75378a8be..0105b60a22 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -175,7 +175,7 @@ void DihedralCharmmOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index ac04f3a36f..079d0c0914 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -164,7 +164,7 @@ void DihedralCosineShiftExpOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index 07c4c5468c..4964e267a6 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -159,7 +159,7 @@ void DihedralFourierOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index 5c2d304cac..d11bc94ef2 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -163,7 +163,7 @@ void DihedralHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index 5b4aa1bf0c..4d202e5127 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -195,7 +195,7 @@ void DihedralHelixOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index d1687c83a6..8b9a2bccbb 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -185,7 +185,7 @@ void DihedralMultiHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index 35899072a9..1b63b20f3b 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -185,7 +185,7 @@ void DihedralNHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 69aae3faf4..867b6b82fb 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -193,7 +193,7 @@ void DihedralOPLSOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index d183500182..9b93a08b8e 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -194,7 +194,7 @@ void DihedralQuadraticOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index b5d3d85434..dd81b518e0 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -173,7 +173,7 @@ void ImproperClass2OMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me, thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/improper_cossq_omp.cpp b/src/USER-OMP/improper_cossq_omp.cpp index 525cb48652..3b2efc1e4d 100644 --- a/src/USER-OMP/improper_cossq_omp.cpp +++ b/src/USER-OMP/improper_cossq_omp.cpp @@ -135,7 +135,7 @@ void ImproperCossqOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index 39ecfb110b..f81e65e7fe 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -183,7 +183,7 @@ void ImproperCvffOMP::eval(int nfrom, int nto, ThrData * const thr) me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/improper_fourier_omp.cpp b/src/USER-OMP/improper_fourier_omp.cpp index b38b642dbc..46c2a7aafd 100644 --- a/src/USER-OMP/improper_fourier_omp.cpp +++ b/src/USER-OMP/improper_fourier_omp.cpp @@ -194,7 +194,7 @@ void ImproperFourierOMP::add1_thr(const int i1,const int i2, TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,atom->x[i1][0],atom->x[i1][1],atom->x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index 998fa60a41..d8cbb0fbad 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -155,7 +155,7 @@ void ImproperHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index bcf0d3b304..1faa2d2089 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -157,7 +157,7 @@ void ImproperUmbrellaOMP::eval(int nfrom, int nto, ThrData * const thr) TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); + error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index 8b857444e5..5288504a4f 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -187,7 +187,7 @@ void ComputeCNAAtom::compute_peratom() MPI_Allreduce(&nerror,&nerrorall,1,MPI_INT,MPI_SUM,world); if (nerrorall && comm->me == 0) error->warning(FLERR,fmt::format("Too many neighbors in CNA for {} " - "atoms",nerrorall),0); + "atoms",nerrorall)); // compute CNA for each atom in group // only performed if # of nearest neighbors = 12 or 14 (fcc,hcp) diff --git a/src/error.cpp b/src/error.cpp index 1ebccfbbbc..97bc7bbec1 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -118,6 +118,7 @@ void Error::universe_one(const std::string &file, int line, const std::string &s void Error::universe_warn(const std::string &file, int line, const std::string &str) { + if ((allwarn > maxwarn) || (maxwarn < 0)) return; ++numwarn; if (universe->uscreen) fmt::print(universe->uscreen,"WARNING on proc {}: {} ({}:{})\n", @@ -247,14 +248,14 @@ void Error::_one(const std::string &file, int line, fmt::string_view format, only write to screen if non-nullptr on this proc since could be file ------------------------------------------------------------------------- */ -void Error::warning(const std::string &file, int line, const std::string &str, int logflag) +void Error::warning(const std::string &file, int line, const std::string &str) { if ((allwarn > maxwarn) || (maxwarn < 0)) return; ++numwarn; std::string mesg = fmt::format("WARNING: {} ({}:{})\n", str,truncpath(file),line); if (screen) fputs(mesg.c_str(),screen); - if (logflag && logfile) fputs(mesg.c_str(),logfile); + if (logfile) fputs(mesg.c_str(),logfile); } /* ---------------------------------------------------------------------- @@ -262,12 +263,12 @@ void Error::warning(const std::string &file, int line, const std::string &str, i write message to screen and logfile (if logflag is set) ------------------------------------------------------------------------- */ -void Error::message(const std::string &file, int line, const std::string &str, int logflag) +void Error::message(const std::string &file, int line, const std::string &str) { std::string mesg = fmt::format("{} ({}:{})\n",str,truncpath(file),line); if (screen) fputs(mesg.c_str(),screen); - if (logflag && logfile) fputs(mesg.c_str(),logfile); + if (logfile) fputs(mesg.c_str(),logfile); } /* ---------------------------------------------------------------------- diff --git a/src/error.h b/src/error.h index 4cc8a3bdee..c39f5d07c9 100644 --- a/src/error.h +++ b/src/error.h @@ -43,8 +43,8 @@ class Error : protected Pointers { _one(file, line, format, fmt::make_args_checked(format, args...)); } - void warning(const std::string &, int, const std::string &, int = 1); - void message(const std::string &, int, const std::string &, int = 1); + void warning(const std::string &, int, const std::string &); + void message(const std::string &, int, const std::string &); [[ noreturn ]] void done(int = 0); // 1 would be fully backwards compatible int get_numwarn() const { return numwarn; } diff --git a/src/thermo.cpp b/src/thermo.cpp index 1c291b7c9a..198468e09a 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -420,7 +420,7 @@ bigint Thermo::lost_check() warnbefore = 1; error->warning(FLERR,fmt::format("Too many warnings: {} vs {}. All " "future warnings will be suppressed.\n", - ntotal[1],maxwarn),0); + ntotal[1],maxwarn)); } error->set_allwarn(ntotal[1]); @@ -443,7 +443,7 @@ bigint Thermo::lost_check() if (me == 0) error->warning(FLERR,fmt::format("Lost atoms: original {} current {}", - atom->natoms,ntotal[0]),0); + atom->natoms,ntotal[0])); // reset total atom count