join lines, whitespace

This commit is contained in:
Axel Kohlmeyer
2022-01-20 16:04:26 -05:00
parent 0b24c5b498
commit dbe267cb88

View File

@ -303,8 +303,7 @@ void FixIntel::init()
if (force->pair_match("^hybrid", 0) != nullptr) { if (force->pair_match("^hybrid", 0) != nullptr) {
_pair_hybrid_flag = 1; _pair_hybrid_flag = 1;
if (force->newton_pair != 0 && force->pair->no_virial_fdotr_compute) if (force->newton_pair != 0 && force->pair->no_virial_fdotr_compute)
error->all(FLERR, error->all(FLERR,"Intel package requires fdotr virial with newton on.");
"Intel package requires fdotr virial with newton on.");
} else } else
_pair_hybrid_flag = 0; _pair_hybrid_flag = 0;
@ -325,8 +324,7 @@ void FixIntel::init()
_pair_hybrid_zero = 0; _pair_hybrid_zero = 0;
if (force->newton_pair == 0) _pair_hybrid_flag = 0; if (force->newton_pair == 0) _pair_hybrid_flag = 0;
if (nstyles > 1) if (nstyles > 1)
error->all(FLERR, error->all(FLERR,"Currently, cannot offload more than one intel style with hybrid.");
"Currently, cannot offload more than one intel style with hybrid.");
} }
#endif #endif
@ -356,15 +354,12 @@ void FixIntel::init()
void FixIntel::setup(int vflag) void FixIntel::setup(int vflag)
{ {
if (neighbor->style != Neighbor::BIN) if (neighbor->style != Neighbor::BIN)
error->all(FLERR, error->all(FLERR,"Currently, neighbor style BIN must be used with Intel package.");
"Currently, neighbor style BIN must be used with Intel package.");
if (vflag > 3) if (vflag > 3)
error->all(FLERR, error->all(FLERR,"Cannot currently get per-atom virials with Intel package.");
"Cannot currently get per-atom virials with Intel package.");
#ifdef _LMP_INTEL_OFFLOAD #ifdef _LMP_INTEL_OFFLOAD
if (neighbor->exclude_setting() != 0) if (neighbor->exclude_setting() != 0)
error->all(FLERR, error->all(FLERR,"Currently, cannot use neigh_modify exclude with Intel package offload.");
"Currently, cannot use neigh_modify exclude with Intel package offload.");
post_force(vflag); post_force(vflag);
#endif #endif
} }
@ -425,14 +420,14 @@ void FixIntel::pair_init_check(const bool cdmessage)
if (_offload_balance != 0.0 && comm->me == 0) { if (_offload_balance != 0.0 && comm->me == 0) {
#ifndef __INTEL_COMPILER_BUILD_DATE #ifndef __INTEL_COMPILER_BUILD_DATE
error->warning(FLERR, "Unknown Intel Compiler Version\n"); error->warning(FLERR,"Unknown Intel Compiler Version\n");
#else #else
if (__INTEL_COMPILER_BUILD_DATE != 20131008 && if (__INTEL_COMPILER_BUILD_DATE != 20131008 &&
__INTEL_COMPILER_BUILD_DATE < 20141023) __INTEL_COMPILER_BUILD_DATE < 20141023)
error->warning(FLERR, "Unsupported Intel Compiler."); error->warning(FLERR,"Unsupported Intel Compiler.");
#endif #endif
#if !defined(__INTEL_COMPILER) #if !defined(__INTEL_COMPILER)
error->warning(FLERR, "Unsupported Intel Compiler."); error->warning(FLERR,"Unsupported Intel Compiler.");
#endif #endif
} }
@ -505,8 +500,7 @@ void FixIntel::bond_init_check()
{ {
if ((_offload_balance != 0.0) && (atom->molecular != Atom::ATOMIC) if ((_offload_balance != 0.0) && (atom->molecular != Atom::ATOMIC)
&& (force->newton_pair != force->newton_bond)) && (force->newton_pair != force->newton_bond))
error->all(FLERR, error->all(FLERR,"INTEL package requires same setting for newton bond and non-bond.");
"INTEL package requires same setting for newton bond and non-bond.");
int intel_pair = 0; int intel_pair = 0;
if (force->pair_match("/intel$", 0) != nullptr) if (force->pair_match("/intel$", 0) != nullptr)
@ -517,7 +511,7 @@ void FixIntel::bond_init_check()
} }
if (intel_pair == 0) if (intel_pair == 0)
error->all(FLERR, "Intel styles for bond/angle/dihedral/improper " error->all(FLERR,"Intel styles for bond/angle/dihedral/improper "
"require intel pair style."); "require intel pair style.");
} }
@ -534,7 +528,7 @@ void FixIntel::kspace_init_check()
} }
if (intel_pair == 0) if (intel_pair == 0)
error->all(FLERR, "Intel styles for kspace require intel pair style."); error->all(FLERR,"Intel styles for kspace require intel pair style.");
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -551,7 +545,7 @@ void FixIntel::check_neighbor_intel()
_offload_noghost = 0; _offload_noghost = 0;
} }
if (neighbor->requests[i]->skip && _offload_balance != 0.0) if (neighbor->requests[i]->skip && _offload_balance != 0.0)
error->all(FLERR, "Cannot yet use hybrid styles with Intel offload."); error->all(FLERR,"Cannot yet use hybrid styles with Intel offload.");
// avoid flagging a neighbor list as both INTEL and OPENMP // avoid flagging a neighbor list as both INTEL and OPENMP
if (neighbor->requests[i]->intel) if (neighbor->requests[i]->intel)
@ -786,8 +780,7 @@ void FixIntel::add_oresults(const ft * _noalias const f_in,
if (f_in[1].w == 1) if (f_in[1].w == 1)
error->all(FLERR,"Bad matrix inversion in mldivide3"); error->all(FLERR,"Bad matrix inversion in mldivide3");
else else
error->all(FLERR, error->all(FLERR,"Sphere particles not yet supported for gayberne/intel");
"Sphere particles not yet supported for gayberne/intel");
} }
} }
@ -926,7 +919,7 @@ void FixIntel::add_off_results(const ft * _noalias const f_in,
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (neighbor->ago == 0) { if (neighbor->ago == 0) {
if (_off_overflow_flag[LMP_OVERFLOW]) if (_off_overflow_flag[LMP_OVERFLOW])
error->one(FLERR, "Neighbor list overflow, boost neigh_modify one"); error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
_offload_nlocal = _off_overflow_flag[LMP_LOCAL_MAX] + 1; _offload_nlocal = _off_overflow_flag[LMP_LOCAL_MAX] + 1;
_offload_min_ghost = _off_overflow_flag[LMP_GHOST_MIN]; _offload_min_ghost = _off_overflow_flag[LMP_GHOST_MIN];
_offload_nghost = _off_overflow_flag[LMP_GHOST_MAX] + 1 - _offload_nghost = _off_overflow_flag[LMP_GHOST_MAX] + 1 -
@ -938,7 +931,7 @@ void FixIntel::add_off_results(const ft * _noalias const f_in,
if (atom->torque) if (atom->torque)
if (f_in[1].w < 0.0) if (f_in[1].w < 0.0)
error->all(FLERR, "Bad matrix inversion in mldivide3"); error->all(FLERR,"Bad matrix inversion in mldivide3");
add_results(f_in, ev_global, _off_results_eatom, _off_results_vatom, 1); add_results(f_in, ev_global, _off_results_eatom, _off_results_vatom, 1);
// Load balance? // Load balance?
@ -1043,8 +1036,7 @@ void FixIntel::output_timing_data() {
timers[TIME_OFFLOAD_PAIR]; timers[TIME_OFFLOAD_PAIR];
double tt = MAX(ht,ct); double tt = MAX(ht,ct);
if (timers[TIME_OFFLOAD_LATENCY] / tt > 0.07 && _separate_coi == 0) if (timers[TIME_OFFLOAD_LATENCY] / tt > 0.07 && _separate_coi == 0)
error->warning(FLERR, error->warning(FLERR,"Leaving a core free can improve performance for offload");
"Leaving a core free can improve performance for offload");
} }
fprintf(_tscreen, "------------------------------------------------\n"); fprintf(_tscreen, "------------------------------------------------\n");
} }
@ -1109,7 +1101,7 @@ void FixIntel::set_offload_affinity()
int ppn = get_ppn(node_rank); int ppn = get_ppn(node_rank);
if (ppn % _ncops != 0) if (ppn % _ncops != 0)
error->all(FLERR, "MPI tasks per node must be multiple of offload_cards"); error->all(FLERR,"MPI tasks per node must be multiple of offload_cards");
ppn = ppn / _ncops; ppn = ppn / _ncops;
_cop = node_rank / ppn; _cop = node_rank / ppn;
node_rank = node_rank % ppn; node_rank = node_rank % ppn;
@ -1214,8 +1206,7 @@ int FixIntel::set_host_affinity(const int nomp)
int subscription = nthreads * ppn; int subscription = nthreads * ppn;
if (subscription > ncores) { if (subscription > ncores) {
if (rank == 0) if (rank == 0)
error->warning(FLERR, error->warning(FLERR,"More MPI tasks/OpenMP threads than available cores");
"More MPI tasks/OpenMP threads than available cores");
return 0; return 0;
} }
if (subscription == ncores) if (subscription == ncores)