[Rd] Matrix loading hangs on AIX 5.3 with 3.1.2
Hi all, Yes, I know 5.3 is old, but it's a system I have to work with at present. I have the latest supported xlC + friends. gcc building is not an option on this system for other reasons. I have read the install instructions and set the env vars according to those and also am using the freeware iconv and other GNU tools where needed. Problem - the Matrix package hangs on installing. Gets to: Loading required package: Matrix and then nothing. Left overnight even. My env vars look like this: export OBJECT_MODE=64 export LIBICONV=/opt/freeware export CC="xlc_r -q64" export CFLAGS="-O -qstrict" export CXX="xlC_r -q64" export CXXFLAGS="-O -qstrict" export F77="xlf_r -q64" export AR="ar -X64" export CPPFLAGS="-I$LIBICONV/include -I/usr/lpp/X11/include/X11" export LDFLAGS="-L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib" xlc -qversion IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01..0011 xlC -qversion IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01..0011 xlf -qversion IBM XL Fortran for AIX, V12.1 Version: 12.01.. I have tried with R_SHELL set to bash and ksh. My login shell is bash. I have tried with enable static and disable shared. I have subsequently built without recommended packages. R build and installs. (Minor issue with the location of libRblas but I solved that. I have then tried doing a install.packages("Matrix") from R. Same thing. Hangs. Any ideas? I can supply more information as needed. Please let me know what you would like to know. Kind regards Derek Jones Senior Software Engineer, CTG at IBM. -- View this message in context: http://r.789695.n4.nabble.com/Matrix-loading-hangs-on-AIX-5-3-with-3-1-2-tp4708136.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] Problem with shared library and lapack under windows
> On 03-06-2015, at 09:48, bstr wrote: > > Hi all, > > I have a C function, say Cfun, that calls Lapack's DGEMM routine and I need > to create a shared library to use Cfun inside R. The C file is the following > > #include > #include > #include > > > void Cfun(double *res, double *X, int *n, int *q) > { > char *ptr_TRANSA, TRANSA='T', *ptr_TRANSB, TRANSB='N'; > ptr_TRANSA=&TRANSA; > ptr_TRANSB=&TRANSB; > double *ptr_ALPHA, ALPHA=1.0, *ptr_BETA, BETA=0.0; > ptr_ALPHA=Α > ptr_BETA=Β > > dgemm_(ptr_TRANSA, ptr_TRANSB, q, q, n, ptr_ALPHA, X, n, X, n, ptr_BETA, > res, q); > } > > In Ubuntu I have no problem in compiling: R CMD SHLIB -llapack myfile.c. > However, under Windows the -llapack flag is not recognised and I am able to > get the code compiled only if I build an R package with the suitable > Makevars file options: PKG_LIBS=$(LAPACK_LIBS) $(FLIBS). Is there a way to > get the .dll without resorting to build a package? > I wouldn’t exactly know since I’m not using Windows. Try this: R CMD config LAPACK_LIBS to see the command line options needed. And why are you using dgemm_? Use the F77_CALL macro provided by R; you’ll be less system dependent that way. Berend __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Problem with shared library and lapack under windows
Hi all, I have a C function, say Cfun, that calls Lapack's DGEMM routine and I need to create a shared library to use Cfun inside R. The C file is the following #include #include #include void Cfun(double *res, double *X, int *n, int *q) { char *ptr_TRANSA, TRANSA='T', *ptr_TRANSB, TRANSB='N'; ptr_TRANSA=&TRANSA; ptr_TRANSB=&TRANSB; double *ptr_ALPHA, ALPHA=1.0, *ptr_BETA, BETA=0.0; ptr_ALPHA=Α ptr_BETA=Β dgemm_(ptr_TRANSA, ptr_TRANSB, q, q, n, ptr_ALPHA, X, n, X, n, ptr_BETA, res, q); } In Ubuntu I have no problem in compiling: R CMD SHLIB -llapack myfile.c. However, under Windows the -llapack flag is not recognised and I am able to get the code compiled only if I build an R package with the suitable Makevars file options: PKG_LIBS=$(LAPACK_LIBS) $(FLIBS). Is there a way to get the .dll without resorting to build a package? Thanks in advance, N. Lunardon -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-shared-library-and-lapack-under-windows-tp4708092.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