Loris Bennett <[email protected]> writes:
> Hi,
>
> I am trying to install
>
> RStan-2.18.2-foss-2018b-R-3.5.1.eb
>
> with the additional compiler flag:
>
> -DSTAN_THREADS
>
> I want to us a hook and tried
>
> def pre_configure_hook(self, *args, **kwargs):
>
> """Pre-build hook"""
>
> # Build RStan with threading
> ##################################################
> if self.name == 'RStan':
> self.cfg['buildopts'] = self.cfg['buildopts'] \
> + 'CXXFLAGS="$CXXFLAGS -DSTAN_THREADS"'
> self.log.info("[pre-build hook] Added -DSTAN_THREADS to CXXFLAGS to
> buildopts")
> return
>
> In the log file I can see that the hooks is called, but the flag
> doesn't seem to be used.
>
> What am I doing wrong?
I have also tried adding
buildopts = "-DSTAN_THREADS"
to my own copy of the easyconfig. This does appear in
the log file has having been set:
== 2019-11-21 09:20:23,543 easyconfig.py:583 INFO setting easyconfig
parameter buildopts: value -DSTAN_THREADS (type: <type 'str'>)
but it is not passed to the compiler. The compile lines do contain
other macros, but these are obviously coming from elsewhere:
g++ -std=gnu++14
-I"/trinity/shared/easybuild/software/R/3.5.1-foss-2018b/lib64/R/include"
-DNDEBUG -I"../inst/include"
-I"`"/trinity/shared/easybuild/software/R/3.5.1-foss-2018b/lib64/R/bin/Rscript"
--vanilla -e "cat(system.file('include', 'src', package =
'StanHeaders'))"`" -DBOOST_DISABLE_ASSERTS
-DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION ...
Any ideas how I could insert "-DSTAN_THREADS"? Or can this kind of
thing only be done by patching the Makefile?
Cheers,
Loris
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email [email protected]