Nsight compute fails to launch julia

I am trying to profile a julia cuda application using Nsight compute, however I am running into an obscure error before julia even seems to be launched. This only occurs on versions 1.9 and 1.8, version <1.7 actually work as expected. I run

ncu -o report julia <path to benchmarking_script>

And the error is:

fatal: error thrown and no exception handler available.
InitError(mod=:Sys, error=ErrorException("could not load library "libpcre2-8"
libpcre2-8.so: cannot open shared object file: No such file or directory"))
ijl_errorf at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/rtutils.c:77
ijl_load_dynamic_library at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/dlload.c:369
jl_get_library_ at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/runtime_ccall.cpp:48 [inlined]
jl_get_library_ at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/runtime_ccall.cpp:30
ijl_load_and_lookup at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/runtime_ccall.cpp:61
jlplt_pcre2_compile_8_45382.clone_1 at /global/common/software/m4287/ben/julia/juliaup/julia-1.9.0+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
compile at ./pcre.jl:161
compile at ./regex.jl:75
#occursin#500 at ./regex.jl:258 [inlined]
occursin at ./regex.jl:257 [inlined]
isdirpath at ./path.jl:117 [inlined]
normpath at ./path.jl:373
abspath at ./path.jl:440
abspath at ./path.jl:449 [inlined]
__init_build at ./sysinfo.jl:128
__init__ at ./sysinfo.jl:120
jfptr___init___37458.clone_1 at /global/common/software/m4287/ben/julia/juliaup/julia-1.9.0+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/julia.h:1879 [inlined]
jl_module_run_initializer at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/toplevel.c:75
_finish_julia_init at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/init.c:850
julia_init at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/init.c:799
jl_repl_entrypoint at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/src/jlapi.c:711
main at /cache/build/default-amdci4-0/julialang/julia-release-1-dot-9/cli/loader_exe.c:59
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x401098)
==PROF== Target process 109124 terminated before first instrumented API call.
==ERROR== The application returned an error code (1).
==WARNING== No kernels were profiled.
==WARNING== Profiling kernels launched by child processes requires the --target-processes all option.

Does anyone know what might be going on here?

1 Like

The NVIDIA tools use LD_LIBRARY_PATH which can hide the libraries Julia needs. You may be able to get things working by priming the list as described in a related issue at CUDA.jl.

1 Like

That library is not in your LD_LIBRARY_PATH
Do you have the Modules environment available?
Type ‘module avail’ to see if Modules are set up.

I am guessing you run this in a container?

Thank you, the work around suggested there works for me.