From e11374d433895faee5b34c56e106d36f487e7075 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Jan 2020 01:37:12 -0500 Subject: [PATCH] print intel package status message only once per run --- src/USER-INTEL/fix_intel.cpp | 5 ++++- src/USER-INTEL/fix_intel.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index 83a22f0562..507ffa6d6f 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -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; } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-INTEL/fix_intel.h b/src/USER-INTEL/fix_intel.h index f23e305ca7..7c176fb069 100644 --- a/src/USER-INTEL/fix_intel.h +++ b/src/USER-INTEL/fix_intel.h @@ -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_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;