Re: [R-pkg-devel] Suggesting gurobi
On 05.06.2021 01:47, Dirk Eddelbuettel wrote: On 4 June 2021 at 16:21, Balasubramanian Narasimhan wrote: | Suggests" would trigger an attempt to install gurobi, which is not on CRAN. To my understanding that is not the case. It would only do so if and when install.packages() is asked to also install packages in Suggests:. And point of Suggests: is that that is not automagic. I actually Suggests, together with Additional_Repositories: (for which Noah may have to set the repo up, I have not checked if gurobi has one) may be the correct call. That would indeed be ideal. As far as I know there is not CRAN-like repo with gurobi. Following the CRAN policies you can exolain in the Description field of the DESCRIPTION file how to get that package to your users. Best, Uwe Ligges Dirk __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] OpenMP on MacOS
Ensure you surround all your omp pragmas like so: #ifdef _OPENMP #pragma omp parallel ... #endif Essentially, detecting the operating system is not enough -- you need to condition your use of OpenMP if and only if _OPENMP is available. You should also do the same for #if _OPENMP #include #endif Note that this will also make your loops sequential when OpenMP is not available. On Mon, 7 Jun 2021 at 21:52, Konrad Krämer via R-package-devel wrote: > > Dear all, > I have a problem regarding OpenMP on Mac OS. Recently I submitted my package > to CRAN (https://cran.r-project.org/web/packages/paropt/index.html). However, > there seems to be a problem with 'fopenmp' on Mac OS using clang++. I have > read many forums regarding the topic. Thus, I know that there is no support > for OpenMp on Mac OS (at least using the default clang compiler). > The error was: clang: error: unsupported option '-fopenmp' > Is it possible to detect the operating system and set according to this the > compile flags and use also a sequentiell version of the code? > Or is there a better way to cope with this problem? > Many thanks in advance for your help. > Regards, > Konrad > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] OpenMP on MacOS
See https://cran.r-project.org/doc/manuals/r-release/R-exts.html#OpenMP-support for a way to enable OpenMP when it's available. If you need more detailed checks for the OpenMP support in the toolchain, you would need to use a configure script. For example, I'm using an autoconf configure script for the pense package ( https://github.com/dakep/pense-rpkg/blob/main/configure.ac) to detect if (and how) OpenMP is supported and whether the toolchain supports parts of more recent OpenMP versions. Best, David On Mon, Jun 7, 2021 at 7:52 AM Konrad Krämer via R-package-devel < r-package-devel@r-project.org> wrote: > Dear all, > I have a problem regarding OpenMP on Mac OS. Recently I submitted my > package to CRAN (https://cran.r-project.org/web/packages/paropt/index.html). > However, there seems to be a problem with 'fopenmp' on Mac OS using > clang++. I have read many forums regarding the topic. Thus, I know that > there is no support for OpenMp on Mac OS (at least using the default clang > compiler). > The error was: clang: error: unsupported option '-fopenmp' > Is it possible to detect the operating system and set according to this > the compile flags and use also a sequentiell version of the code? > Or is there a better way to cope with this problem? > Many thanks in advance for your help. > Regards, > Konrad > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > -- David Kepplinger, PhD https://www.dkepplinger.org [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] OpenMP on MacOS
Dear all, I have a problem regarding OpenMP on Mac OS. Recently I submitted my package to CRAN (https://cran.r-project.org/web/packages/paropt/index.html). However, there seems to be a problem with 'fopenmp' on Mac OS using clang++. I have read many forums regarding the topic. Thus, I know that there is no support for OpenMp on Mac OS (at least using the default clang compiler). The error was: clang: error: unsupported option '-fopenmp' Is it possible to detect the operating system and set according to this the compile flags and use also a sequentiell version of the code? Or is there a better way to cope with this problem? Many thanks in advance for your help. Regards, Konrad [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel