View previous topic :: View next topic |
Author |
Message |
MDp
Joined: 19 Sep 2010 Posts: 5
|
Posted: Mon Sep 20, 2010 1:51 pm Post subject: How to include LAPACK and BLAS packages? |
|
|
How does one link the LAPACK and BLAS packages in FTN95?
I am using the personal edition of FTN95. None of the presently posted help documents worked. _________________ MDP |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Sep 20, 2010 2:48 pm Post subject: |
|
|
If you are prepared the download the source code then you can create your own DLL using FTN95.
If you are using an existing DLL created using a third party compiler then it will probably use the STDCALL calling protocol and the simplest approach with FTN95 is to use /IMPORT_LIB on the command line.
In a Plato project you can do this by setting the Properties of a Reference in the Project Explorer window. |
|
Back to top |
|
 |
MDp
Joined: 19 Sep 2010 Posts: 5
|
Posted: Mon Sep 20, 2010 3:05 pm Post subject: Using the /IMPORT_LIB for LAPACK and BLAS |
|
|
I have a BLAS.lib and LAPACK.lib and also BLAS.dll and LAPACK.dll which I downloaded.
I tried using the /IMPORT_LIB as following at the FTN95 command prompt
FTN95> SLINK file1.obj file2.obj /IMPORT_LIB BLAS.lib LAPACK.lib
When I use the above either using *.lib files or *.dll files the compiler says cannot understand /IMPORT_LIB.
Also, my fortran files are not set up as a project. They (including the BLAS and LAPACK) are all in the same directory.
Also how does one create .dll from FTN95.
Thanks _________________ MDP |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Sep 20, 2010 3:12 pm Post subject: |
|
|
/IMPORT_LIB is used on the FTN95 command line, repeated for each DLL (not LIB).
In SLINK you just load the DLL (i.e. just list it on the command line or use lo in interactive mode). |
|
Back to top |
|
 |
MDp
Joined: 19 Sep 2010 Posts: 5
|
Posted: Mon Sep 20, 2010 3:27 pm Post subject: |
|
|
I have used the following commands and none are working.
FTN95> SLINK file1.obj file2.obj /IMPORT_LIB blas.dll /IMPORT_LIB lapack.dll
The compiler says "CANNOT UNDERSTAND /IMPORT_LIB"
FTN95> SLINK file1.obj file2.obj blas.dll lapack.dll
In this case the compiler complains that the symbols related to BLAS or LAPACK (for e.g. dcopy, dgetri, dgetrf, ...) are all missing from file1.obj _________________ MDP |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Sep 20, 2010 3:38 pm Post subject: |
|
|
I repeat, /IMPORT_LIB goes on the FTN95 command line not the SLINK command line.
FTN95 myprog.f90 /import_lib blas.dll /import_lib lapack.dll
then
SLINK myprog.obj blas.dll lapack.dll
this creates myprog.exe |
|
Back to top |
|
 |
MDp
Joined: 19 Sep 2010 Posts: 5
|
Posted: Mon Sep 20, 2010 3:53 pm Post subject: |
|
|
Ok. So these commands worked. I generate an executable. Thanks.
But, when I run the executable I get the following message
Error 29: call to a missing routing DCOPY (which is part of BLAS/LAPACK)
Also, how does one generate the dll for BLAS and LAPACK from the source files.
Thanks again. _________________ MDP |
|
Back to top |
|
 |
MDp
Joined: 19 Sep 2010 Posts: 5
|
Posted: Mon Sep 20, 2010 7:59 pm Post subject: SLINK gives missing symbols |
|
|
Using the commands below gives an executable. However the compiler complains of missing symbols. So when I try to run the executable the program stops.
How does one make SLINK see the missing symbols. I re-installed my FTN95 edition again, that, did not help.
Thanks. _________________ MDP |
|
Back to top |
|
 |
|