|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Mon Oct 24, 2005 11:22 am Post subject: linking to blas |
|
|
I would like to replace the calls to the builtin function matmul with the function from an optimised blas, either Atlas or Goto. Could anyone give me a pointer how to do this? I'm a complete fortran beginner. I would like to multiply two fairly large double matrices together ( aprox 500, 500). I understand I have to have an interface to the routines in the blas. I would be very grateful if somebody could give a short example or knows of a link to do this.
Thanks in advance
Albert |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Tue Oct 25, 2005 2:39 am Post subject: linking to blas |
|
|
I am not familiar with Atlas or Goto but here are two possible ways forward.
1) If you have access to a third party Fortran DLL for Win32 (such as the Intel XML library) then it will probably be compiled using the STDCALL protocol. In which case, if the DLL is called blas.dll, you can use a command line of the form...
FTN95 prog.for /import_lib blas.dll /lgo
The alternative is to create a Plato project and to create a reference in the Project Explorer window and to select STDCALL in its properties.
2) If you do not have access to a Win32 DLL then you can download the source files from
http://www.netlib.org/blas/blas1.tgz (also blas2.tgz and blas3.tgz). Put these into a dedicated folder, open a Command Prompt window and change directory to the dedicated folder.
Issue the following commands...
ftn95 *.f /fixed /opt
slink -dll -exportall *.obj -file:blas1.dll
ftn95 sample.f /fixed /library blas1.dll /lgo
where sample.f is your program that uses the library.
The alternative is to create a Plato project to create the DLL and then to run the sample (as a new project or a single file) from Plato.
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|