print intel package status message only once per run

This commit is contained in:
Axel Kohlmeyer 2020-01-03 01:37:12 -05:00
parent a72f53e367
commit e11374d433
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 7 additions and 2 deletions

View File

@ -63,6 +63,7 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
_three_body_neighbor = 0;
_pair_intel_count = 0;
_hybrid_nonpair = 0;
_print_pkg_info = 1;
_precision_mode = PREC_MODE_MIXED;
_offload_balance = -1.0;
@ -290,6 +291,7 @@ int FixIntel::setmask()
mask |= POST_FORCE;
mask |= MIN_POST_FORCE;
#endif
mask |= POST_RUN;
return mask;
}
@ -475,7 +477,7 @@ void FixIntel::pair_init_check(const bool cdmessage)
set_offload_affinity();
#endif
if (comm->me == 0) {
if (_print_pkg_info && comm->me == 0) {
if (screen) {
fprintf(screen,
"----------------------------------------------------------\n");
@ -498,6 +500,7 @@ void FixIntel::pair_init_check(const bool cdmessage)
"----------------------------------------------------------\n");
}
}
_print_pkg_info = 0;
}
/* ---------------------------------------------------------------------- */

View File

@ -54,6 +54,8 @@ class FixIntel : public Fix {
inline void min_pre_reverse(int eflag = 0, int vflag = 0)
{ pre_reverse(eflag, vflag); }
void post_run() { _print_pkg_info = 1; }
// Get all forces, calculation results from coprocesser
void sync_coprocessor();
@ -101,7 +103,7 @@ class FixIntel : public Fix {
IntelBuffers<double,double> *_double_buffers;
int _precision_mode, _nthreads, _nbor_pack_width, _three_body_neighbor;
int _pair_intel_count, _pair_hybrid_flag;
int _pair_intel_count, _pair_hybrid_flag, _print_pkg_info;
// These should be removed in subsequent update w/ simpler hybrid arch
int _pair_hybrid_zero, _hybrid_nonpair, _zero_master;