Skip to content

loading RBlas.dll

4 messages · sachin1234, Antonio, Fabio Di Narzo, Brian Ripley

#
hi everyone,

Im implementing a new RBlas dll but just for optimising sake i need to know
how and WHERE (which source code) RBlas gets loaded. there is a call to
loadlibrary() in dynload.c BUT it seems this is not the function that is
loading Rblas. 

how do i know this? well i added the code :(just after the loadlibrary()
call)
        /*********************************************/
	/*this section writes into files which libraries were loaded*/
	file=fopen("libraries.txt","a");
	fputs(path,file);
	fputs("\n",file);
	fclose(file);
	/******************************************/
so that it prints out the path names of which ever libraries are loaded and
the output is:
C:/DOCUME~1/abe044/MYDOCU~1/PROJEC~1/GPU_BLAS/R-28~1.1/library/methods/libs/methods.dll
C:/DOCUME~1/abe044/MYDOCU~1/PROJEC~1/GPU_BLAS/R-28~1.1/library/grDevices/libs/grDevices.dll
C:/DOCUME~1/abe044/MYDOCU~1/PROJEC~1/GPU_BLAS/R-28~1.1/library/stats/libs/stats.dll

and i think i got tools.dll to load as well. I cant find where R.dll,
Rblas.dll etc gets loaded. My main focus is Rblas.dll

now heres what i expect. Whenever you open R it runs one of its script files
which contains dyn.load and loads it. HOWEVER as far as i understand
dyn.load must be using dynload.c. Hence it should spit loading blas into
libraries.txt which it doesnt do. 

I am stumped. I've spend nearly 2 days on this. any help would be
appreciated
#
hi, whoever you are (I've seen no signature),

2009/1/22 sachin1234 <Sachinthaka.Abeywardana at csiro.au>:
Why do you need this? The R-admin manual explains how to replace the R
built-in version of Blas with a custom, optimized one. Is this what
are you looking for? One of the methods mentioned here doesn't even
require re-compilation of R.

Bests,
f.

  
    
1 day later
#
hi Antonio,

The name's Sachin :) . I need this because im not implementing the ATLAS,
fast BLAS or anything like that. What im trying to do is to make a GPU
version of blas. I have implemented this so far but extremely inefficiently.
What i need to do is to do things like initialisation of the GPU hardware as
soon as Rblas.dll gets loaded.

Whats happening so far is something like this:

GPU_DGEMM (arguments)}/*this is a blas function*/
    initialise_GPU;
    /*rest of code*/
    return;
}

sorry for not being clear
sachin
Antonio, Fabio Di Narzo wrote:

  
    
1 day later
#
So you don't need this: you just need to replace Rblas.dll.

DLLs can contain initialization code: that is standard Windows' 
practice so please read up on it.
On Sat, 24 Jan 2009, sachin1234 wrote: