Unverified Commit c589dd58 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

consistent initialization and setting of _nthreads and comm->nthreads

parent 6c28adcf
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
  _pair_intel_count = 0;
  _hybrid_nonpair = 0;
  _print_pkg_info = 1;
  _nthreads = comm->nthreads;

  _precision_mode = PREC_MODE_MIXED;
  _offload_balance = -1.0;
@@ -218,12 +219,7 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
  #endif
  if (nomp != 0) {
    omp_set_num_threads(nomp);
    comm->nthreads = nomp;
  } else {
    int nthreads;
    #pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(nthreads)
    nthreads = omp_get_num_threads();
    comm->nthreads = nthreads;
    _nthreads = comm->nthreads = nomp;
  }
  #endif