Silverfrost Forums

Welcome to our forums

How to include LAPACK and BLAS packages?

20 Sep 2010 12:51 #6969

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.

20 Sep 2010 1:48 #6970

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.

20 Sep 2010 2:05 #6971

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

20 Sep 2010 2:12 #6972

/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).

20 Sep 2010 2:27 #6973

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

20 Sep 2010 2:38 #6975

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

20 Sep 2010 2:53 #6976

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.

20 Sep 2010 6:59 #6978

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.

Please login to reply.