Another anecdote:
While compiling julia via msys2, I removed julia/usr/bin/libgomp-1.dll
and then ran julia/usr/bin/julia
. This ran and julia picked up the system libgomp.
julia> using Libdl
julia> filter(endswith("libgomp-1.dll"), dllist())
1-element Vector{String}:
"D:\\msys64\\mingw64\\bin\\libgomp-1.dll"
XGBoost.jl than ran well without issue.
julia> using XGBoost
julia> (X, y) = (randn(100,4), randn(100))
([-0.2872406656219727 -0.12530887476138095 -1.0645945831730095 -0.5476863629851729; 1.1796877272505861 -0.40424373371279 1.1259156453243035 -0.30888166542343876; … ; -0.849482346037964 -0.1579562943535686 -1.1079538137852494 -0.27463220454720016; 1.182042709625743 -0.87330578264992 -1.416683927904884 -0.4334293199841588], [-0.17352201292899774, 1.16313239488861
83, 0.14563217219555555, 0.5894469249299029, -0.868977268778328, 0.9206360145384936, -0.11610698551105296, -1.9548248409028115, -0.2730516728874413, -0.5349293988464893 … 0.8795303941899613, 0.34443362475322187, 1.0898747246422278, 0.37545903666247926, 0.587411742539772, 1.9751852159772305, -0.11853522099175944, 1.698022088389855, -0.3255423700067697, -0.1102
913206768139])
julia> bst = xgboost((X, y), num_round=5, max_depth=6, objective="reg:squarederror")
[ Info: XGBoost: starting training.
[ Info: [1] train-rmse:0.86275966048601038
[ Info: [2] train-rmse:0.72102870654282825
[ Info: [3] train-rmse:0.61120932596553845
[ Info: [4] train-rmse:0.51586851123155142
[ Info: [5] train-rmse:0.45288159287658064
[ Info: Training rounds complete.
Next I checked to see if /mingw64/bin/stdc++-6.dll
had the missing symbols.
MINGW64 ~/julia/usr/bin
$ nm /mingw64/bin/libstdc++-6.dll 2> /dev/null | grep -E '(D|T) .*(_|et)_once_(functor|mutexv)'
MINGW64 ~/julia/usr/bin
$ nm libstdc++-6.dll 2> /dev/null | grep -E '(D|T) .*(_|et)_once_(functor|mutexv)'
00000003bea83a80 D _ZSt14__once_functor
00000003bea683d0 T _ZSt16__get_once_mutexv
00000003bea6b430 T _ZSt23__get_once_functor_lockv
00000003bea6b5e0 T _ZSt27__set_once_functor_lock_ptrPSt11unique_lockISt5mutexE
The msys2 libstdc++-6.dll
appears to not have the needed symbols while the one distributed with Julia does.
xgboost.dll only calls a few methods in libgomp-1.dll
N/A, 20 (0x00000014), GOMP_atomic_end, libgomp-1.dll, False, None
N/A, 21 (0x00000015), GOMP_atomic_start, libgomp-1.dll, False, None
N/A, 22 (0x00000016), GOMP_barrier, libgomp-1.dll, False, None
N/A, 38 (0x00000026), GOMP_loop_dynamic_next, libgomp-1.dll, False, None
N/A, 39 (0x00000027), GOMP_loop_dynamic_start, libgomp-1.dll, False, None
N/A, 42 (0x0000002a), GOMP_loop_end_nowait, libgomp-1.dll, False, None
N/A, 43 (0x0000002b), GOMP_loop_guided_next, libgomp-1.dll, False, None
N/A, 44 (0x0000002c), GOMP_loop_guided_start, libgomp-1.dll, False, None
N/A, 65 (0x00000041), GOMP_loop_ull_dynamic_next, libgomp-1.dll, False, None
N/A, 66 (0x00000042), GOMP_loop_ull_dynamic_start, libgomp-1.dll, False, None
N/A, 67 (0x00000043), GOMP_loop_ull_guided_next, libgomp-1.dll, False, None
N/A, 68 (0x00000044), GOMP_loop_ull_guided_start, libgomp-1.dll, False, None
N/A, 91 (0x0000005b), GOMP_parallel, libgomp-1.dll, False, None
N/A, 113 (0x00000071), GOMP_single_start, libgomp-1.dll, False, None
N/A, 233 (0x000000e9), omp_get_max_threads, libgomp-1.dll, False, None
N/A, 241 (0x000000f1), omp_get_num_procs, libgomp-1.dll, False, None
N/A, 245 (0x000000f5), omp_get_num_threads, libgomp-1.dll, False, None
N/A, 270 (0x0000010e), omp_get_thread_limit, libgomp-1.dll, False, None
N/A, 272 (0x00000110), omp_get_thread_num, libgomp-1.dll, False, None