I have been unable to install data.table with openmp support. Following Ivan's suggestion, I checked this:
~ $ R CMD config CC /opt/local/bin/clang-mp-18 Has anyone installed data.table with openmp support for this compiler? On my Intel mac mini with 15.3.2 Sequoia, I followed the instructions given at https://mac.r-project.org. It seems that enabling openmp support via MacPorts install needs a different method. Here is what I have done: Installed gfortran 14.2 using package available at https://mac.r-project.org. Installed openmp support (17.0.6) using package available at https://mac.r-project.org/openmp/. liblzma, pcre2, and bzip2 were installed by MacPorts. I do not have a Makevars file. Without Makevars file, in the past I had successfully installed data.table with openmp support. Thanks, Naresh ~ $ 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 ~ $ which clang /usr/bin/clang ~ $ ls /usr/local/lib/libomp.dylib /usr/local/lib/libomp.dylib ~ $ ls /usr/local/include/omp-tools.h /usr/local/include/omp-tools.h ~ $ ls /usr/local/include/omp.h /usr/local/include/omp.h ~ $ ls /usr/local/include/ompt.h /usr/local/include/ompt.h ~ $ port installed xz* The following ports are currently installed: xz @5.6.4_0 (active) xz-bootstrap @5.6.4_0 (active) ~ $ port installed pcre2 bzip2 The following ports are currently installed: bzip2 @1.0.8_0 (active) pcre2 @10.45_0 (active) ~ $ export $LDFLAGS declare -x CLICOLOR="1" declare -x COLUMNS="92" declare -x DISPLAY="Macmini.fios-router.home" declare -x EDITOR="/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs" declare -x EMAIL="naresh_gurbux...@hotmail.com" declare -x HOME="/Users/nareshgurbuxani" declare -x INFOPATH=":/usr/local/texlive/2024/texmf-dist/doc/info" declare -x INSIDE_EMACS="29.4,comint" declare -x LANG="en_US.UTF-8" declare -x LOGNAME="nareshgurbuxani" declare -x LSCOLORS="GxFxCxDxBxegedabagaced" declare -x MANPATH=":/usr/local/texlive/2024/texmf-dist/doc/man" declare -x NAME="Naresh Gurbuxani" declare -x OLDPWD declare -x PATH="/usr/local/texlive/2024/bin/universal-darwin:/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:/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:/usr/local/texlive/2024/bin/universal-darwin" declare -x PS1="\\W \$ " declare -x PWD="/Users/nareshgurbuxani" declare -x SHELL="/bin/bash" declare -x SHLVL="2" declare -x SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.Wok8stg6Ex/Listeners" declare -x TERM="dumb" declare -x TERMCAP="" declare -x TERM_PROGRAM="Apple_Terminal" declare -x TERM_PROGRAM_VERSION="455" declare -x TERM_SESSION_ID="32510F68-CEC8-48D1-9C02-4A8B7B6F18D2" declare -x TMPDIR="/var/folders/nb/2vppcjgd19l_h9brvzgdjcm40000gn/T/" declare -x USER="nareshgurbuxani" declare -x XPC_FLAGS="0x0" declare -x XPC_SERVICE_NAME="0" declare -x __CFBundleIdentifier="com.apple.Terminal" declare -x __CF_USER_TEXT_ENCODING="0x1F5:0x0:0x0" ~ $ xcode-select --version xcode-select version 2409. ~ $ port installed R The following ports are currently installed: R @4.4.3_0+aqua+builtin_lapack+cairo+gcc14+openmp+tcltk+x11 (active) ~ $ Rscript -e 'sessionInfo()' R version 4.4.3 (2025-02-28) Platform: x86_64-apple-darwin24.3.0 Running under: macOS Sequoia 15.3.2 Matrix products: default BLAS: /opt/local/Library/Frameworks/R.framework/Versions/4.4/Resources/lib/libRblas.dylib LAPACK: /opt/local/Library/Frameworks/R.framework/Versions/4.4/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 time zone: America/New_York tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.4.3 ~ $ ________________________________________ From: Ivan Krylov <ikry...@disroot.org> Sent: Monday, March 17, 2025 5:37 AM To: Naresh Gurbuxani <naresh_gurbux...@hotmail.com> Cc: r-h...@r-project.org <r-h...@r-project.org> Subject: Re: [R] MacPorts install of data.table lacks openmp support Hello Naresh, If you don't get a good answer here, consider asking later at R-SIG-Mac@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-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac