[R-sig-hpc] Makevars.in - changing compiler

George Ostrouchov ostrouchovg at ornl.gov
Wed Dec 8 19:13:40 CET 2010


After some more searching, I think the answer is no. But it probably 
also makes more sense to align the compiler with R and Rmpi rather than 
with NetCDF4 anyway. My initial thought was to use MPI information 
provided by nc-config of NetCDF4, and this was only mpicc.

So I will work through the PKG_* variables of Makevars to provide the 
MPI includes and libs like Hao does in Rmpi.

Cheers,
George

On 12/8/10 9:17 AM, George Ostrouchov wrote:
> Hi Dirk,
>
> Here is some more detail that I should have included earlier. I am
> extending the ncdf4 package to include parallel I/O (already available
> in NetCDF4) so it needs Open MPI includes and libs. Just swapping the
> compiler to mpicc will take care of things. ncdf4 uses autoconf and the
> Makevars.in mechanism. Can the package compiler be specified this way?
>
> Thanks,
> George
>
> On 12/7/10 11:52 PM, Dirk Eddelbuettel wrote:
>> On 7 December 2010 at 23:44, George Ostrouchov wrote:
>> | Is it possible to set a package compiler via Makevars.in? I need to
>> | substitute mpicc (an Open MPI wrapper compiler). My attempts just
>> | setting CC=mpicc in Makevars.in have failed.
>>
>> For an R package?
>>
>> | Is Makevars just "included before the default `Makefile'" as it states
>> | in the "Writing R Extensions" manual or is there more to it?
>>
>> Here is what the current Rmpi has in src/Makefile.in:
>>
>>     # -*- Makefile -*-  vim : ft = make
>>
>>     PKG_CPPFLAGS = @DEFS@ @PKG_CPPFLAGS@
>>     PKG_CFLAGS   = $(ARCHCFLAGS)
>>     PKG_LIBS     = @PKG_LIBS@ $(ARCHLIB)
>>
>> As you can see, it only sets arguments to the compiler, not the compiler
>> itself.
>>
>> Rmpi is a pretty good package to study as Hao as been diligently working at
>> it for many years, and has it working for a great number of system and
>> compiler choices.
>>
>> Did that help? If not please rephrase the question.
>>
>> Cheers, Dirk
>>

-- 
George Ostrouchov, Ph.D.
Statistics and Data Sciences Group
Computer Science and Mathematics Division
Oak Ridge National Laboratory
(865) 574-3137  http://www.csm.ornl.gov/~ost



More information about the R-sig-hpc mailing list