[Rd] Linking With External Lapack: Segfault
Hello All, I have been trying to figure out on linking R with an external lapack. Even though the R-admin recommends against doing so, our requirements force us to link it to an external lapack. I am running configure with the following parameter. *./configure --with-lapack="-L/usr/lib -llapack -lcblas" * The above seems to be having NO effect. However, later I tried replacing libRlapack, libblas and lapack.so from $(R_HOME)/lib and $(R_HOME)/modules/ with external lapack. Firstly, is this good? Secondly, after doing the above. When I do. When I do >example(svd) The following is the error that I am getting: *Error: segfault from C stack overflow* On debugging the error was in La_Init() at Line 61 *if(!ptr->svd)* I am getting a SIGSEGV over here. Could anybody provide an pointers or and tips on how to link R with an external lapack? And also possibly the cause of the above issues? TIA. Regards, -- Imanpreet Singh Arora [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Linking With External Lapack: Segfault
Hello Brian, I have been trying several options to configure and providing "-lcblas" was just one of them. I added echos for the following variable towards the configure. And with all of them I am getting the following use_lapack is unset with lapack is ** Use_External_lapack_true # Lapack_libs -L$(R_HOME)/lib$(R_ARCH) -lRlapack I tried to overwrite the libRlapack.so in $(R_HOME)/lib and lapack.so in $(R_HOME)/modules/ both before and after doing make, *again, *but in either case I am getting the same SIGSEGV as mentioned earlier. FYI, we are using an in house developed lapack for our specific platform. Could there be any specific issues in using the same? Regards, Imanpreet Singh Arora On Fri, Aug 22, 2008 at 8:39 PM, Prof Brian Ripley <[EMAIL PROTECTED]>wrote: > On Fri, 22 Aug 2008, Imanpreet wrote: > > Hello All, >> >> I have been trying to figure out on linking R with an external >> lapack. Even though the R-admin recommends against doing so, our >> requirements force us to link it to an external lapack. I am running >> configure with the following parameter. >> >> *./configure --with-lapack="-L/usr/lib -llapack -lcblas" * >> >> >> The above seems to be having NO effect. However, later I tried replacing >> libRlapack, libblas and lapack.so from $(R_HOME)/lib and >> $(R_HOME)/modules/ >> with external lapack. Firstly, is this good? >> > > No, and the cause of your failure below. > > Why do you think '-lcblas' is correct? Please do follow the manual -- if > you still have trouble when you do it is reasonable to ask for help, but not > otherwise. > > Secondly, after doing the above. When I do. >> >> When I do >> >>> example(svd) >>> >> >> The following is the error that I am getting: >> >> *Error: segfault from C stack overflow* >> >> On debugging the error was in La_Init() at Line 61 >> >> *if(!ptr->svd)* >> >> I am getting a SIGSEGV over here. >> >> Could anybody provide an pointers or and tips on how to link R with an >> external lapack? And also possibly the cause of the above issues? >> > > Follow the manual -- its instructions do work (they are used on Mac OS X, > and will also work on Linux and Solaris). > > >> >> TIA. >> >> Regards, >> >> >> -- >> Imanpreet Singh Arora >> >>[[alternative HTML version deleted]] >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> >> > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, > http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > Regards, Imanpreet Singh Arora IBM - System And Technology Group. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Linking With External Lapack: Segfault
Hello Brian, The following output was when I run .configure with no option. When I run it with --with-lapack = " *-L/usr/lib -llapack" *option the following is the output of the "echos" towards the EOF use_lapack is unset with lapack is *-L/usr/lib -llapack #Only change. *Use_External_lapack_true # Lapack_libs -L$(R_HOME)/lib$(R_ARCH) -lRlapack* # this is still the same.* Any possible pointers or cause for the above ? Regards, On Mon, Aug 25, 2008 at 5:00 PM, Imanpreet <[EMAIL PROTECTED]> wrote: > > Hello Brian, > >I have been trying several options to configure and providing > "-lcblas" was just one of them. I added echos for the following variable > towards the configure. And with all of them I am getting the following > > > use_lapack is unset > with lapack is ** > Use_External_lapack_true # > Lapack_libs -L$(R_HOME)/lib$(R_ARCH) -lRlapack > > I tried to overwrite the libRlapack.so in $(R_HOME)/lib and lapack.so in > $(R_HOME)/modules/ both before and after doing make, *again, *but in > either case I am getting the same SIGSEGV as mentioned earlier. > > FYI, we are using an in house developed lapack for our specific platform. > Could there be any specific issues in using the same? > > > Regards, > >Imanpreet Singh Arora > > > On Fri, Aug 22, 2008 at 8:39 PM, Prof Brian Ripley <[EMAIL PROTECTED]>wrote: > >> On Fri, 22 Aug 2008, Imanpreet wrote: >> >> Hello All, >>> >>> I have been trying to figure out on linking R with an external >>> lapack. Even though the R-admin recommends against doing so, our >>> requirements force us to link it to an external lapack. I am running >>> configure with the following parameter. >>> >>> *./configure --with-lapack="-L/usr/lib -llapack -lcblas" * >>> >>> >>> The above seems to be having NO effect. However, later I tried replacing >>> libRlapack, libblas and lapack.so from $(R_HOME)/lib and >>> $(R_HOME)/modules/ >>> with external lapack. Firstly, is this good? >>> >> >> No, and the cause of your failure below. >> >> Why do you think '-lcblas' is correct? Please do follow the manual -- if >> you still have trouble when you do it is reasonable to ask for help, but not >> otherwise. >> >> Secondly, after doing the above. When I do. >>> >>> When I do >>> >>>> example(svd) >>>> >>> >>> The following is the error that I am getting: >>> >>> *Error: segfault from C stack overflow* >>> >>> On debugging the error was in La_Init() at Line 61 >>> >>> *if(!ptr->svd)* >>> >>> I am getting a SIGSEGV over here. >>> >>> Could anybody provide an pointers or and tips on how to link R with an >>> external lapack? And also possibly the cause of the above issues? >>> >> >> Follow the manual -- its instructions do work (they are used on Mac OS X, >> and will also work on Linux and Solaris). >> >> >>> >>> TIA. >>> >>> Regards, >>> >>> >>> -- >>> Imanpreet Singh Arora >>> >>>[[alternative HTML version deleted]] >>> >>> __ >>> R-devel@r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel >>> >>> >> -- >> Brian D. Ripley, [EMAIL PROTECTED] >> Professor of Applied Statistics, >> http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UKFax: +44 1865 272595 >> > > > > Regards, > > Imanpreet Singh Arora > IBM - System And Technology Group. > -- Imanpreet Singh Arora IBM - System and Technology Group [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Fwd: Profiling on Multicore and Parallel Systems
Posting it to R-Devel: Hello All, In general when we use Rprof for performance evaluation on Multicore systems the output provides the time on the basis of the "user" time and the sampling time is equal to the the user time as reported by system.time. This does not seem right behavior when R is linked to BLAS/Lapack or other libraries which are optimized for parallel or multicore architectures as over there user time can be more than the elapsed time and one would be more interested in just the "elapsed" time taken by computation returned by gettimeofday() per routine rather than "user" time as returned by getrusage(). Could anyone provide any pointers on how to best do R profiling on parallel and multicore systems. Regards, -- Imanpreet Singh Arora -- Imanpreet Singh Arora [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel