I recently installed FLUKA and FLAIR. I tried running a test program and got the following error on the output file:
SIGBUS: Access to an undefined portion of a memory object
Any ideas of what exactly is going wrong?
I recently installed FLUKA and FLAIR. I tried running a test program and got the following error on the output file:
SIGBUS: Access to an undefined portion of a memory object
Any ideas of what exactly is going wrong?
Dear @mrivers ,
please post the full traceback printed after the error message in the_.log_ file, and let us know which FLUKA version you are using on what operating system. Thanks!
Cheers,
David
Hi David,
I’m using OSX Sonoma 14.6.1 on an M3 Mac. My FLUKA version is 4-4.1.
The full traceback is as follows:
Program received signal SIGILL: Illegal instruction.
Backtrace for this error:
Program received signal SIGBUS: Access to an undefined portion of a memory object.
Backtrace for this error:
Hello @mrivers ,
We would need more information to try debug the problem.
Can you please provide the output of these commands?
echo $PATH
which g++ gcc gfortran ar
gfortran -v
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
Hi @luillo ,
Here are the outputs:
echo $PATH
/Users/mrivers/.pyenv/shims:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Users/mrivers/.local/bin:/Users/mrivers/.local/bin:/Users/mrivers/.pyenv/versions/3.10.4/lib/python3.10/site-packages
which g++ gcc gfortran ar
/usr/bin/g++
/usr/bin/gcc
/opt/homebrew/bin/gfortran
/usr/bin/ar
gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/14.2.0/bin/../libexec/gcc/aarch64-apple-darwin23/14/lto-wrapper
Target: aarch64-apple-darwin23
Configured with: ../configure --prefix=/opt/homebrew/opt/gcc --libdir=/opt/homebrew/opt/gcc/lib/gcc/current --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran,m2 --program-suffix=-14 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 14.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=aarch64-apple-darwin23 --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (Homebrew GCC 14.2.0)
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 15.3.0.0.1.1708646388
volume: /
location: /
install-time: 1726595301
Hello @mrivers ,
I see that you have a mixed environment HomeBrew/MacPorts: this is not a good approach as libraries can be mixed and generate conflicts.
For the installation of FLUKA/Flair, it is recommended to use MacPorts (at the moment we have no working solution with HomeBrew).
Therefore, my recommendation is to use reinstall FLUKA in a Terminal where only MacPorts environments is defined.
To do this, follow these steps:
~/.bash_profile
). Something like:set_MacPorts() {
echo "set MacPorts environment to compile FLUKA"
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
}
set_HomeBrew() {
echo "set HomeBrew environment for the GitLab runner"
eval "$(/usr/local/bin/brew shellenv)"
}
Make sure that you individuate all existing modifications to the PATH
variable to include HomeBrew and MacPorts directory: these shall be included in the functions above.
Open a new terminal
Check that the environment PATH
variable does not contain any directories pointing to MacPorts or HomeBrew. If it does, check the previous steps again.
Activate the MacPorts environments: In your terminal, run set_MacPorts
Reinstall FLUKA: run make clean
and then make
Test FLUKA
Hope this helps!
Best,
Luigi
Hi @luillo,
This solution worked perfectly. (It’s probably fixed more than just my FLUKA issues.)
Thank you!