Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread Dirk Eddelbuettel

On 13 April 2015 at 10:26, JJ Allaire wrote:
| We only see the "long long" warnings with clang on Debian testing with
| -pedantic enabled.

Weird. I don't think I encountered such a difference before.

| Note that not all CRAN maintainers test under this
| configuration so sometimes it depends on who is reviewing the
| submission. 

AFAIK it is an "OR" -- any one failure pushes you back to start.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread Dirk Eddelbuettel

On 13 April 2015 at 09:42, Gábor Csárdi wrote:
| On Mon, Apr 13, 2015 at 8:32 AM, Dirk Eddelbuettel  wrote:
| 
|
| On 13 April 2015 at 08:03, JJ Allaire wrote:
| | I'll have to take a closer look at the warnings. One other issue that
| | needs to be resolved prior to the next submission to CRAN revolves
| | around pedantic warnings on Debian testing that prohibit "long long"
| | (used by both TinyThread and TBB). The easy workaround is
| | SystemRequirements: C++11 however this will mean that package won't
| | compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
| | systems. Perhaps I can modify TinyThread and TBB to no longer use
| | "long long" but I'll need to do this very carefully.
| 
| I never found another way to get 'long long' besides requiring C++11.
| 
| 
| It might be fine, actually. I have a package with long long on CRAN, and yes,
| they asked me to "fix it", but like for you, it is in upstream code, so I am
| not really comfortable removing it, and CRAN seems to be OK with it now.
| 
| Other packages seem to have it, too: https://github.com/search?q=
| user%3Acran+%22long+long%22&type=Code&utf8=%E2%9C%93
| I doubt that these all require C++11.
| 
| Also, all compilers they use have long long, so what is the point, really?

It has been discussed on this list a million times. Someone define C99 to be
ok (has long long) yet insists on C++98 (does not).  End of story "because
C++03 does not exist in that parallel universe" but switching to C++11 helps.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread JJ Allaire
We only see the "long long" warnings with clang on Debian testing with
-pedantic enabled. Note that not all CRAN maintainers test under this
configuration so sometimes it depends on who is reviewing the
submission. My first preference would be to ensure that these warnings
don't occur so we always pass muster. However as you point out it can
be fragile and risky to modify upstream code so perhaps asking for an
exception is the right course.





On Mon, Apr 13, 2015 at 9:42 AM, Gábor Csárdi  wrote:
> On Mon, Apr 13, 2015 at 8:32 AM, Dirk Eddelbuettel  wrote:
>>
>>
>> On 13 April 2015 at 08:03, JJ Allaire wrote:
>> | I'll have to take a closer look at the warnings. One other issue that
>> | needs to be resolved prior to the next submission to CRAN revolves
>> | around pedantic warnings on Debian testing that prohibit "long long"
>> | (used by both TinyThread and TBB). The easy workaround is
>> | SystemRequirements: C++11 however this will mean that package won't
>> | compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
>> | systems. Perhaps I can modify TinyThread and TBB to no longer use
>> | "long long" but I'll need to do this very carefully.
>>
>> I never found another way to get 'long long' besides requiring C++11.
>
>
> It might be fine, actually. I have a package with long long on CRAN, and
> yes, they asked me to "fix it", but like for you, it is in upstream code, so
> I am not really comfortable removing it, and CRAN seems to be OK with it
> now.
>
> Other packages seem to have it, too:
> https://github.com/search?q=user%3Acran+%22long+long%22&type=Code&utf8=%E2%9C%93
> I doubt that these all require C++11.
>
> Also, all compilers they use have long long, so what is the point, really?
>
> Gabor
>
> [...]
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread Gábor Csárdi
On Mon, Apr 13, 2015 at 8:32 AM, Dirk Eddelbuettel  wrote:

>
> On 13 April 2015 at 08:03, JJ Allaire wrote:
> | I'll have to take a closer look at the warnings. One other issue that
> | needs to be resolved prior to the next submission to CRAN revolves
> | around pedantic warnings on Debian testing that prohibit "long long"
> | (used by both TinyThread and TBB). The easy workaround is
> | SystemRequirements: C++11 however this will mean that package won't
> | compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
> | systems. Perhaps I can modify TinyThread and TBB to no longer use
> | "long long" but I'll need to do this very carefully.
>
> I never found another way to get 'long long' besides requiring C++11.
>

It might be fine, actually. I have a package with long long on CRAN, and
yes, they asked me to "fix it", but like for you, it is in upstream code,
so I am not really comfortable removing it, and CRAN seems to be OK with it
now.

Other packages seem to have it, too:
https://github.com/search?q=user%3Acran+%22long+long%22&type=Code&utf8=%E2%9C%93
I doubt that these all require C++11.

Also, all compilers they use have long long, so what is the point, really?

Gabor

[...]
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread Gábor Csárdi
On Mon, Apr 13, 2015 at 8:11 AM, JJ Allaire  wrote:

> One other issue to run down is detecting the current architecture on
> Solaris builds. Right now we force 32-bit in Makevars as follows:
>
> ifeq ($(USE_TBB), SunOS)
>MAKE_ARGS += arch=ia32
> endif
>
> Does anyone know if there is a variable we could inspect from within
> Makevars that would tell us the architecture for R itself? (as opposed
> to the underlying system).
>

I think the way to go is just to strip the arch flags from the TBB config,
like here:
https://github.com/gaborcsardi/RcppParallel/commit/8d9b818042390ded7d00f9ef3cc4d5f9e4096b53
and then make sure that TBB is compiled with the appropriate compilers and
flags, taken from
R CMD config CXX
R CMD config CXXFLAGS
...
etc.

On Solaris R is 32 bit by default, and if it is not, the appropriate arch
flags will be reported by R CMD config. This solutions also has the
advantage that if CRAN's config changes, you likely don't need to update
anything.

If you still want to detect the arch, then AFAIK it is in .Platform$r_arch.
This is empty on the 32 bit Solaris, I guess because this is the default
arch on this platform. Maybe it is set something else on 64 bit Solaris,
but I am not sure. To decide between 32 bit and 64 bit I think you can use
.Machine$sizeof.pointer.

G.


>
> On Mon, Apr 13, 2015 at 8:03 AM, JJ Allaire  wrote:
> > That's excellent I just updated the branch to reflect this change
> > and also successfully ran the tests on the Solaris config that you
> > provided me access to.
> >
> > I'll have to take a closer look at the warnings. One other issue that
> > needs to be resolved prior to the next submission to CRAN revolves
> > around pedantic warnings on Debian testing that prohibit "long long"
> > (used by both TinyThread and TBB). The easy workaround is
> > SystemRequirements: C++11 however this will mean that package won't
> > compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
> > systems. Perhaps I can modify TinyThread and TBB to no longer use
> > "long long" but I'll need to do this very carefully.
> >
> >
> >
> >
> > On Sun, Apr 12, 2015 at 10:30 PM, Gábor Csárdi 
> wrote:
> >> Hi JJ & all,
> >>
> >> I had some time, had an idea, and made it to work. The problem was that
> TBB
> >> was not compiled with the same flags as R and the rest of the R
> package, so
> >> just had to find what is the difference that is incompatible.
> >>
> >> It is simple, you need to compile TBB with -library=stlport4
> >> So if you change line 34 in SunOS.suncc.inc  to
> >>
> >> CPLUS = CC -library=stlport4
> >>
> >> then it compiles and installs fine. What's even better, the tests run
> fine,
> >> too. They spit out a lot of compiler warnings, but they all pass.
> >>
> >> Best,
> >> Gabor
> >>
> >> On Wed, Apr 8, 2015 at 11:38 AM, Gábor Csárdi 
> >> wrote:
> >>>
> >>> Ok, the server seems to work. JJ, I'll send you a private email. If
> anyone
> >>> wants access, please email me in private.
> >>>
> >>> Remember that this is just a mac mini, so it might not be super fast.
> It
> >>> seems fast enough for a single user, though.
> >>>
> >>> Gabor
> >>>
> >>> On Tue, Apr 7, 2015 at 7:17 PM, Gábor Csárdi 
> >>> wrote:
> 
>  On Tue, Apr 7, 2015 at 6:50 PM, Jeroen Ooms 
> wrote:
>  [...]
> >
> > So that's why I thought they probably use GCC for packages that don't
> > work with Solaris Studio.
> 
> 
>  I see. That would indeed make sense. G.
> 
> >>>
> >>
>
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread Dirk Eddelbuettel

On 13 April 2015 at 08:03, JJ Allaire wrote:
| I'll have to take a closer look at the warnings. One other issue that
| needs to be resolved prior to the next submission to CRAN revolves
| around pedantic warnings on Debian testing that prohibit "long long"
| (used by both TinyThread and TBB). The easy workaround is
| SystemRequirements: C++11 however this will mean that package won't
| compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
| systems. Perhaps I can modify TinyThread and TBB to no longer use
| "long long" but I'll need to do this very carefully.

I never found another way to get 'long long' besides requiring C++11.  

Also put me down as (at least mildly) against modifying upstream code and
diverging from it only because one gentleman things C++2003 never existed.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


[Rcpp-devel] [ANN] RcppArmadillo 0.5.000.0

2015-04-13 Thread Dirk Eddelbuettel

Congrats to Conrad for releasing Armadillo 5.000.  Following a full test of a
pre-release, I prepared RcppArmadillo 0.5.000.0 which also passed all tests
against all 115 reverse depends (modulo two know, old issues).

But after a day of testing at CRAN it is stuck failing over two packages
which work fine at my end (not that it matters: but these are dfcomb, dfmta
both of which simply depend on the Boost headers package BH as well as 
RcppProgess).

So to not deprive anybody of the package I just placed it into drat archive
on GitHub that is part of the RcppCore org.  So if you have drat install do

   drat::addRepo("RcppCore")
   update.packages() # update all your packages

or 

   drat::addRepo("RcppCore")
   install.packages("RcppArmadillo") # install just most recent 
RcppArmadillo

I presume we will get RcppArmadillo onto CRAN at some point but I don't know 
when.

Cheers, Dirk

PS More on drat at my blog, the drat package page at CRAN or my drat pages.

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread JJ Allaire
One other issue to run down is detecting the current architecture on
Solaris builds. Right now we force 32-bit in Makevars as follows:

ifeq ($(USE_TBB), SunOS)
   MAKE_ARGS += arch=ia32
endif

Does anyone know if there is a variable we could inspect from within
Makevars that would tell us the architecture for R itself? (as opposed
to the underlying system).


On Mon, Apr 13, 2015 at 8:03 AM, JJ Allaire  wrote:
> That's excellent I just updated the branch to reflect this change
> and also successfully ran the tests on the Solaris config that you
> provided me access to.
>
> I'll have to take a closer look at the warnings. One other issue that
> needs to be resolved prior to the next submission to CRAN revolves
> around pedantic warnings on Debian testing that prohibit "long long"
> (used by both TinyThread and TBB). The easy workaround is
> SystemRequirements: C++11 however this will mean that package won't
> compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
> systems. Perhaps I can modify TinyThread and TBB to no longer use
> "long long" but I'll need to do this very carefully.
>
>
>
>
> On Sun, Apr 12, 2015 at 10:30 PM, Gábor Csárdi  wrote:
>> Hi JJ & all,
>>
>> I had some time, had an idea, and made it to work. The problem was that TBB
>> was not compiled with the same flags as R and the rest of the R package, so
>> just had to find what is the difference that is incompatible.
>>
>> It is simple, you need to compile TBB with -library=stlport4
>> So if you change line 34 in SunOS.suncc.inc  to
>>
>> CPLUS = CC -library=stlport4
>>
>> then it compiles and installs fine. What's even better, the tests run fine,
>> too. They spit out a lot of compiler warnings, but they all pass.
>>
>> Best,
>> Gabor
>>
>> On Wed, Apr 8, 2015 at 11:38 AM, Gábor Csárdi 
>> wrote:
>>>
>>> Ok, the server seems to work. JJ, I'll send you a private email. If anyone
>>> wants access, please email me in private.
>>>
>>> Remember that this is just a mac mini, so it might not be super fast. It
>>> seems fast enough for a single user, though.
>>>
>>> Gabor
>>>
>>> On Tue, Apr 7, 2015 at 7:17 PM, Gábor Csárdi 
>>> wrote:

 On Tue, Apr 7, 2015 at 6:50 PM, Jeroen Ooms  wrote:
 [...]
>
> So that's why I thought they probably use GCC for packages that don't
> work with Solaris Studio.


 I see. That would indeed make sense. G.

>>>
>>
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread Romain François

> Le 13 avr. 2015 à 14:03, JJ Allaire  a écrit :
> 
> That's excellent I just updated the branch to reflect this change
> and also successfully ran the tests on the Solaris config that you
> provided me access to.
> 
> I'll have to take a closer look at the warnings. One other issue that
> needs to be resolved prior to the next submission to CRAN revolves
> around pedantic warnings on Debian testing that prohibit "long long"
> (used by both TinyThread and TBB). The easy workaround is
> SystemRequirements: C++11 however this will mean that package won't
> compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
> systems. Perhaps I can modify TinyThread and TBB to no longer use
> "long long" but I'll need to do this very carefully.

FWIW tbb with C++11, in particular lambdas is awesome


> On Sun, Apr 12, 2015 at 10:30 PM, Gábor Csárdi  wrote:
>> Hi JJ & all,
>> 
>> I had some time, had an idea, and made it to work. The problem was that TBB
>> was not compiled with the same flags as R and the rest of the R package, so
>> just had to find what is the difference that is incompatible.
>> 
>> It is simple, you need to compile TBB with -library=stlport4
>> So if you change line 34 in SunOS.suncc.inc  to
>> 
>> CPLUS = CC -library=stlport4
>> 
>> then it compiles and installs fine. What's even better, the tests run fine,
>> too. They spit out a lot of compiler warnings, but they all pass.
>> 
>> Best,
>> Gabor
>> 
>> On Wed, Apr 8, 2015 at 11:38 AM, Gábor Csárdi 
>> wrote:
>>> 
>>> Ok, the server seems to work. JJ, I'll send you a private email. If anyone
>>> wants access, please email me in private.
>>> 
>>> Remember that this is just a mac mini, so it might not be super fast. It
>>> seems fast enough for a single user, though.
>>> 
>>> Gabor
>>> 
>>> On Tue, Apr 7, 2015 at 7:17 PM, Gábor Csárdi 
>>> wrote:
 
 On Tue, Apr 7, 2015 at 6:50 PM, Jeroen Ooms  wrote:
 [...]
> 
> So that's why I thought they probably use GCC for packages that don't
> work with Solaris Studio.
 
 
 I see. That would indeed make sense. G.
 
>>> 
>> 
> ___
> Rcpp-devel mailing list
> Rcpp-devel@lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-13 Thread JJ Allaire
That's excellent I just updated the branch to reflect this change
and also successfully ran the tests on the Solaris config that you
provided me access to.

I'll have to take a closer look at the warnings. One other issue that
needs to be resolved prior to the next submission to CRAN revolves
around pedantic warnings on Debian testing that prohibit "long long"
(used by both TinyThread and TBB). The easy workaround is
SystemRequirements: C++11 however this will mean that package won't
compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS
systems. Perhaps I can modify TinyThread and TBB to no longer use
"long long" but I'll need to do this very carefully.




On Sun, Apr 12, 2015 at 10:30 PM, Gábor Csárdi  wrote:
> Hi JJ & all,
>
> I had some time, had an idea, and made it to work. The problem was that TBB
> was not compiled with the same flags as R and the rest of the R package, so
> just had to find what is the difference that is incompatible.
>
> It is simple, you need to compile TBB with -library=stlport4
> So if you change line 34 in SunOS.suncc.inc  to
>
> CPLUS = CC -library=stlport4
>
> then it compiles and installs fine. What's even better, the tests run fine,
> too. They spit out a lot of compiler warnings, but they all pass.
>
> Best,
> Gabor
>
> On Wed, Apr 8, 2015 at 11:38 AM, Gábor Csárdi 
> wrote:
>>
>> Ok, the server seems to work. JJ, I'll send you a private email. If anyone
>> wants access, please email me in private.
>>
>> Remember that this is just a mac mini, so it might not be super fast. It
>> seems fast enough for a single user, though.
>>
>> Gabor
>>
>> On Tue, Apr 7, 2015 at 7:17 PM, Gábor Csárdi 
>> wrote:
>>>
>>> On Tue, Apr 7, 2015 at 6:50 PM, Jeroen Ooms  wrote:
>>> [...]

 So that's why I thought they probably use GCC for packages that don't
 work with Solaris Studio.
>>>
>>>
>>> I see. That would indeed make sense. G.
>>>
>>
>
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel