FLOWUnsteady icon indicating copy to clipboard operation
FLOWUnsteady copied to clipboard

Issue regarding CPU core Parallelization ("segmentation fault" when forced)

Open neerajbalachandar opened this issue 6 months ago • 1 comments

Hello, I am facing a problem regarding the parallelisation of the CPU core. I tried the standard installation, where my PC worked alternatively on two cores out of the 24 cores, which clearly signified the absence of parallelisation. Then I tried forcing the use of parallelisation with "julia -t 24 sample_code.jl", where I encountered the following error: "Segmentation Fault (core dumped)". I had not faced such parallelisation issues in my previous installations on other PCs, where I had been using them for a few months. Please help me with the problem. Is it a problem with PyCall? The version of Ubuntu I am using on the current PC is 24.04.3. Additionally, HDF5 compatibility was another issue, which I resolved by updating the version in the Project.toml file. Thank you for the info in the community.

Below is the terminal output error when I forced parallelization, for your reference:

[63357] signal (11.1): Segmentation fault in expression starting at /home/neeraj/Neeraj/Vortex Particle Simulation/FLOWUnsteady-master/examples/tetheredwing.jl:233 PyObject_GC_Del at /usr/lib/x86_64-linux-gnu/libpython3.12.so.1.0 (unknown line) unknown function (ip: 0x7c852cbdfcac) pydecref_ at /home/neeraj/.julia/packages/PyCall/1gn3u/src/PyCall.jl:118 pydecref at /home/neeraj/.julia/packages/PyCall/1gn3u/src/PyCall.jl:123 jfptr_pydecref_4274 at /home/neeraj/.julia/compiled/v1.10/PyCall/GkzkC_kt4Fr.so (unknown line) _jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined] ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076 run_finalizer at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gc.c:318 jl_gc_run_finalizers_in_list at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gc.c:408 run_finalizers at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gc.c:454 jl_mutex_unlock at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/julia_locks.h:80 [inlined] ijl_process_events at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/jl_uv.c:286 ijl_task_get_next at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/partr.c:524 poptask at ./task.jl:985 wait at ./task.jl:994 task_done_hook at ./task.jl:675 jfptr_task_done_hook_75297 at /home/neeraj/Neeraj/Vortex Particle Simulation/julia-1.10.2-linux-x86_64/lib/julia/sys.so (unknown line) _jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined] ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076 jl_apply at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined] jl_finish_task at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/task.c:320 start_task at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/task.c:1249 Allocations: 88821808 (Pool: 88752045; Big: 69763); GC: 95 Segmentation fault (core dumped)

neerajbalachandar avatar Oct 24 '25 08:10 neerajbalachandar

The most recent version should correct the HDF5 issues.

Unfortunately, I cannot recreate your issue. The most likely cause is that your Python install has access to multiple threads and is trying to use them at the same time that Julia is doing so. I would recommend setting environment variables related to Python threads to single threaded.

BTV25 avatar Nov 05 '25 15:11 BTV25