Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault #705

Closed
soxzofia opened this issue Mar 20, 2024 · 16 comments
Closed

Segmentation fault #705

soxzofia opened this issue Mar 20, 2024 · 16 comments
Labels

Comments

@soxzofia
Copy link

Hi,

Recently I installed Smilei(v5.0) on our group server, after installation, I ran my old 3D-simulation but segmentation fault occurred after few seconds of runtime. Simulation can successfully run only after I set "export OMP_THREADS=1". And I have tried my old 2D-simulation, no fault occurred. Is this because I didn't set the dependencies of Smilei properly?

Segmentation fault:'
Stack trace (most recent call last) in thread 343401:
#8 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#7 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7ff1b1126bbb, in
#6 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7ff1b10a645b, in
#5 Object "/lib/x86_64-linux-gnu/libgomp.so.1", at 0x7ff1b1eedbdd, in
#4 Object "smilei", at 0x55ca40510feb, in
#3 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7ff1b18c71de, in PyImport_AddModule
#2 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7ff1b1839a9c, in
#1 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7ff1b1817994, in PyUnicode_New
#0 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7ff1b17df860, in
Segmentation fault (Address not mapped to object [0x10])
Segmentation fault
'

@soxzofia soxzofia added the bug label Mar 20, 2024
@mccoys
Copy link
Contributor

mccoys commented Mar 20, 2024

This is probably not a bug, but a wrong installation. Please provide more info on your setup

@soxzofia
Copy link
Author

Sorry, I really don‘t know how to present more info ,all I can do is using code 'make env'.
Here is the result:
’make env
VERSION : ??-??
SMILEICXX : mpicxx
OPENMP_FLAG : -fopenmp -D_OMP
HDF5_ROOT_DIR : /usr/local/hdf5
FFTW3_LIB_DIR :
SITEDIR : /home/wangsy/.local/lib/python3.12/site-packages
PYTHONEXE : python3
PY_CXXFLAGS : -I/usr/include/python3.12 -I/usr/include/python3.12 -I/opt/python_venv/lib/python3.12/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
PY_LDFLAGS : -L/usr/lib/x86_64-linux-gnu -lpython3.12 -ldl -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
CXXFLAGS : -Wno-reorder -D__VERSION="??-??" -DOMPI_SKIP_MPICXX -std=c++11 -Wall -Wextra -I/usr/local/hdf5/include -Isrc -Isrc/ElectroMagn -Isrc/Merging -Isrc/MovWindow -Isrc/Collisions -Isrc/Checkpoint -Isrc/MultiphotonBreitWheeler -Isrc/Patch -Isrc/Ionization -Isrc/ParticleBC -Isrc/SmileiMPI -Isrc/ElectroMagnSolver -Isrc/Species -Isrc/PartCompTime -Isrc/Profiles -Isrc/Field -Isrc/Projector -Isrc/ElectroMagnBC -Isrc/Diagnostic -Isrc/ParticleInjector -Isrc/Pusher -Isrc/Python -Isrc/Interpolator -Isrc/Particles -Isrc/DomainDecomposition -Isrc/Radiation -Isrc/picsar_interface -Isrc/Tools -Isrc/Params -Ibuild/src/Python -I/usr/include/python3.12 -I/usr/include/python3.12 -I/opt/python_venv/lib/python3.12/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -O3 -g -fopenmp -D_OMP
LDFLAGS : -L/usr/local/hdf5/lib -lhdf5 -L/usr/lib/x86_64-linux-gnu -lpython3.12 -ldl -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lm -fopenmp -D_OMP
COMPILER_INFO : g++

@mccoys
Copy link
Contributor

mccoys commented Mar 21, 2024

Can you try to run some benchmarks to see if it's the installation or the input file?

@soxzofia
Copy link
Author

No fault occurred when running tst1d and tst2d, but same segmentation fault occurred when running tst3d.

@mccoys
Copy link
Contributor

mccoys commented Mar 21, 2024

Can you provide exactly how it was run? Threads, mpis, which benchmarks, stdout.
Thanks

@soxzofia
Copy link
Author

Treads =2 , mpi =1 ,benchmarks:"tst1d_00_em_propagation.py, tst2d_00_em_propagation.py, tst3d_01_thermal_plasma.py"
smilei qs1

When running "tst3d_01_thermal_plasma.py" fault:
Stack trace (most recent call last) in thread 444282:
#8 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#7 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f6132326bbb, in
#6 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f61322a645b, in
#5 Object "/lib/x86_64-linux-gnu/libgomp.so.1", at 0x7f61327ccbdd, in
#4 Object "smilei", at 0x56044010cfeb, in
#3 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7f6132ac71de, in PyImport_AddModule
#2 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7f6132a39a9c, in
#1 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7f6132a17994, in PyUnicode_New
#0 Object "/lib/x86_64-linux-gnu/libpython3.12.so.1.0", at 0x7f61329df860, in
Segmentation fault (Address not mapped to object [0x10])
Segmentation fault

@mccoys
Copy link
Contributor

mccoys commented Mar 21, 2024

I can see that a bunch of Unicode functions have been removed in python 3.12. I only tested 3.11 for now so there might be a new incompatibility that would need fixing. I have to run some tests

@soxzofia
Copy link
Author

thank you!

@soxzofia
Copy link
Author

I‘ve changed my python3.12 to python3.11, same fault occurred when I running 3d-simulation.

@mccoys
Copy link
Contributor

mccoys commented Mar 21, 2024

I just reproduced the bug with 3.12.0, not with 3.11.6

@mccoys
Copy link
Contributor

mccoys commented Mar 21, 2024

Ok I believe it is an error introduced by Python3.12. I have asked the python guys to find out. In the meantime, I think I have found a workaround, but maybe you can try to use 3.11 as well. Remember to make clean and recompile.

@mccoys
Copy link
Contributor

mccoys commented Mar 21, 2024

So it turns out it is not a bug in python, but something not very well made in Smilei that was kind of permitted in python 3.11, but more strict in 3.12. I will try to fix this soon

@soxzofia
Copy link
Author

OK, I will run with 3.11

@soxzofia
Copy link
Author

Bravo! It seems no more segmentation fault occurred when running simulation with python3.11, thank you very much!

@mccoys
Copy link
Contributor

mccoys commented Mar 22, 2024

Should be fixed here: c1d7a32

@mccoys mccoys closed this as completed Mar 22, 2024
@soxzofia
Copy link
Author

thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants