Modification needed to install FLUKA on MacOS

Hello all!

A few notes to get FLUKA 4.1.1 up and running under MacOS (in my case, 10.14.6, Mojave).

As usual, it is much easier using MacPorts for the dependencies.

I found that a few modifications needed to be made to bin/fluka-config,
bin/rfluka, and src/config.mk in order to make and run the executables from the
‘binary’ distribution at Download latest FLUKA release | The official CERN FLUKA website.
I chose to use the gfortran 10 libraries for macOS.

  1. In config.mk in src I changed

CC := /opt/local/bin/gcc-mp-11
FC := /opt/local/bin/gfortran-mp-10

  1. In /bin/fluka-config I changed

Variables to be modified from the makefile during compilation

#COMPILER=“gfortran”
COMPILER=“gfortran-mp-10”

  1. In /bin/rfluka I changed gfortran to

GFOR_SYS=$(/opt/local/bin/gfortran-mp-10 -dumpversion | cut -d. -f1)

Hope these help! --DMW

Hello @WoodDM

no need to change any files.

Type this command to select the correct compiler from MacPorts
sudo port select --set gcc mp-gcc10

as documented here
Installation Docs

Cheers, Luigi

Thank you, Luigi! --Best wishes, DMW