Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the definition of the generators for ICC compilers.
Browse files Browse the repository at this point in the history
bvanessen committed Feb 22, 2024
1 parent 6e32bac commit 440683a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils/random_number_generators.cpp
Original file line number Diff line number Diff line change
@@ -34,18 +34,18 @@
namespace {
#if not defined(LBANN_DETERMINISTIC) && defined(_OPENMP)
#ifdef __ICC
lbann::rng_gen generator;
#pragma omp threadprivate(generator)
lbann::rng_gen OMP_generator;
#pragma omp threadprivate(OMP_generator)

lbann::fast_rng_gen fast_generator;
#pragma omp threadprivate(fast_generator)
lbann::fast_rng_gen OMP_fast_generator;
#pragma omp threadprivate(OMP_fast_generator)

bool OMP_generator_inited = false;
#pragma omp threadprivate(OMP_generator_inited)

bool OMP_fast_generator_inited = false;
#pragma omp threadprivate(OMP_fast_generator_inited)
#else
#else // ! __ICC
// Random number generator, file-visible only.
// Defined like this to work around a GCC problem with threadprivate objects:
// https://stackoverflow.com/questions/23552077/how-to-define-a-object-or-struct-as-threadprivate-in-openmp/

0 comments on commit 440683a

Please sign in to comment.