Re: [R-pkg-devel] OpenMP and CRAN checks

2023-04-05 Thread Rodrigo Tobar Carrizo
trick. The vignettes and tests were not as bad. We'll try a resubmission and see how we fare. Thanks again, Rodrigo Von: Dirk Eddelbuettel Gesendet: Dienstag, 4. April 2023 22:00 An: Rodrigo Tobar Carrizo Cc: r-package-devel@r-project.org Betreff: R

Re: [R-pkg-devel] OpenMP and CRAN checks

2023-04-04 Thread Dirk Eddelbuettel
Hi Rodrigo, This came up recently again on social media where I illustrated how the tiledb package deals with it. So a quick recap: First off, let's make the goals clear. We want to _simultaneously_ - abide by CRAN Policy rules and cap ourselves to two cores there - do not impose any limits

Re: [R-pkg-devel] OpenMP on MacOS

2021-06-07 Thread Hugh Parsonage
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 #endi

Re: [R-pkg-devel] OpenMP on MacOS

2021-06-07 Thread David Kepplinger
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

Re: [R-pkg-devel] OpenMP variable not specified in enclosing 'parallel'

2020-03-23 Thread Ivan Krylov
On Mon, 23 Mar 2020 15:29:20 +0100 Emil Sjørup wrote: > const int iMaxLag = 20; > error: ‘iMaxLag’ not specified in enclosing ‘parallel’ > error: ‘iMaxLag’ is predetermined ‘shared’ for ‘shared’ This looks like a compiler bug to me. g++ seems to forget the rule that "const" variables are suppo

Re: [R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

2016-08-03 Thread Ott Toomet
Hi Mark, if you consider backward compatibility (and potential compatibility with other compilers) a worthy goal, you can easily reduce manually in a '#pragma omp critical' block. An example here (around the middle of the page): http://www.parallelr.com/r-and-openmp-boosting-compiled-code-on-mult

Re: [R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

2016-08-03 Thread Ege Rubak
I am using #pragma omp statements all over the place and this is the only type causing crashes. I'm guessing it has something to do with travis building on a 12.04 ubuntu VM with a rather old gcc (4.6.3). 2. Is there a workaround, or should I just go for another build service (which one)? Yo

Re: [R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

2016-08-03 Thread Mark van der Loo
Thanks Dirk! that did it. I wasn't aware of the trusty 14.04 option. Just adding sudo: required dist: trusty at the top of my .travis.yaml solved it https://docs.travis-ci.com/user/trusty-ci-environment/, Cheers, Mark Op wo 3 aug. 2016 om 14:38 schreef Dirk Eddelbuettel : > > On 3 August

Re: [R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

2016-08-03 Thread Dirk Eddelbuettel
On 3 August 2016 at 08:13, Mark van der Loo wrote: | Dear pkg developers, | | | I'm working on a package using C code and openMP. The package builds and | tests fine on my own machine[1] and also on r-hub[2]. However on travis-ci | the build crashes[3] with the following message (plus a few simi

Re: [R-pkg-devel] openmp

2015-08-24 Thread Dirk Eddelbuettel
On 24 August 2015 at 09:14, Joshua N Pritikin wrote: | On Sun, Aug 23, 2015 at 08:01:08AM +0200, Mark van der Loo wrote: | >Afaik, openmp is available on windows. According to writing R | >extensions: | > | >There is nothing to say what version of OpenMP is supported: version | >3

Re: [R-pkg-devel] openmp

2015-08-24 Thread Joshua N Pritikin
On Sun, Aug 23, 2015 at 08:01:08AM +0200, Mark van der Loo wrote: >Afaik, openmp is available on windows. According to writing R >extensions: > >There is nothing to say what version of OpenMP is supported: version >3.0 (May 2008) is supported by recent versions of the Linux, _Windo