InMemoryDatasets.jl icon indicating copy to clipboard operation
InMemoryDatasets.jl copied to clipboard

Warning when precompiling

Open ufechner7 opened this issue 1 year ago • 1 comments

When I am precompiling a project that depends on InMemoryDatasets I get the following warning, even though I started Julia with the option -t auto:

julia> using CanAnalyzer
[ Info: Precompiling CanAnalyzer [fbb474e2-a87e-4494-be2e-a3a334a889f8]
┌ Warning: Julia started with single thread, to enable multithreaded functionalities in InMemoryDatasets.jl start Julia with multiple threads.
└ @ InMemoryDatasets ~/.julia/packages/InMemoryDatasets/cs8F2/src/InMemoryDatasets.jl:205

This should not happen.

ufechner7 avatar Aug 25 '22 14:08 ufechner7

I think, this is the Julia issue. When a Julia session is started with -t auto, only that session uses multi threading, however, the precompiling process call other Julia sessions which are not aware of -t auto. As a workaround:

  • Set the environment variable JULIA_NUM_THREADS, or
  • Set the environment variable IMD_WARN_THREADS=0 to suppress the IMD warning.

sl-solution avatar Aug 26 '22 06:08 sl-solution