Hi,
I am trying to install flang on macOS, throught the MacPorts utility.
I did first sudo port install flang-19 +openmp
as recommended on various sites.
First problem : I can’t use OpenMP:
$ flang-mp-19 conv.f90 testconv.f90 -fopenmp
error: Semantic errors in testconv.f90
./testconv.f90:2:5: error: Cannot read module file for module 'omp_lib': Source file 'omp_lib.mod' was not found
use omp_lib
^^^^^^^
./testconv.f90:27:10: error: No explicit type declared for 'omp_get_wtime'
tic = omp_get_wtime()
^^^^^^^^^^^^^
Linking with OpenMP works, though, it’s just that it can’t find the mod
file (and I couldn’t find it either in the installation directories).
Second problem: the executable name is flang-mp-19
, not flang
. Not a big deal, but would be better with the simpler name. Normally in MacPorts this is managed with a special command to select the default version, which works for gcc or clang: sudo port select --set mp-clang-19
. But it has no effect on flang.