# Nsight compute fails to launch julia

**URL:** https://discourse.julialang.org/t/nsight-compute-fails-to-launch-julia/99636
**Category:** Profiling
**Created:** [May 30, 2023, 11:29pm UTC](https://discourse.julialang.org/t/nsight-compute-fails-to-launch-julia/99636 "2023-05-30T23:29:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bthorne93](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bthorne93/32/19570_2.png) [@bthorne93](https://discourse.julialang.org/u/bthorne93)
#### Post date: [May 30, 2023, 11:29pm UTC](https://discourse.julialang.org/t/nsight-compute-fails-to-launch-julia/99636/1 "2023-05-30T23:29:39Z")

</div>

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

```julia
ncu -o report julia <path to benchmarking_script>

```

And the error is:

```julia
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?

---

<div class="post-metadata">

### Author: ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)
#### Post date: [May 31, 2023, 4:23am UTC](https://discourse.julialang.org/t/nsight-compute-fails-to-launch-julia/99636/2 "2023-05-31T04:23:09Z")

</div>

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](https://github.com/JuliaGPU/CUDA.jl/issues/1886) at CUDA.jl.

---

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [May 31, 2023, 6:00am UTC](https://discourse.julialang.org/t/nsight-compute-fails-to-launch-julia/99636/3 "2023-05-31T06:00:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![bthorne93](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bthorne93/32/19570_2.png) [@bthorne93](https://discourse.julialang.org/u/bthorne93)
#### Post date: [May 31, 2023, 2:28pm UTC](https://discourse.julialang.org/t/nsight-compute-fails-to-launch-julia/99636/4 "2023-05-31T14:28:49Z")

</div>

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