[Rcpp-devel] RcppParallel on Solaris

Gábor Csárdi csardi.gabor at gmail.com
Mon Apr 13 15:28:06 CEST 2015


On Mon, Apr 13, 2015 at 8:11 AM, JJ Allaire <jj.allaire at gmail.com> 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 <jj.allaire at gmail.com> 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 <csardi.gabor at gmail.com>
> 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 <csardi.gabor at gmail.com>
> >> 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 <csardi.gabor at gmail.com>
> >>> wrote:
> >>>>
> >>>> On Tue, Apr 7, 2015 at 6:50 PM, Jeroen Ooms <jeroenooms at gmail.com>
> 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.
> >>>>
> >>>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150413/847b5b61/attachment-0001.html>


More information about the Rcpp-devel mailing list