Hello Naresh,

If you don't get a good answer here, consider asking later at
r-sig-...@r-project.org.

В Sun, 16 Mar 2025 20:28:49 +0000
Naresh Gurbuxani <naresh_gurbux...@hotmail.com> пишет:

> I installed gfortran 14.2 using package available at
> https://mac.r-project.org.  Then I installed openmp support (17.0.6)
> using package available at https://mac.r-project.org/openmp/.

These are needed to build source packages for the CRAN build of R using
the Apple toolchain. Although if you install the CRAN build of R, it
should be possible to install the pre-built packages, including
data.table, with OpenMP support. (CRAN builds of R for macOS include
their own copy of OpenMP runtime starting with R-4.3.)

> ~ $ which gfortran 
> /usr/local/bin/gfortran
> ~ $ gfortran --version
> GNU Fortran (GCC) 14.2.0
> ~ $ clang --version
> Apple clang version 16.0.0 (clang-1600.0.26.6)
> Target: x86_64-apple-darwin24.3.0
> Thread model: posix
> InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Doesn't the MacPorts build of R use its own toolchain?
https://github.com/macports/macports-ports/blob/bc07a46df685778bc33530c2dd09050be07a6a41/math/R/Portfile#L40-L41

Check the output of R CMD config CC (is it /opt/local/bin/clang-mp-18?)
and try to find out how to enable OpenMP support for that compiler.
Does it need a separate installation of the libomp port?

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to