From fabio.ufla at yahoo.com.br  Tue Oct 20 22:21:10 2009
From: fabio.ufla at yahoo.com.br (=?iso-8859-1?Q?Fabio_Mathias_Corr=EAa?=)
Date: Tue, 20 Oct 2009 13:21:10 -0700 (PDT)
Subject: [Rd] Changing options in R CMD SHLIB
In-Reply-To: <alpine.LFD.2.00.0910200600080.6426@gannet.stats.ox.ac.uk>
Message-ID: <835774.86394.qm@web59706.mail.ac4.yahoo.com>

Dear,

I managed to use directives OpenMP in R.
To compile I used the gfortran directly. For example:

gfortran-shared-O2 teste.f90-fopenmp-fPIC

By using the code in R, it works perfectly!

However, I need to use some specific libraries of R, for use in C functions in Fortran 95.

When compiling using the command:

gfortran-shared-O2-o teste.f90 myrandom.c func.out -fopenmp -fPIC

However, I need to indicate the path for the compiler to use the files of the type: Rmath.h, R.h and others.

I observed the project ROMP and the library Rcsdp. The developers of the library Rcsdp in the installation file present the following modification in the compiler for enable the OpenMP. 


CFLAGS=CFLAGS=-O3 -march=nocona -m64 -fprefetch-loop-arrays -ftree-vectorize -ftree-vectorizer-verbose=1 -fopenmp  -ansi -Wall -DNOSHORTS -DBIT64 -DUSEOPENMP -I../include


LIBS=LIBS=-static -L../lib -lsdp -llapack -lptf77blas -lptcblas -latlas -lgomp -lrt -lpthread -lgfortran -lm 



 I already tried

~/Fortran/parallel/tri $ export PKG_FCFLAGS= -fopenmp
bash: export: `-fopenmp': not a valid identifier


I could indicate the path of the files R.h, Rmath.h and other to the gfortran? How? 

Thank you!

? ???????????? F?bio Mathias Corr?a
Estat?stica e Experimenta??o Agropecu?ria/UFLA




      ____________________________________________________________________________________
Veja quais s?o os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



[Rd] Changing options in R CMD SHLIB
=?iso-8859-1?Q?Fabio_Mathias_Corr=EAa?=