oasys-lnls-kit / OASYS1-LNLS-ShadowOui

Widgets for ShadowOui by LNLS Optics Group
MIT License
3 stars 1 forks source link

Segmentation fault (core dumped) - With Undulator #1

Closed SergioLordano closed 2 years ago

SergioLordano commented 6 years ago

Calculating the flux of undulator beamlines with Flux widget, I got this error while SRW was running:

Segmentation fault (core dumped)

It appears that the problem is which srwlib it was calling. In my case I have my own SRW installation and $PYTHONPATH is set in .bashrc file, pointing to my own installation. SOLUTION: remove the $PYTHONPATH line in the .bashrc and restart the computer. After that, everything runs fine again. Without setting $PYTHONPATH in the .bashrc, it is also possible to include the SRW path in the simulation python script with:

import sys
sys.path.append('/path/to/srwlib')
lucarebuffi commented 6 years ago

Good to know...