[Rd] Dynamic Library linked with Parallel Intel MKL

2009-06-16 Thread Markus Jochmann

Hi!

I call some external C++ code from R using dyn.load() and .C(). My dynamic
library is linked to the parallel Intel MKL libraries and thus should make
use of my quadcore processor. In fact, it does if I call it from a C++
program but not if I call it from R 2.8.1 packaged by Ubuntu (there it only
uses one core).

Is there some trick? Do I need to link the whole of R with parallel MKL?

Thanks a lot,
Markus.
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Library-linked-with-Parallel-Intel-MKL-tp24053462p24053462.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Building a package with BLAS under Windows

2009-07-21 Thread Markus Jochmann

Hi everybody:

I am writing a package that includes C code that uses the BLAS library. My
Makevars looks like

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS).

If I check and build the package under Linux on my own computer everything
works fine. However, if I submit the package to win-builder I get the
following error messages:

g++ -shared -s -o bzipl.dll tmp.def ars.o bzipl.o cvm_arrays.o cvm_axpym.o
cvm_cmatrix.o cvm_cmexp.o cvm_cmplx.o cvm_copym.o cvm_cpoly.o cvm_cvector.o
cvm_dmexp.o cvm_dpoly.o cvm_globals.o cvm_icamax.o cvm_icamin.o cvm_idamax.o
cvm_idamin.o cvm_infnm.o cvm_isamax.o cvm_isamin.o cvm_izamax.o cvm_izamin.o
cvm_npoly.o cvm_rmatrix.o cvm_rvector.o cvm_scalm.o cvm_scmatrix.o
cvm_smexp.o cvm_spoly.o cvm_srmatrix.o cvm_utils.o cvm_zmexp.o cvm_zpoly.o
-Ld:/Rcompile/recent/R-29~1.1/bin -lRlapack
-Ld:/Rcompile/recent/R-29~1.1/bin -lRblas -lgfortran -lgfortran
-Ld:/Rcompile/recent/R-29~1.1/bin -lR

cvm_arrays.o:cvm_arrays.cpp:(.text+0xf2): undefined reference to `sscal_'
cvm_arrays.o:cvm_arrays.cpp:(.text+0x1e2): undefined reference to `cscal_'
cvm_arrays.o:cvm_arrays.cpp:(.text+0x252): undefined reference to `csscal_'
cvm_arrays.o:cvm_arrays.cpp:(.text+0x32a): undefined reference to `caxpy_'
cvm_arrays.o:cvm_arrays.cpp:(.text+0x421): undefined reference to `saxpy_'
...

To me it looks like somehow the BLAS routines are not called correctly under
Windows.

I would be very grateful if anybody could help me.

Thanks a lot,
Markus.

-- 
View this message in context: 
http://www.nabble.com/Building-a-package-with-BLAS-under-Windows-tp24590763p24590763.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] matrix algebra in c

2009-07-22 Thread Markus Jochmann

> 1. use F77_CALL() to call matrix multiplication functions from blas.
> This should be ok as long as I remember that c and FORTRAN store
> matrices differently.

Concerning 1. you might want to look at some C++ wrapper for BLAS and Lapack
like http://flens.sourceforge.net, this makes things easier.

-- 
View this message in context: 
http://www.nabble.com/matrix-algebra-in-c-tp24484891p24604315.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Building a package with BLAS under Windows

2009-07-23 Thread Markus Jochmann

Solved it myself: The single precision and complex BLAS routines were not
installed.
-- 
View this message in context: 
http://www.nabble.com/Building-a-package-with-BLAS-under-Windows-tp24590763p24633850.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel