InMemoryDatasets.jl
InMemoryDatasets.jl copied to clipboard
Warning when precompiling
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.
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 theIMD
warning.